Download the PHP package mainstreamct/pettenvolk-api without Composer
On this page you can find all versions of the php package mainstreamct/pettenvolk-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mainstreamct/pettenvolk-api
More information about mainstreamct/pettenvolk-api
Files in mainstreamct/pettenvolk-api
Package pettenvolk-api
Short Description The official Laravel integration for the Pettenvolk API.
License AGPL-3.0-or-later
Informations about the package pettenvolk-api
Pettenvolk API for Laravel
Depreciation notice: the Pettenvolk API is moving to Laravel Passport authentication. For authenticating your users using their Pettenvolk account, refer to the Passport documentation. A complete overview of API endpoints for PettenvolkAPIv2.0 is now available at https://pettenvolk.com/developer/pettenvolk-api.
Recommended tools to complete this integration:
βπΆπ»β°
This is the official package to integrate the Pettenvolk API (a.k.a. Chameleon) with your Laravel application. API keys can be acquired using the Pettenvolk Developer Tools at https://www.pettenvolk.com/developer (currently only available to invited testers). Docs for this API can be found at https://chameleon.pettenvolk.com.
Table of contents
- Installation
- Using Composer
- Configuration
- Usage
- Authentication
- Fetching users
- Authentication
- Bugs
- Some final notes
Installation
Using Composer
First of all, install the package. Y'all know the drill, but as a reminder:
After installing, edit your config/app.php:
...and execute the following command:
Configuration
- Get your API key at https://www.pettenvolk.com/developer
- Create
PETTENVOLK_API_KEY
in your .env file and store the API key in it
Usage
Authentication
Before you can authenticate users using the Pettenvolk API, you must add two lines to your create_users_table migration (or add the corresponding columns to your Users table):
Note that this API token is reset at login and is required to perform any other interaction with the API, so store it carefully.
Authenticating users with Pettenvolk Passport is a breeze. For authentication using only Pettenvolk Passport, you could do something like this:
Fetching users
Getting a user's details from the API is easy:
This returns a user's , , , (background image), , (boolean), , and . Please note that in order to perform this request, a user needs to be logged in and have an API token. This token can optionally be passed by including an parameter (it's taken from the Auth facade by default).
Bugs
Found a bug? Message us at [email protected] or fill out the bug report form in your Pettenvolk Tester Environment.
Some final notes
This API is constantly monitored and implementations are often checked on compliance to the API terms. We store every request made to this API, together with some additional details like returned status codes, in order to ensure the best possible experience when using our API service.
Want to know how to fully comply to the API terms? Read https://www.pettenvolk.com/legal/api for more information.
Copyright Β© 2018 MainstreamCT
This package is published under the GNU AGPLv3 license. Additional API terms apply.