Download the PHP package creads/partners-api without Composer

On this page you can find all versions of the php package creads/partners-api. 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 partners-api

creads/partners-api

A simple PHP client and CLI for Creads Partners API.

We recommend to read the Full API Documentation first.

Build Status Code Climate Downloads Release
Build Status Maintainability Total Downloads Latest Unstable Version

Pingdom Status

Use the library in your project

Installation

The recommended way to install the library is through Composer.

Install Composer:

Run the Composer command to install the latest stable version:

Usage

After installing, you need to require Composer's autoloader:

First you need to instantiate the Client with an OAuthAuthentication

Or if you have an access token from somewhere else:

Get information about the API:

Get information about me:

Update my firstname:

Delete a comment of mine:

Create a project:

Upload a file:

The response will expose a Location header containing the file url. This url is what you need to reference in a resource to which you want to link this file

Download a file:

Errors and exceptions handling

When HTTP errors occurs (4xx and 5xx responses) , the library throws a GuzzleHttp\Exception\ClientException object:

If you prefer to disable throwing exceptions on an HTTP protocol error:

Webhooks

You can check the validity of a webhook signature easily:

Use the CLI application

Installation

If you don't need to use the library as a dependency but want to interract with Cread Partners API from your CLI. You can install the binary globally with composer:

composer global require creads/partners-api:@dev

Then add the bin directory of composer to your PATH in your ~/.bash_profile (or ~/.bashrc) like this:

export PATH=~/.composer/vendor/bin:$PATH

You can update the application later with:

composer global update creads/partners-api

Usage

Get some help:

bin/partners --help

Log onto the API (needed the first time):

bin/partners login

Avoid to type your password each time token expires, using "client_credentials" grant type:

bin/partners login --grant-type=client_credentials

Or if you are not allowed to authenticated with "client_credentials", save your password locally:

bin/partners login --save-password

Get a resource:

bin/partners get /

Including HTTP-headers in the output with -i:

bin/partners get -i /

Filtering result thanks to JSON Path (see http://goessner.net/articles/JsonPath). For instance, get only the version number of the API:

bin/partners get / -f '$.version'

Or get the organization I am member of:

bin/partners get /me -f '$.member_of.*.organization'

Create a resource:

...

Update a resource:

...

Update a resource using an editor:

bin/partners get /me | vim - | bin/partners post /me

Update a resource using Sublime Text:

bin/partners get /me | subl - | bin/partners post /me

All versions of partners-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
guzzlehttp/guzzle Version ^6.0
symfony/console Version >=2.7
flow/jsonpath Version ^0.3.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 creads/partners-api contains the following files

Loading the files please wait ....