2017 © Pedro Peláez
 

library laravel-api-consumer

Awesome Laravel Api Consumer

image

black-bits/laravel-api-consumer

Awesome Laravel Api Consumer

  • Monday, June 4, 2018
  • by aprzywara
  • Repository
  • 5 Watchers
  • 15 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 380 % Grown

The README.md

API consumers for Laravel offering Eloquent style syntax

Latest Version on Packagist Total Downloads, (*1)

This Laravel package lets you generate API Consumers with Endpoints and Shapes which usage is similar to Laravel's Eloquent models., (*2)

You can generate one Consumer per API service you want to consume. Each Consumer can have any number of Endpoints with multiple Shapes., (*3)

An Endpoint represents e.g. a resource on a REST API like /users. Endpoints return Collections of Shapes. You can model the methods the API offers here., (*4)

A Shape represents an Object returned by an Endpoint and allows you to e.g. transform or validate the Object's properties., (*5)

Disclaimer

This package is currently in development and is not production ready., (*6)

Installation

You can install the package via composer, (*7)

composer require black-bits/laravel-api-consumer

Next you can publish the config, (*8)

php artisan vendor:publish --provider="BlackBits\ApiConsumer\ApiConsumerServiceProvider"

Usage

To make a new Api Consumer Service you can simply run ``` bash php artisan make:api-consumer ConsumerName, (*9)


To add an endpoint (e.g. UserEndpoint) to this service run the following command, this will also create a default shape (UserShape) for that Endpoint ``` bash php artisan make:api-consumer-endpoint UserEndpoint -c ConsumerName

To add a custom Collection Callback run the following command. You can use this e.g. to create a filter that only shows Users that receive a newsletter ``` bash php artisan make:api-consumer-collection-callback ReceivesNewsletter, (*10)


You can find an example implementation here: [black-bits/laravel-api-consumer-showcase](https://github.com/black-bits/laravel-api-consumer-showcase) ### Testing ``` bash composer test

Changelog

Please see CHANGELOG for more information on what has changed recently., (*11)

Security

If you discover any security related issues, please email hello@blackbits.io instead of using the issue tracker., (*12)

Credits

Support us

Black Bits, Inc. is a web and consulting agency specialized in Laravel and AWS based in Grants Pass, Oregon. You'll find an overview of what we do on our website., (*13)

License

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

The Versions

04/06 2018

dev-master

9999999-dev https://github.com/black-bits/larave-api-consumer

Awesome Laravel Api Consumer

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blackbits laravel api consumer api consumer

04/06 2018

0.2.2

0.2.2.0 https://github.com/black-bits/larave-api-consumer

Awesome Laravel Api Consumer

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blackbits laravel api consumer api consumer

29/05 2018

0.2.1

0.2.1.0 https://github.com/black-bits/larave-api-consumer

Awesome Laravel Api Consumer

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blackbits laravel api consumer api consumer

28/05 2018

0.2.0

0.2.0.0 https://github.com/black-bits/larave-api-consumer

Awesome Laravel Api Consumer

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blackbits laravel api consumer api consumer

28/05 2018

0.1.0

0.1.0.0 https://github.com/black-bits/larave-api-consumer

Awesome Laravel Api Consumer

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blackbits laravel api consumer api consumer