Git Product home page Git Product logo

clever-php's Introduction

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

  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"

clever-php's People

Contributors

anthony-webart avatar bgveenstra avatar bretterer avatar dccarroll avatar dependabot-preview[bot] avatar episod avatar fixedd avatar henderjon avatar jefff avatar kvigen avatar meliaj avatar peter-wd avatar peterst avatar rgarcia avatar supremelordcommander avatar tokersey avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.