Download the PHP package black-bits/laravel-api-consumer without Composer
On this page you can find all versions of the php package black-bits/laravel-api-consumer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download black-bits/laravel-api-consumer
More information about black-bits/laravel-api-consumer
Files in black-bits/laravel-api-consumer
Package laravel-api-consumer
Short Description Awesome Laravel Api Consumer
License MIT
Homepage https://github.com/black-bits/larave-api-consumer
Informations about the package laravel-api-consumer
API consumers for Laravel offering Eloquent style syntax
This Laravel package lets you generate API Consumers with Endpoints and Shapes which usage is similar to Laravel's Eloquent models.
You can generate one Consumer per API service you want to consume. Each Consumer can have any number of Endpoints with multiple Shapes.
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.
A Shape represents an Object returned by an Endpoint and allows you to e.g. transform or validate the Object's properties.
Disclaimer
This package is currently in development and is not production ready.
Installation
You can install the package via composer
Next you can publish the config
Usage
To make a new Api Consumer Service you can simply run
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
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
You can find an example implementation here: black-bits/laravel-api-consumer-showcase
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Oliver Heck
- Andreas Przywara
- Adrian Raeuchle
- All Contributors
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.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-api-consumer with dependencies
kitetail/zttp Version ^0.3.0
illuminate/support Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*