[WordPress] 外掛分享: O3 CLI Services

前言介紹

  • 這款 WordPress 外掛「O3 CLI Services」是 2019-12-17 上架。
  • 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
  • 上一次更新是 2019-12-18,距離現在已有 1970 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

gwolfman |

外掛標籤

O3 CLI | testing | automation | quality assurance | regression testing |

內容簡介

目前版本的 O3 CLI 服務提供兩個 WordPress REST API 端點,以讓開發人員和 QA 工程師能夠查詢 WordPress 文章的 URL 路徑,而這些端點可以進行以下篩選:
文章類型、分類類型和選單。

使用方式

使用 /wp-json/o3-cli-api/url-sources API 端點來取得 URL 路徑的列表,
使用 /wp-json/o3-cli-api/urls API 端點來取得系統中文章的 URL 路徑列表,使用
你的篩選條件作為 URL 查詢參數篩選。

篩選條件如下:
– post_types
– 包含用逗號分隔的文章類型機器名稱的列表。
– categories
– 包含用逗號分隔的分類別名的列表。
– menus
– 包含用逗號分隔的選單別名的列表。
– limit
– 包含一個整數限制,用於控制每個機器名稱中返回的 URL 路徑的最大數量。

以下是一個範例請求:

GET http://example.com/wp-json/o3-cli-api/urls?post_types=post,product&categories=food,travel&menus=main-navigation,footer-menu&limit=50

上述範例請求將會返回機器名稱為「post」和「product」的文章 URL 路徑,
它們的分類別名為「food」和「travel」,選單別名為「main-navigation」和「footer-menu」。
與所有 WordPress REST API 端點一樣,上述請求返回 JSON 陣列。

O3 CLI 會自動產生像上述的請求,並使開發人員和 QA 工程師能夠動態生成視覺回歸測試,
以及其他相關需求。請到 https://www.npmjs.com/package/o3-cli 查看完整文件。

原文外掛簡介

In its current version, O3 CLI Services exposes two WordPress REST API endpoints
to empower developers and QA engineers to query URL paths of WordPress posts by
post types, category types, and menus.
Usage
Use the /wp-json/o3-cli-api/url-sources API endpoint to get a list of sources of
URL paths, and use the /wp-json/o3-cli-api/urls API to get a list of URL paths
of posts in the system, using your sources as URL query parameter filters.
Source filters for /wp-json/o3-cli-api/urls:
– post_types
– Include a comma-separated list of post type machine names.
– categories
– Include a comma-separated list of category slugs.
– menus
– Include a comma-separated list of menu slugs.
– limit
– Include an integer limit to control the maximum number of URL paths to
return for each machine name in any source.
An example request:
GET http://example.com/wp-json/o3-cli-api/urls?post_types=post,product&categories=food,travel&menus=main-navigation,footer-menu&limit=50
The above example requests the URL paths of posts of post types with the machine
names of ‘post’ and ‘product’, having categories with ‘food’ and ‘travel’ slugs,
as well as items in menus with ‘main-navigation’ and ‘footer-menu’ slugs. As
with any WordPress REST API endpoints, the above request returns a JSON array.
The O3 CLI automatically generates requests like the above, and it empowers
developers and QA engineers to dynamically generate visual regression tests,
among other needs. See the documentation at
https://www.npmjs.com/package/o3-cli.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「O3 CLI Services」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | 1.0.1 | 1.0.2 | trunk |

延伸相關外掛(你可能也想知道)

文章
Filter
Apply Filters
Mastodon