2017 © Pedro Peláez
 

library tyr-component

PHP library which makes curl calls to Tyr API.

image

canaltp/tyr-component

PHP library which makes curl calls to Tyr API.

  • Monday, February 20, 2017
  • by packagistctp
  • Repository
  • 31 Watchers
  • 1 Stars
  • 1,889 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 21 Versions
  • 8 % Grown

The README.md

Tyr Component

PHP library which makes curl calls to Tyr API., (*1)

Supports Guzzle3 and Guzzle5 since version 1.2., (*2)

Composer

Install via composer, (*3)

``` js { "require": { "canaltp/tyr-component": "~1.2" } }, (*4)



## Usage Instanciate TyrService as a plain PHP object: ``` php $tyrUrl = 'http://tyr.dev.canaltp.fr/v0/'; $endPointId = 2; // Instanciating api $tyrApi = new CanalTP\TyrComponent\TyrService($tyrUrl, $endPointId); // For Guzzle5 $tyrApi = new CanalTP\TyrComponent\Guzzle3\TyrService($tyrUrl, $endPointId); // For Guzzle3 // Creating request $user = $tyrApi->createUser('email', 'login'); // Get last Guzzle response instance (usefull to get status code...) $response = $tyrApi->getLastResponse(); $statusCode = $response->getStatusCode();

See full Tyr class., (*5)

Testing

Mock Guzzle client:, (*6)

``` php $tyrUrl = 'http://tyr.dev.canaltp.fr/v0/'; $endPointId = 2;, (*7)

$tyrApi = new CanalTP\TyrComponent\TyrService($tyrUrl, $endPointId); // For Guzzle5 $tyrApi = new CanalTP\TyrComponent\Guzzle3\TyrService($tyrUrl, $endPointId); // For Guzzle3, (*8)

// Creating GuzzleHttp\Client mock..., (*9)

$tyrApi->setClient($mockedClient); ```, (*10)

License

This project is under GPL-3.0 License., (*11)

The Versions

20/02 2017

dev-master

9999999-dev https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

20/02 2017

1.3.2

1.3.2.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

06/01 2017

1.3.1

1.3.1.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

06/01 2017

dev-change-require-guzzle

dev-change-require-guzzle https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

27/04 2016

1.3.0

1.3.0.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

04/03 2016

1.2.9

1.2.9.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

25/02 2016

1.2.8

1.2.8.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

25/02 2016

1.2.7

1.2.7.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

08/02 2016

1.2.6

1.2.6.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

11/12 2015

1.2.5

1.2.5.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

09/12 2015

1.2.4

1.2.4.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

23/11 2015

1.2.3

1.2.3.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

12/11 2015

1.2.2

1.2.2.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

10/11 2015

1.2.1

1.2.1.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

06/11 2015

1.2.0

1.2.0.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

php tyr

21/08 2015

1.1.1

1.1.1.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

php tyr

21/08 2015

1.1.2

1.1.2.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

php tyr

21/08 2015

1.1.3

1.1.3.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

php tyr

29/07 2015

1.1.0

1.1.0.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

php tyr

28/07 2015

1.0.1

1.0.1.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

php tyr

28/07 2015

1.0.0

1.0.0.0 https://github.com/CanalTP/TyrComponent

PHP library which makes curl calls to Tyr API.

  Sources   Download

GPL-3.0

The Requires

 

php tyr