2017 © Pedro Peláez
 

library machina-client

Client package for code16/machina

image

code16/machina-client

Client package for code16/machina

  • Thursday, March 22, 2018
  • by code16
  • Repository
  • 2 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 33 % Grown

The README.md

Machina Client

"code16/machina-client" is aimed to be used for implementing client to communicate with JSON APIs protected with the Code16/Machina JWT Token authentication guard. It's a simple wrapper around GuzzleHttp and takes cares of querying/refreshing JWT token for you., (*1)

Installation

    composer require code16/machina-client

Usage


$client = new \Code16\MachinaClient\MachinaClient; $client->setBaseUrl("https://example.com/api"); $client->setCredentials([ "client" => "some-client-key", "secret" => "some-secret-key", ]); try { $client->get("/foo"); // ['foo => bar']; } catch(\Code16\MachinaClient\Exceptions\InvalidCredentialsException $e) { // Incorrect credentials }

License

(c) 2018 code16.fr, (*2)

MIT, (*3)

The Versions

22/03 2018

dev-master

9999999-dev https://github.com/machina-client

Client package for code16/machina

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rémi Collin

laravel api auth jwt