restApi

返回列表
首页 Code 知识 restApi

restApi

2020-10-29 192次

/* baseurl */
let baseUrl = "https://www.xxxxx.com/wp-json/";
/* type */
let mpv = baseUrl + "mp/v1";
let wpv = baseUrl + "wp/v2";

/* categories */
let categories = wpv + "categories"
let categoriesId = wpv + "categories/7"

/* article */
let article = wpv + "posts";
let articleId = wpv + "posts/1";
/* day */
let day =  wpv + "posts?before=2019-05-12T23:59:59&after=2019-01-12T00:00:00"

/* page */
let page = wpv + "pages";
let pageId = wpv + "pages/289";

/* tags */
let tags = wpv + "tags";
let tagsId = wpv + "tags/3";

/* search */
let search = wpv + "search?search=关键词1,关键词2&per_page=10&subtype=page";

/* user */
let user = wpv + "users";
Prev
Next