PHPackages                             norotaro/wn-blogapi-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. norotaro/wn-blogapi-plugin

ActiveWinter-plugin[API Development](/categories/api)

norotaro/wn-blogapi-plugin
==========================

v1.0.1(4y ago)124MITPHP

Since Jul 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/norotaro/wn-blogapi-plugin)[ Packagist](https://packagist.org/packages/norotaro/wn-blogapi-plugin)[ Docs](https://github.com/norotaro/wn-blogapi-plugin)[ RSS](/packages/norotaro-wn-blogapi-plugin/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

Blog API Plugin
===============

[](#blog-api-plugin)

A simple JSON Rest API for consume datas from [Winter Blog Plugin](https://github.com/wintercms/wn-blog-plugin)

Installation
------------

[](#installation)

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

```
composer require norotaro/wn-blogapi-plugin
php artisan winter:up
```

Endpoints
---------

[](#endpoints)

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

### List posts

[](#list-posts)

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

- **page** - this value is used to determine what page the user is on. The default value is 1.
- **category** - a category slug to filter the posts by. If not specified or has blank value, all posts are returned.
- **perPage** - how many posts to return on a single page (the pagination is supported automatically). The default value is 30.
- **sort** - the column name and direction used for the sort order of the posts. The default value is **published\_at desc**.
- **exceptPost** - ignore a single post by its slug or unique ID. The ignored post will not be included in the list, useful for showing other/related posts.
- **exceptCategories** - ignore posts from a comma-separated list of categories, given by their unique slug. The ignored posts will not be included in the list.

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`:

```
curl --request GET '{base_uri}/api/norotaro/blogapi/posts'
```

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

```
curl --request GET '{base_uri}/api/norotaro/blogapi/posts?category={category_slug}'
```

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

Here is an example of the JSON returned:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://winter.app?category=test&page=1",
   "last_page_url": "http://winter.app?category=test&page=4",
   "next_page_url": "http://winter.app?category=test&page=2",
   "prev_page_url": null,
   "path": "http://winter.app",
   "from": 1,
   "to": 15,
   "data":[
        {
            // Post Object
        },
        {
            // Post Object
        }
   ],
   "category": {
        // Category Object
    }
}
```

### Post detail

[](#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`:

```
curl --request GET '{base_uri}/api/norotaro/blogapi/posts/{slug}'
```

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

```
{
    "code": 404,
    "message": "Not found"
}
```

### List categories

[](#list-categories)

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

- **displayEmpty** - determines if empty categories should be displayed. The default value is false.

The next example shows the basic endpoint usage with `curl`:

```
curl --request GET '{base_uri}/api/norotaro/blogapi/categories'
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

2

Last Release

1755d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1774870?v=4)[Nelson Otazo](/maintainers/norotaro)[@norotaro](https://github.com/norotaro)

---

Top Contributors

[![norotaro](https://avatars.githubusercontent.com/u/1774870?v=4)](https://github.com/norotaro "norotaro (9 commits)")

---

Tags

pluginapiblogwinterwintercmswinter-plugin

### Embed Badge

![Health badge](/badges/norotaro-wn-blogapi-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/norotaro-wn-blogapi-plugin/health.svg)](https://phpackages.com/packages/norotaro-wn-blogapi-plugin)
```

###  Alternatives

[tinify/magento2

Make your web shop faster by compressing your JPEG and PNG images. This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG.

4345.8k](/packages/tinify-magento2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
