GithubHelp home page GithubHelp logo

classicpress / classicpress-apis Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 12.0 141 KB

ClassicPress API endpoints

Home Page: https://api-v1.classicpress.net/

License: GNU General Public License v2.0

PHP 76.85% Python 19.07% Shell 4.08%

classicpress-apis's Introduction

ClassicPress: The CMS for Creators. Stable. Lightweight. Instantly Familiar.

ClassicPress is a community-led open source content management system for creators. It is a fork of WordPress 6.2 that preserves the TinyMCE classic editor as the default option. It is half the size of WordPress, contains less bloat improving performance, and has no block editor (Gutenberg/Full Site Editing).

Coding Standards PHPUnit Tests JavaScript Tests PHP Compatibility Financial Contributors

For more information, see:

Contributions

This project exists thanks to all the people who contribute and who have contributed in the past, whether as part of the long history of thousands of contributions to WordPress from many different people, or as contributions to ClassicPress itself.

Would you like to help? Here is how you can start ›

Sponsors

Corporate sponsors that believe in ClassicPress. Become a sponsor › All donations are tax-deductible in the United States.

Brinkhost IT Tukutoi

Financial Contributors

Support the ClassicPress project by making a donation › All donations are tax-deductible in the United States.

Individuals

Financial contributors

Organizations

Financial contributors

classicpress-apis's People

Contributors

brettvan avatar dependabot[bot] avatar github-actions[bot] avatar mattyrob avatar nylen avatar scottybo avatar senlin avatar striebwj avatar szepeviktor avatar timbocode avatar viktorix avatar xxsimoxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

classicpress-apis's Issues

Support forum petitions endpoint

With the new voting plugin finally installed we can swap out the api endpoint from the Fider archive.

most-wanted: https://forums.classicpress.net/c/governance/petitions/77.json?order=votes
trending: https://forums.classicpress.net/c/governance/petitions/77.json?order=latest
recent: https://forums.classicpress.net/c/governance/petitions/77.json?order=created

Add setting to override API while testing

This is a feature request.

I believe this can make it easier to test and have a few more testers on board and feedback.

The plugin uses the API to check what migrations are ‘officially’ supported. Locally that can be over-ridden with:

add_filter( 'classicpress_ignore_wp_version', '__return_true' );

Can we add this in settings to reduce the code requirement?

Make update/upgrade endpoints pull from GitHub dynamically

From ClassicPress/ClassicPress-v1#238:

Under https://github.com/ClassicPress/ClassicPress-APIs there are basic endpoints https://api.classicpress.net/core/stable-check/1.0/ and https://api.classicpress.net/core/version-check/1.0/.

These need to be made dynamic and pull information from GitHub about Releases zip files (with caching on the server), which we will use for update hosting initially.

We need someone to record and analyze the responses that come back from the WP core update endpoints for various WP configurations:

  • English and non-English
  • Latest version on a branch (4.8.x, 4.9.x)
  • Older version on a branch with an update available (4.8.x, 4.9.x)

We also need to come up with a strategy for handling localized releases and alpha/beta/"final" release channels.

Update features API endpoint to use GitHub API

We need to modify JSON generator script to get data from GitHub, which is triggered periodically using a cronjob.

The following is a proposed JSON format based on the current API:

{
    "recent": {
        "data": [{
                "title": "items->{}->title",
                "status": "open",
                "link": "items->{}->url"
            },
            {
                "title": "items->{}->title",
                "status": "open",
                "link": "items->{}->url"
            }
        ]
    },
    "in-progress": {
        "data": [{
                "title": "items->{}->title",
                "status": "needs-pr",
                "link": "items->{}->url"
            },
            {
                "title": "items->{}->title",
                "status": "has-pr",
                "link": "items->{}->url"
            }
        ]
    },
    "help-wanted": {
        "data": [{
                "title": "items->{}->title",
                "status": "open",
                "link": "items->{}->url"
            },
            {
                "title": "items->{}->title",
                "status": "open",
                "link": "items->{}->url"
            }
        ]
    },
    "link": "https://github.com/ClassicPress/ClassicPress/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+feature+request%22"
}

Categorization

We have 3 categories: recent, in-progress, and help wanted

recent

Pull the most recent 10 open issues using the label "type: feature request" and the following statuses:

  • status: discussion
  • status: on hold
  • status: need more info
  • status: needs decision

When passing status label to the JSON file, please remove "status: ".

https://api.github.com/search/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+feature+request%22+repo:classicpress/classicpress

in progress

Pull open issues labeled "type: feature request" and the following statuses:

  • status: has pr
  • status: needs pr
  • status: research plugin
  • status: needs test
  • status: needs review
  • status: community reviewed

When passing status label to the JSON file, please remove "status: ".

https://api.github.com/search/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+feature+request%22+repo:classicpress/classicpress

help wanted

Pull the latest 10 open issues with label "help wanted".
When passing status label to the JSON file, please remove "status: ".

https://api.github.com/search/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+repo:classicpress/classicpress

Add alpha/beta/RC channels for upgrades

It should be easy to switch a ClassicPress site to receive updates from all beta versions, RC versions, and possibly alpha versions too. This is currently supported for nightly builds but not for any other "channels".

Add api.wordpress.org/core/importers/1.1

Looks like we're missing an API:
https://api.wordpress.org/core/importers/1.1/

This is a list of all the importer plugins. Since we're forking WordPress Importer plugin, we should have our own API and a list of plugins. This is where it's used in the core:
https://github.com/ClassicPress/ClassicPress/blob/22675efaf13b457f43f961809ca4ef202bf02dd7/src/wp-admin/includes/import.php#L145

This seems to be a simple JSON list.

One possible obstacle is core implementation may require some changes because ClassicPress Importer plugin will be listed in our directory. The "Install Now" button for this plugin might need to be changed to install the plugin from our directory instead of WordPress repository.

Automatic PRs for new ClassicPress and WordPress versions

We should set up a bot to make new PRs to this repository when new ClassicPress or WordPress versions are released, to enable the new version for the migration plugin.

There are 2 cases to handle:

New ClassicPress version addressed in #38

The ClassicPress migration plugin needs to use a ClassicPress build with a different structure, because WordPress can only do an upgrade from a zip file that contains a single folder named wordpress. (Some history and links at ClassicPress/ClassicPress#148.)

To avoid an extra manual step in the release process, we generate these migration builds along with the nightly builds: https://github.com/ClassyBot/ClassicPress-nightly/releases

A new nightly build is released every day shortly after midnight UTC.

We need to create a PR against this repository every time the nightly build changes to a new base version number, indicating that a release has been done. Here is an example of such a commit: 348751d

New WordPress version

An initial attempt at this was made in #36 and #38 but it needs more work before being committed, see 9a480d6 for more info.

When a new version of WordPress is released this also needs to be tested manually (because a new WP version could break the migration process) and then enabled.

An automated PR could be created for this too, though again it needs to be tested carefully before being merged.

Here are two examples of such commits, they should look a bit different depending on whether it was a major or a minor version of WordPress that was released:

Initial plan for auto-updates and versioning

Here is the basic idea:

  • Nightly versions can update to newer nightly , alpha, beta, or final release builds (if you're on nightly builds you're a developer, and you probably want to keep getting new nightly builds only)
  • Alpha versions can update to newer alpha, beta, or final release builds
  • Beta versions can update to newer beta or final release builds
  • Final release versions can update to newer final release builds (without moving to a new semver major version i.e. 1.2.3 => 2.0.0)

Open question: this means that all auto-updates will eventually funnel towards final release builds and stay there. Is this desirable? We may need an option for whether to stay on the same "release channel" (nightly, alpha, beta, final) or not (or the ability to "switch channels").

From @invisnet here are some possible auto-update before => after versions (lines without => mean "no change"):

Step 1
======
1.0.0-alpha1+build.20181021 => 1.0.0-alpha1+build.20181021
1.0.0-alpha1+build.20181020 => 1.0.0-alpha1+build.20181021
1.0.0-alpha1 => 1.0.0-alpha1

Step 2
======
1.0.0-alpha1+build.20181021 => 1.0.0-alpha1+build.20181021
1.0.0-alpha1+build.20181020 => 1.0.0-alpha1+build.20181021
1.0.0-alpha2 => 1.0.0-alpha2
1.0.0-alpha1 => 1.0.0-alpha2

Step 3
======
1.0.0-alpha1+build.20181021 => 1.0.0-alpha1+build.20181021
1.0.0-alpha1+build.20181020 => 1.0.0-alpha1+build.20181021
1.0.0-alpha2 => 1.0.0-beta1
1.0.0-beta1 => 1.0.0-beta1
1.0.0-alpha1 => 1.0.0-beta1

Step 4
======
1.0.0-beta1 => 1.0.0-beta1
1.0.0-alpha2 => 1.0.0-beta1
1.0.0-alpha1 => 1.0.0-beta1
1.0.0-beta2+build.20181028 => 1.0.0-beta2+build.20181028
1.0.0-alpha1+build.20181021 => 1.0.0-beta2+build.20181028
1.0.0-alpha1+build.20181020 => 1.0.0-beta2+build.20181028

Step 5
======
1.0.0-beta2 => 1.0.0-beta2
1.0.0-beta1 => 1.0.0-beta2
1.0.0-alpha2 => 1.0.0-beta2
1.0.0-alpha1 => 1.0.0-beta2
1.0.0-beta2+build.20181030 => 1.0.0-beta2+build.20181030
1.0.0-beta2+build.20181028 => 1.0.0-beta2+build.20181030
1.0.0-alpha1+build.20181021 => 1.0.0-beta2+build.20181030
1.0.0-alpha1+build.20181020 => 1.0.0-beta2+build.20181030

Step 6
======
1.0.0-beta2 => 1.0.0
1.0.0-beta1 => 1.0.0
1.0.0 => 1.0.0
1.0.0-alpha2 => 1.0.0
1.0.0-alpha1 => 1.0.0
1.0.0-beta2+build.20181030 => 1.0.0+build.20181031
1.0.0-beta2+build.20181028 => 1.0.0+build.20181031
1.0.0-alpha1+build.20181021 => 1.0.0+build.20181031
1.0.0-alpha1+build.20181020 => 1.0.0+build.20181031
1.0.0+build.20181031 => 1.0.0+build.20181031

Step 7
======
1.0.0-beta2 => 1.1.0-alpha1
1.0.0-beta1 => 1.1.0-alpha1
1.0.0 => 1.0.0
1.1.0-alpha1 => 1.1.0-alpha1
1.0.0-alpha2 => 1.1.0-alpha1
1.0.0-alpha1 => 1.1.0-alpha1
1.0.0-beta2+build.20181030 => 1.1.0-alpha1+build.20181101
1.1.0-alpha1+build.20181101 => 1.1.0-alpha1+build.20181101
1.0.0-beta2+build.20181028 => 1.1.0-alpha1+build.20181101
1.0.0-alpha1+build.20181021 => 1.1.0-alpha1+build.20181101
1.0.0-alpha1+build.20181020 => 1.1.0-alpha1+build.20181101
1.0.0+build.20181031 => 1.1.0-alpha1+build.20181101

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.