Download the PHP package rips/connector without Composer

On this page you can find all versions of the php package rips/connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package connector

RIPS Connector

A simple PHP interface for easy access to the RIPS API.

Installation

Use composer to include the package:

composer require rips/connector:~3.4

OR add the following to composer.json and run composer update

"rips/connector": "~3.4"

Usage

use RIPS\Connector\API;
use RIPS\Connector\Exceptions\ClientException;
use RIPS\Connector\Exceptions\ServerException;

$config = ['base_uri' => 'http://localhost:8000'];

// Initialize with config in constructor
$api = new API('email', 'password', $config);

// Or initialize manually
$api = new API();
$api->initialize('email', 'password', $config);

try {
    // Get all users
    $users = $api->users->getAll()->getDecodedData();

    // Create new organization
    $org = $api->orgs->create([
        'name'       => 'My New Org',
        'validUntil' => '2018-08-03T15:23:04.286Z'
    ]);
} catch (ClientException $e) {
    // 400 error
} catch (ServerException $e) {
    // 500 error
}

Most methods will return a Response object. To get the actual data call the method getDecodedData(). This returns either a stdClass object or an array of stdClass objects.

Config/Options

The following config options are available:

'base_uri' (required, default: http://localhost:8080): API URL
'timeout' (optional, default: 100): Timeout of request in seconds
'connect_timeout' (optional, default: 10): Number of seconds to wait while trying to connect to server
'oauth2' (optional): OAuth2 configuration, see OAuth2 Config

OAuth2Config

The following options are available as associative array under the oauth2 key:

'enabled' (required): Use OAuth2 instead of legacy auth
'client_id' (required): Client id for the login client
'store_token' (optional, default: false): Flag if the OAuth2 tokens should be stored on disk
'token_file_path' (optional): The file location for the token file
'access_token' (optional, default: ""): If already present a accesstoken to use for login

Testing

Testing is done with phpunit. You can install phpunit globally or use the composer installed executable in vendor/bin/phpunit.

Abstract classes use stubs found in test/Stubs.

Run the tests by executing phpunit in the root directory of the project:

With global install:

phpunit

With composer install:

vendor/bin/phpunit

All versions of connector with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
guzzlehttp/guzzle Version ~6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rips/connector contains the following files

Loading the files please wait ....