2017 © Pedro Peláez
 

library restful

Client for RESTful APIs, based on Guzzle's Client

image

kfreiman/restful

Client for RESTful APIs, based on Guzzle's Client

  • Friday, January 15, 2016
  • by k.freiman
  • Repository
  • 1 Watchers
  • 0 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

It is HTTP-client with main focus to the standart RESTful API., (*1)

Improvements, regarding the the Guzzle's Client:

Substitution params in URI by tokens

<?php
require 'vendor/autoload.php';

$client = new \kfreiman\restful\RestfulClient(
    [
        'base_uri' => 'https://api.example.com/3.0/',
        'headers' => [
            'Authorization' => 'Bearer my_token',
        ]
    ]
);

$responce = $client->get('lists/{list_id}/user/{user_id}', [
        'list_id' => 123,
        'user_id' => 1,
    ]);

$result = $responce->getBody()->getContents();

var_dump($result); // user object

The Versions

15/01 2016

dev-master

9999999-dev https://github.com/kfreiman/restful

Client for RESTful APIs, based on Guzzle's Client

  Sources   Download

MIT

The Requires

 

api restful client guzzle extensible