accredible/acms-api-php

PHP 封装 Accredible ACMS API

v0.2.4 2017-12-08 10:59 UTC

This package is not auto-updated.

Last update: 2024-09-26 06:33:28 UTC


README

Accredible Logo

Accredible API PHP SDK

Build Status

概述

Accredible 平台使组织能够创建、管理和分发数字证书或开放徽章形式的数字证书。

一个示例数字证书和徽章可以在此查看:https://www.credential.net/10000005

此 Composer 包将 Accredible API 封装在 PHP 中,以便轻松集成到项目中。完整的 REST API 文档可以在此找到:http://docs.accrediblecredentialapi.apiary.io/

示例输出

Example Digital Certificate

Example Open Badge

安装

composer require accredible/acms-php-api dev-master

用法

use ACMS\Api; 添加到您想使用 API 的类中。

use ACMS\Api;

// Instantiate the API instance replacing APIKey with your API key
$api = new Api("APIKey");

// Get a Credential
$api->get_credential(10000005);

// Get an array of Credentials 
$api->get_credentials(null, "john@example.com");

// Create a Credential - Name, Email, Group ID
$api->create_credential("John Doe", "john@example.com", 54018);

// Update a Credential
$api->update_credential(10000005, "Jonathan Doe");

// Delete a Credential
$api->delete_credential(10000005);

// Get a Group
$api->get_group(100);

// Create a Group - Name, Course Name, Course Description, Course Link
$api->create_group("PHPTest", "Test course", "Test course description.", "http://www.example.com");

// Update a Group 
$api->update_group(100, 'PHPTest2');

// Delete a Group
$api->delete_group(100);

###错误报告

如果您发现任何错误,请随意在 GitHub 上创建一个问题。请尽可能提供尽可能多的信息,以帮助我们修复可能的错误。我们也鼓励您通过分支和发送拉取请求来进一步帮助。

https://github.com/accredible/acms-php-api/issues

许可证

此项目是开源软件,受 MIT 许可证许可。

待办事项