2017 © Pedro Peláez
 

library rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

image

someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  • Friday, April 20, 2018
  • by libern
  • Repository
  • 2 Watchers
  • 7 Stars
  • 4,133 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 12 Versions
  • 9 % Grown

The README.md

Someline Rest API Client

Latest Version Software License Total Downloads, (*1)

Someline Starter API Client is an elegant and smart Rest API Client with OAuth2 authentication support., (*2)

Build for Laravel and Someline Starter., (*3)

It can be used for accessing APIs created using Someline Starter framework., (*4)

Install

Via Composer

Install composer package to your laravel project, (*5)

``` bash composer require someline/rest-api-client, (*6)


Add Service Provider to `config/app.php` ``` php 'providers' => [ ... Someline\Rest\RestClientServiceProvider::class, ... ],

Publishing config file., (*7)

``` bash php artisan vendor:publish, (*8)


After published, config file for Rest Client is `config/rest-client.php`, you will need to config it to use Rest Client. ## Usage ``` php $restClient = new \Someline\Rest\RestClient('someline-starter'); $restClient->setOAuthUserCredentials([ 'username' => 'libern@someline.com', 'password' => 'Abc12345', ]); $restClient->withOAuthTokenTypeUser(); $response = $restClient->get("users")->getResponse(); if (!$restClient->isResponseStatusCode(200)) { $restClient->printResponseOriginContent(); $responseMessage = $restClient->getResponseMessage(); print_r($responseMessage); } else { $responseData = $restClient->getResponseData(); print_r($responseData); }

Testing

bash phpunit, (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

Credits

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

20/04 2018

dev-master

9999999-dev https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

20/04 2018

v1.2.2

1.2.2.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

01/09 2017

v1.2.1

1.2.1.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

26/01 2017

v1.1.6

1.1.6.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

08/09 2016

v1.1.5

1.1.5.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

31/08 2016

v1.1.4

1.1.4.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

24/08 2016

v1.1.3

1.1.3.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

24/08 2016

v1.1.2

1.1.2.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

24/08 2016

v1.1.1

1.1.1.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

24/08 2016

v1.1.0

1.1.0.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

24/08 2016

v1.0.1

1.0.1.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter

22/07 2016

v1.0.0

1.0.0.0 https://github.com/someline/rest-api-client

An elegant and smart Rest API Client with OAuth2 authentication support. Build for Laravel and Someline Starter.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api rest client oauth2 someline-starter