clever / clever-php
Installs: 1 496
Dependents: 0
Suggesters: 0
Security: 0
Stars: 23
Watchers: 68
Forks: 23
Open Issues: 0
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-11-05 22:36:15 UTC
README
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.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.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/clever/clever-php" } ], "require": { "clever/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 clever/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
-
Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen)
-
Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api)
-
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
- Run
make override
to copy over the override files
Publishing
- Update CHANGELOG
git tag -a vX.X.X
git push --tags origin HEAD:master
- Log into Packagist (credentials are in 1PFT) and click "Update"