shortlist-digital / croissant-api
为croissant-heavy定制的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
为croissant-heavy定制的API端点
端点
croissant_posts
根据传递的参数返回文章列表。
-
URL
wp-json/wp/v2/croissant_posts
或wp-json/croissant/v1/posts
-
URL 参数
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]
所有字符串参数接受以逗号分隔的多个值: ?tags=music,food
为了澄清,以下是一个有效的post_types
列表
- post
- page
- longform
- quiz_post
- sponsored_post
- sponsored_longform
- sponsored_quiz_post
- special_offer
- 返回
文章对象数组
croissant_posts/:post_id
返回单个文章。
-
URL
wp-json/wp/v2/croissant_posts/:post_id
或wp-json/croissant/v1/posts/:post_id
-
返回
文章对象。
croissant_series
返回关于系列分类的信息。
-
URL
wp-json/wp/v2/croissant_series
或wp-json/croissant/v1/series
-
URL 参数
slug=[string]
必需
-
返回
带有自定义字段的系列对象。
croissant_tags
根据作为参数传递的标签slug返回文章列表。
-
URL
wp-json/wp/v2/croissant_tags
或wp-json/croissant/v1/tags
-
URL 参数
slug=[string]
必需page=[integer]
-
返回
文章对象数组。
croissant_authors
根据作为参数传递的标签slug返回文章列表。
-
URL
wp-json/wp/v2/croissant_authors
或wp-json/croissant/v1/authors
-
URL 参数
slug=[string]
必需page=[integer]
-
返回
文章对象数组。
croissant_categories
返回用于分类页面的模拟小工具的文章列表。
-
URL
wp-json/wp/v2/croissant_categories
或wp-json/croissant/v1/categories
-
URL 参数
slug=[string]
必需
-
返回
包含所需分类文章的对象。
croissant_traffic_driver/:post_id
返回包含交通驱动器信息的单个文章。
-
URL
wp-json/wp/v2/croissant_traffic_driver/:post_id
或wp-json/croissant/v1/traffic_driver/:post_id
-
返回
包含交通驱动器文章信息的对象。
croissant_iab_categories/:post_id
返回与这篇文章相关的Iab分类数组。
-
URL
wp-json/wp/v2/croissant_iab_categories/:post_id
或wp-json/croissant/v1/iab_categories/:post_id
-
返回
包含id、名称和得分的IAB分类数组。