
內容簡介
使用通過驗證的令牌請求,將 REST API 的回應作為 JSON 發送到 Android 應用程序。
AndroPress 是從您的網站使用 REST 服務安全地請求和接收 JSON 數據到 Android 應用程序的方法。
您可以請求以下數據:
分類:https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=category
最新文章:https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post
分類文章:https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&category_name=CATEGORY_NAME
搜索結果:https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&s=SEARCH_QUERY
帶有位移量的文章:https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&offset=OFFSET_VALUE
帶有每頁文章數的文章:https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&posts_per_page=NO_OF_POSTS
注意:您可以使用多個參數進行請求。例如,您可以在 URL 中傳遞 “category_name” 和 “posts_per_page”。
外掛標籤
開發者團隊
原文外掛簡介
Get REST API response as JSON to android app, using token authenticated request .
AndroPress is a secure way of requesting and receiving JSON data from your website to android app using REST service .
You can request for :
categories : https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=category
latest posts : https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post
category posts : https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&category_name=CATEGORY_NAME
search result : https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&s=SEARCH_QUERY
posts with offset : https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&offset=OFFSET_VALUE
posts with posts_per_page : https://yoursite.com/wp-admin/admin-post.php?action=andropress_rest_api&key=YOUR_APP_KEY&title=post&posts_per_page=NO_OF_POSTS
Note : You can request with multiple parameters. For example you can pass ‘category_name’ as well as ‘posts_per_page’ in the url.
