Download the PHP package norotaro/wn-blogapi-plugin without Composer

On this page you can find all versions of the php package norotaro/wn-blogapi-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wn-blogapi-plugin

Blog API Plugin

A simple JSON Rest API for consume datas from Winter Blog Plugin

Installation

Run the following command in a project's root directory:

Endpoints

The plugin provides endpoints for list posts, post details and list categories.

List posts

Use the api/norotaro/blogapi/posts endpoint to get a list of latest blog posts. The endpoint accepts the following query parameters:

The response is a JSON serialization of a Laravel paginator instance that also has the category atribute. This attribute represents the blog category object loaded from the database. If the category is not found or not specified, the attribute value is null.

The next example shows the basic endpoint usage using curl:

The next example shows the basic component usage with the category filter:

In the examples you need to replace {base_uri} and {category_slug} strings with valid values.

Here is an example of the JSON returned:

Post detail

Use the api/norotaro/blogapi/posts/{slug} to get a blog post object.

The post object is returned with categories, featured_images and content_images relationships loaded.

The next example shows the basic endpoint usage with curl:

If a post with the specified slug is not found, then the following response will be returned with a 404 status code:

List categories

Use the api/norotaro/blogapi/categories endpoint to get a list of blog post categories. The endpoint accepts the following query parameters:

The next example shows the basic endpoint usage with curl:


All versions of wn-blogapi-plugin with dependencies

PHP Build Version
Package Version
Requires winter/wn-blog-plugin Version ^2.0
norotaro/wn-rest-plugin Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package norotaro/wn-blogapi-plugin contains the following files

Loading the files please wait ...