freemius/php-sdk
最新稳定版本:1.1.0
Composer 安装命令:
composer require freemius/php-sdk
包简介
Freemius PHP SDK
关键字:
README 文档
README
This SDK is a wrapper for accessing the API. It handles the endpoint's path and authorization signature generation.
As a plugin or theme developer using Freemius, you can access your data via the developer scope or plugin scope.
If you only need to access one product, we recommend using the plugin scope. You can get the product's credentials in SETTINGS -> Keys.
If you need to access multiple products, use the developer scope. To get your credentials, click on My Profile at the top right menu and you'll find it in the Keys section.
define( 'FS__API_SCOPE', 'developer' ); define( 'FS__API_ENTITY_ID', 1234 ); define( 'FS__API_PUBLIC_KEY', 'pk_YOUR_PUBLIC_KEY' ); define( 'FS__API_SECRET_KEY', 'sk_YOUR_SECRET_KEY' ); // Init SDK. $api = new Freemius_Api(FS__API_SCOPE, FS__API_ENTITY_ID, FS__API_PUBLIC_KEY, FS__API_SECRET_KEY); // Get all products. $result = $api->Api('/plugins.json'); // Load 1st product data. $first_plugin_id = $result->plugins[0]->id; $first_plugin = $api->Api("/plugins/{$first_plugin_id}.json"); // Update title. $api->Api("/plugins/{$first_plugin_id}.json", 'PUT', array( 'title' => 'My New Title', ));
统计信息
- 总下载量: 5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 33
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2018-07-01