[WordPress] 外掛分享: WordPress REST API (Version 2)

首頁外掛目錄 › WordPress REST API (Version 2)
WordPress 外掛 WordPress REST API (Version 2) 的封面圖片
10,000+
安裝啟用
★★★★
4.2/5 分(34 則評價)
3032 天前
最後更新
問題解決
WordPress 4.6+ v2.0-beta15 上架:2009-04-24

內容簡介

WordPress 正轉變成一個完整的應用程式框架,因此需要新的 API。這個專案的目的是創建一個易於使用、易於理解且經過良好測試的框架,用於創建這些 API,以及為 WordPress 核心創建 API。

此外掛提供了一個易於使用的 REST API,可以通過 HTTP 訪問。以簡單的 JSON 格式獲取網站的數據,包括用戶、文章、分類和其他內容。檢索或更新數據就像發送 HTTP 請求一樣簡單。

想要獲取網站文章?只需發送一個 GET 請求到 /wp-json/wp/v2/posts。想要更新 ID 為 4 的用戶?發送一個 PUT 請求到 /wp-json/wp/v2/users/4。想要查找所有包含關鍵詞 "awesome" 的文章?使用 GET /wp-json/wp/v2/posts?filter[s]=awesome。就是這麼簡單。

WordPress REST API 對 WP Query、文章 API、文章元 API、用戶 API、修訂版本 API 等提供了簡單而易於使用的界面。如果你可以在 WordPress 中做到某事,API 也能讓你做到。

REST API 還包括一個基於 Backbone 模型的易於使用的 JavaScript API,使插件和佈景主題開發人員能夠直接運行,而無需了解任何有關連接詳細信息的細節。

請查看我們的文檔,以獲取有關 API 可用性和使用方式的信息。我們還提供了有關為插件和佈景主題開發人員擴展 API 的文檔!

此專案的所有問題都在 GitHub 上進行跟蹤。你也可以查看專案的最近更新。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0-beta15) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WordPress REST API (Version 2)」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WordPress is moving towards becoming a fully-fledged application framework, and we need new APIs. This project was born to create an easy-to-use, easy-to-understand and well-tested framework for creating these APIs, plus creating APIs for core.
This plugin provides an easy to use REST API, available via HTTP. Grab your site’s data in simple JSON format, including users, posts, taxonomies and more. Retrieving or updating data is as simple as sending a HTTP request.
Want to get your site’s posts? Simply send a GET request to /wp-json/wp/v2/posts. Update user with ID 4? Send a PUT request to /wp-json/wp/v2/users/4. Get all posts with the search term “awesome”? GET /wp-json/wp/v2/posts?filter[s]=awesome. It’s that easy.
The WordPress REST API exposes a simple yet easy interface to WP Query, the posts API, post meta API, users API, revisions API and many more. Chances are, if you can do it with WordPress, the API will let you do it.
The REST API also includes an easy-to-use JavaScript API based on Backbone models, allowing plugin and theme developers to get up and running without needing to know anything about the details of getting connected.
Check out our documentation for information on what’s available in the API and how to use it. We’ve also got documentation on extending the API with extra data for plugin and theme developers!
All tickets for the project are being tracked on GitHub. You can also take a look at the recent updates for the project.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon