All Projects → rap2hpoutre → jacky

rap2hpoutre / jacky

Licence: MIT license
🐄 HTTP JSON API Client for Laravel & Lumen

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to jacky

yelp-ios
No description or website provided.
Stars: ✭ 61 (+258.82%)
Mutual labels:  api-client
JSON-API-Client
Abstract client-side php implementation of the json api specification (jsonapi.org)
Stars: ✭ 17 (+0%)
Mutual labels:  api-client
laravel-lumen-mysql-encryption
Database fields encryption in laravel and lumen for mysql databases with native search.
Stars: ✭ 20 (+17.65%)
Mutual labels:  lumen
guzzle-oauth2-subscriber
OAuth 2.0 Client for Guzzle 4, 5, 6 and 7 with PHP 5.4 - PHP 8.0 - no more dependency hell!
Stars: ✭ 112 (+558.82%)
Mutual labels:  guzzle
qvapay-python
Non official, but friendly QvaPay library for the Python language.
Stars: ✭ 18 (+5.88%)
Mutual labels:  api-client
nis-python-client
Python client for NEM NIS API (https://nemproject.github.io). XEM\NEM\Crypto
Stars: ✭ 16 (-5.88%)
Mutual labels:  api-client
inspector-laravel
Connect your Laravel application to Inspector.
Stars: ✭ 164 (+864.71%)
Mutual labels:  lumen
guzzle-log-middleware
A Guzzle middleware to log request and responses automatically
Stars: ✭ 61 (+258.82%)
Mutual labels:  guzzle
Lumen-Doctrine-DDD-Example
Domain Driven Design Application Example, built with Lumen 5.3 and Doctrine.
Stars: ✭ 72 (+323.53%)
Mutual labels:  lumen
php-framework-benchmark
php framework benchmark (include laravel、symfony、silex、lumen、slim、yii2、tastphp etc)
Stars: ✭ 17 (+0%)
Mutual labels:  lumen
pinboard.net
Fully featured API wrapper for pinboard.in
Stars: ✭ 21 (+23.53%)
Mutual labels:  api-client
DummyJSON
DummyJSON provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend.
Stars: ✭ 213 (+1152.94%)
Mutual labels:  api-client
cells-client
Command line client to communicate with cells REST api.
Stars: ✭ 17 (+0%)
Mutual labels:  api-client
php-abraflexi
PHP Based Library for easy interaction with czech accounting system FlexiBee.
Stars: ✭ 15 (-11.76%)
Mutual labels:  api-client
my api client
A framework of Web API Client. Provides features error handling, retrying, pagination and so on.
Stars: ✭ 19 (+11.76%)
Mutual labels:  api-client
lumen-newrelic
New Relic instrumentation for the Lumen framework
Stars: ✭ 26 (+52.94%)
Mutual labels:  lumen
tempo-api-python-client
Python bindings for Tempo - https://apidocs.tempo.io/
Stars: ✭ 17 (+0%)
Mutual labels:  api-client
pyFireEye
Python API bindings for FireEye Products
Stars: ✭ 12 (-29.41%)
Mutual labels:  api-client
bitflyer-api-dotnet-client
bitFlyer HTTP APIs Client Library for .NET (C#)
Stars: ✭ 23 (+35.29%)
Mutual labels:  api-client
behat-3-kickstart
Behat 3/Mink and Guzzle for API testing. Code follows PageObjects approach. Saucelabs integration.
Stars: ✭ 13 (-23.53%)
Mutual labels:  guzzle

Jacky

Packagist Software License Build Status Quality Score SensioLabsInsight

JSON API Client for Laravel and Lumen. It's basically just a Guzzle wrapper for JSON, because Guzzle does not care about JSON anymore. And you can configure your endpoints once and for all in a configuration file, could be useful if you work with different services.

Install

Install via composer

composer require rap2hpoutre/jacky

Add Service Provider to config/app.php in providers section

Rap2hpoutre\Jacky\ServiceProvider::class,

Then add the facade in aliases section (optional)

'Jacky' => Rap2hpoutre\Jacky\Facade::class,

Publish configuration

php artisan vendor:publish

Usage

Simple example

Let's say foo API returns this on GET /users/1:

{
  "data": [{
    "name": "John Doe",
    "email": "[email protected]"
  }]
}

You may get the user like this:

$user_name = Jacky::get('foo', '/users/1')->data->first()->name;

Not found example

Let's say foo API returns this on GET /users/2 not found:

{
  "errors": [{
    "status": "404",
    "title":  "User not found :/"
  }]
}

You may display error title like this:

use Rap2hpoutre\Jacky\Exception\Http404Exception;

try {
    $user = Jacky::get('foo', '/users/1');
} catch (Http404Exception $e) {
    echo $e->errors->first()->title;
}

Configuration

You can learn more about configuration here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].