mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireCloud.git
synced 2026-05-31 00:04:27 +08:00
75 lines
2.2 KiB
Text
75 lines
2.2 KiB
Text
meta {
|
|
name: Plugins Info
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
get {
|
|
url: {{API_URL}}/plugins/info/:api_version/?action=query_plugins&request%5Bpage%5D=1&request%5Bper_page%5D=36&request%5Blocale%5D=en_US&request%5Bbrowse%5D=popular&request%5Bwp_version%5D=6.2
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
params:query {
|
|
action: query_plugins
|
|
request[page]: 1
|
|
request[per_page]: 36
|
|
request[locale]: en_US
|
|
request[browse]: popular
|
|
request[wp_version]: 6.2
|
|
}
|
|
|
|
params:path {
|
|
api_version: 1.2
|
|
}
|
|
|
|
headers {
|
|
Host: api.wordpress.org
|
|
User-Agent: WordPress/6.2.2; http://172.18.0.5/
|
|
Accept: */*
|
|
Accept-Encoding: deflate, gzip
|
|
Connection: Keep-Alive
|
|
}
|
|
|
|
assert {
|
|
res.status: eq 200
|
|
res.body.plugins.length: gte 20
|
|
res.body.info.page: eq 1
|
|
Object.keys(res.body.plugins[0]): length 25
|
|
res.body.plugins[0].name: isString
|
|
res.body.plugins[0].slug: isString
|
|
res.body.plugins[0].version: isString
|
|
res.body.plugins[0].slug: isString
|
|
res.body.plugins[0].version: isString
|
|
res.body.plugins[0].author: isString
|
|
res.body.plugins[0].author_profile: isString
|
|
res.body.plugins[0].requires: isString
|
|
res.body.plugins[0].requires_php: isString
|
|
res.body.plugins[0].requires_plugins: isArray
|
|
res.body.plugins[0].rating: isNumber
|
|
res.body.plugins[0].ratings: isJson
|
|
res.body.plugins[0].num_ratings: isNumber
|
|
res.body.plugins[0].support_threads: isNumber
|
|
res.body.plugins[0].support_threads_resolved: isNumber
|
|
res.body.plugins[0].active_installs: isNumber
|
|
res.body.plugins[0].downloaded: isNumber
|
|
Date.parse(res.body.plugins[0].last_updated.substring(0,10)): gt 1234567890
|
|
Date.parse(res.body.plugins[0].added): gt 1234567890
|
|
res.body.plugins[0].homepage: isString
|
|
res.body.plugins[0].short_description: isString
|
|
res.body.plugins[0].description: isString
|
|
res.body.plugins[0].download_link: isString
|
|
res.body.plugins[0].tags: isJson
|
|
res.body.plugins[0].icons: isJson
|
|
res.body.plugins[0].donate_link: isString
|
|
}
|
|
|
|
docs {
|
|
Note: You can find information about arguments and examples in the following blog articles:
|
|
|
|
[v1.2](https://wplake.org/blog/wordpress-org-api/)
|
|
|
|
[v1.0](http://wp.tutsplus.com/tutorials/plugins/communicating-with-the-wordpress-org-plugin-api/)
|
|
|
|
[v1.0](http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/)
|
|
}
|