shortlist-digital / croissant-api
Custom APIs endpoints for croissant-heavy
Installs: 1 219
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 2
Type:wordpress-muplugin
pkg:composer/shortlist-digital/croissant-api
Requires
- composer/installers: @stable
 - pimple/pimple: 3.2.3
 
Requires (Dev)
- brain/monkey: 2.2.0
 - mockery/mockery: ~1.0
 - phpmd/phpmd: 2.*
 - phpunit/phpunit: ~5.7.9
 - shortlist-digital/wp-tapestry-plugin: @stable
 - squizlabs/php_codesniffer: 3.*
 - wp-coding-standards/wpcs: 0.14.1
 
- dev-master
 - 5.2.0
 - 5.1.0
 - 5.0.1
 - 5.0.0
 - 4.3.1
 - 4.3.0
 - 4.2.2
 - 4.2.1
 - 4.2.0
 - 4.1.4
 - 4.1.3
 - 4.1.2
 - 4.1.1
 - 4.1.0
 - 4.0.3
 - 4.0.2
 - 4.0.1
 - 4.0.0
 - 3.9.0
 - 3.8.2
 - 3.8.1
 - 3.8.0
 - 3.7.3
 - 3.7.2
 - 3.7.1
 - 3.7.0
 - 3.6.0
 - 3.5.2
 - 3.5.1
 - 3.5.0
 - 3.4.0
 - 3.3.1
 - 3.3.0
 - 3.2.1
 - 3.2.0
 - 3.1.0
 - 3.0.1
 - 3.0.0
 - 2.0.1
 - 2.0.0
 - 1.2.0
 - 1.1.1
 - 1.1.0
 - 1.0.0
 - dev-add-iab-endpoint
 - dev-add-poll-widget
 - dev-related-articles-post-modifier
 - dev-elastic-press
 - dev-speed-up-acf-single-post
 - dev-remove-unused-field
 - dev-fix-revisions
 
This package is not auto-updated.
Last update: 2018-10-29 12:15:36 UTC
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_postsorwp-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_idorwp-json/croissant/v1/posts/:post_id - 
Return
 
Post Object.
croissant_series
Returns information about a series taxonomy.
- 
URL
wp-json/wp/v2/croissant_seriesorwp-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_tagsorwp-json/croissant/v1/tags - 
URL Params
slug=[string]requiredpage=[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_authorsorwp-json/croissant/v1/authors - 
URL Params
slug=[string]requiredpage=[integer]
 - 
Return
 
Array of post objects.
croissant_categories
Returns a post list mocking widgets for the category page.
- 
URL
wp-json/wp/v2/croissant_categoriesorwp-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_idorwp-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_idorwp-json/croissant/v1/iab_categories/:post_id - 
Return
 
Array with IAB categories with id, name and score.