定制 rarst/wporg-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rarst/wporg-client

最新稳定版本:0.6

Composer 安装命令:

composer require rarst/wporg-client

包简介

Guzzle client for WordPress.org APIs

README 文档

README

Current version PHP required

WPorg Client is a standalone HTTP client for public WordPress.org API.

It aims to provide consistent centralized experience and is independent from WordPress core.

Installation

composer require rarst/wporg-client
$wporgClient  = \Rarst\Guzzle\WporgClient::getClient();

Examples

Core

$updates      = $wporgClient->getUpdates();
$updatesFor   = $wporgClient->getUpdates('4.0', 'en_US');
$translations = $wporgClient->getTranslations('4.1');
$credits      = $wporgClient->getCredits('4.1');
$checksums    = $wporgClient->getChecksums('4.1', 'en_US');

Themes

$theme        = $wporgClient->getTheme('twentyfifteen');
$translations = $wporgClient->getThemeTranslations('twentyfifteen', '1.0');

$popular      = $wporgClient->getThemesBy('browse', 'popular');
$featured     = $wporgClient->getThemesBy('browse', 'featured');
$new          = $wporgClient->getThemesBy('browse', 'new');
$updated      = $wporgClient->getThemesBy('browse', 'updated');
$search       = $wporgClient->getThemesBy('search', 'twenty');
$tagged       = $wporgClient->getThemesBy('tag', 'white');
$authors      = $wporgClient->getThemesBy('author', 'wordpressdotorg');

$featureList  = $wporgClient->getThemeFeatureList();

Plugins

$plugin       = $wporgClient->getPlugin('hello-dolly');
$stats        = $wporgClient->getPluginStats('hello-dolly');
$downloads    = $wporgClient->getPluginDownloads('hello-dolly', 7);
$translations = $wporgClient->getPluginTranslations('akismet', '3.0');

$popular      = $wporgClient->getPluginsBy('browse', 'popular');
$featured     = $wporgClient->getPluginsBy('browse', 'featured');
$new          = $wporgClient->getPluginsBy('browse', 'new');
$updated      = $wporgClient->getPluginsBy('browse', 'updated');
$search       = $wporgClient->getPluginsBy('search', 'dolly');
$tagged       = $wporgClient->getPluginsBy('tag', 'widget');
$authors      = $wporgClient->getPluginsBy('author', 'wordpressdotorg');

$importers    = $wporgClient->getImporters();
$tags         = $wporgClient->getHotTags();

Events

$location     = $wporgClient->getEvents(['location' => 'Seattle']));
$number       = $wporgClient->getEvents(['location' => 'Australia', 'number' => 5]));
$locale       = $wporgClient->getEvents(['timezone' => 'Europe/Berlin', 'locale' => 'de_DE', 'location' => 'Dresden']));
$coordinates  = $wporgClient->getEvents(['latitude' => '51.051', 'longitude' => '13.738']));
$ip           = $wporgClient->getEvents(['ip' => '136.0.16.1']));
$country      = $wporgClient->getEvents(['country' => 'IT']));

Other

Stats

$wordpress    = $wporgClient->getStats('wordpress');
$php          = $wporgClient->getStats('php');
$mysql        = $wporgClient->getStats('mysql');

Secret keys & salts

$secret       = $wporgClient->getSalt();

Browse happy

$browser      = $wporgClient->getBrowser('Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.17');

License

MIT

统计信息

  • 总下载量: 1.74k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 72
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 72
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固