承接 classifylearning/clever 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

classifylearning/clever

最新稳定版本:v3.0.1

Composer 安装命令:

composer require classifylearning/clever

包简介

README 文档

README

Classify Learning still needed to use the Clever PHP SDK with its main application on PHP v8. We have updated this package to support our needs, but there is more work to do.

This repo is no longer maintained by Clever. We provide the Swagger definitions at https://github.com/Clever/swagger-api.

clever-php

The Clever API

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.1.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 7.4.0 and later

API Documentation

View more detailed documentation here

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/classifylearning/clever-php"
        }
    ],
    "require": {
       "classifylearning/clever": "*"
    }
}

Then run composer install

Note that it is necessary to include the vcs link to be sure that you are pulling from this repo.

The package manager for composer currently does not point to the correct repo for classifylearning/clever-php.

We are published as clever/clever.

Manual Installation

Download the files and include autoload.php:

require_once('/path/to/clever-php/autoload.php');

Tests

To run the unit tests:

make test

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once('./autoload.php');

$api_instance = new Clever\Api\DataApi();

// Note: This is hard coded for demo purposes only. Keep your access tokens secret!
// https://dev.clever.com/docs/security#section-security-best-practices
$api_instance->getConfig()->setAccessToken('TEST_TOKEN');

try {
    $result = $api_instance->getStudents();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DataApi->getStudents: ', $e->getMessage(), PHP_EOL;
}

?>

Updating the Library

  1. Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen)

  2. Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api)

  3. Run this command in the swagger-codegen repo

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i $PATH_TO_SWAGGER_API_REPO/v2.0-client.yml -c $PATH_TO_THIS_REPO/override/config.json -l php -o $PATH_TO_THIS_REPO --additional-properties packageVersion=$VERSION
  1. Run make override to copy over the override files

Publishing

  1. Update CHANGELOG
  2. git tag -a vX.X.X
  3. git push --tags origin HEAD:master
  4. Log into Packagist (credentials are in 1PFT) and click "Update"

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-07-03