定制 barrelstrength/craftnet-php 二次开发

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

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

barrelstrength/craftnet-php

Composer 安装命令:

composer require barrelstrength/craftnet-php

包简介

A PHP library which implements the functionality of the Craftnet API

README 文档

README

A PHP library which implements the functionality of the Craftnet API. See the Craftnet API documentation for all available settings.

Installation

Add the library to your project via composer:

{
    "require": {
        "barrelstrength/craftnet-php": "{version}"
    }
}

Require the library in your project:

require __DIR__ . '/vendor/autoload.php';

Authentication

To authenticate with Craftnet set your username and apiKey values when instantiating a new CraftnetClient class.

use barrelstrength\craftnetphp\CraftnetClient;

$username = 'USERNAME';
$apiKey = 'API_KEY;

$client = new CraftnetClient($username, $apiKey);

Get all plugin licenses for the authenticated Craft ID user

$response = $client->pluginLicenses->get();

$pluginLicenses = $response->getBody()->getContents();

$results = json_decode($pluginLicenses);

Get a secondary page of plugin licenses for the authenticated Craft ID user

$response = $client->pluginLicenses->get([
  'page' => 2
]);

$pluginLicenses = $response->getBody()->getContents();

$results = json_decode($pluginLicenses);

Get a specific plugin license for the authenticated Craft ID user

<?php
$response = $client->pluginLicenses->get([
    'key' => 'P8GQRVQO5MK9Q673U0IJZ2I3'
]);

$pluginLicense = $response->getBody()->getContents();

$result = json_decode($pluginLicense)

Create a new license for a given Craft ID user

$response = $client->pluginLicenses->create([
  'edition' => 'standard',
  'plugin' => 'sprout-forms',
  'email' => 'sprout@barrelstrengthdesign.com'
]);

$pluginLicense = $response->getBody()->getContents();

$result = json_decode($pluginLicense)

统计信息

  • 总下载量: 757
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固