shortlist-digital/croissant-api

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (5.2.0) of this package.

Custom APIs endpoints for croissant-heavy

Installs: 1 208

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 2

Type:wordpress-muplugin


README

Custom APIs endpoints for croissant-heavy

Endpoints

croissant_posts

Returns a list of articles based on parameters passed on.

  • URL

    wp-json/wp/v2/croissant_posts or wp-json/croissant/v1/posts

  • URL Params

    • tags=[string]
    • tags_exclude=[string]
    • categories=[string]
    • categories_exclude=[string]
    • series=[string]
    • series_exclude=[string]
    • authors=[string]
    • authors_exclude=[string]
    • post_types=[string]
    • per_page=[integer]
    • page=[integer]

All string params accepts multiple values separated by commas: ?tags=music,food

Just for clarification, here is a valid list of post_types:

- post
- page
- longform
- quiz_post
- sponsored_post
- sponsored_longform
- sponsored_quiz_post
- special_offer
  • Return

Array of post objects

croissant_posts/:post_id

Returns a single article.

  • URL

    wp-json/wp/v2/croissant_posts/:post_id or wp-json/croissant/v1/posts/:post_id

  • Return

Post Object.

croissant_series

Returns information about a series taxonomy.

  • URL

    wp-json/wp/v2/croissant_series or wp-json/croissant/v1/series

  • URL Params

    • slug=[string] required
  • Return

Series object with custom fields.

croissant_tags

Returns a post list based on the tag slug passed as a parameter.

  • URL

    wp-json/wp/v2/croissant_tags or wp-json/croissant/v1/tags

  • URL Params

    • slug=[string] required
    • page=[integer]
  • Return

Array of post objects.

croissant_authors

Returns a post list based on the tag slug passed as a parameter.

  • URL

    wp-json/wp/v2/croissant_authors or wp-json/croissant/v1/authors

  • URL Params

    • slug=[string] required
    • page=[integer]
  • Return

Array of post objects.

croissant_categories

Returns a post list mocking widgets for the category page.

  • URL

    wp-json/wp/v2/croissant_categories or wp-json/croissant/v1/categories

  • URL Params

    • slug=[string] required
  • Return

Object with posts of the required category.

croissant_traffic_driver/:post_id

Returns a single post with the traffic driver information

  • URL

    wp-json/wp/v2/croissant_traffic_driver/:post_id or wp-json/croissant/v1/traffic_driver/:post_id

  • Return

Object with the traffic driver post information.

croissant_iab_categories/:post_id

Returns an array of the Iab categories related with this post.

  • URL

    wp-json/wp/v2/croissant_iab_categories/:post_id or wp-json/croissant/v1/iab_categories/:post_id

  • Return

Array with IAB categories with id, name and score.