Download the PHP package forward-force/daxko-api-sdk without Composer
On this page you can find all versions of the php package forward-force/daxko-api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download forward-force/daxko-api-sdk
More information about forward-force/daxko-api-sdk
Files in forward-force/daxko-api-sdk
Package daxko-api-sdk
Short Description PHP Wrapper around Daxko API
License MIT
Informations about the package daxko-api-sdk
Daxko API - PHP SDK
This is a wrapper around Daxko API. The API is very minimal, so this implementation is fairly simple.
Installation
Install via composer as follows:
Usage
Authentication
Daxko client relies on the access_token
returned by auth request to
Daxko authentication endpoint to
access the API.
Requesting access_token
using Daxko client:
The access_token
returned by getToken
can then be used to create a new
client instance:
To avoid requesting a new token everytime a new client is needed, the token can be stored(encrypted) in some data store(Redis, Session, etc..).
Refreshing the access_token
using refresh_token
from a previous authentication
Daxko Classes
Get all classes for a given location and specific date range:
Get a single class by ID:
Getting the value of a given field is as easy as accessing the class
instance
property:
Handling errors
All Daxko entities inherit from DaxkoEntity
class, which provide a
hasErrors()
and getErrors()
method that can be used to verify if the
client receive a successful response from the API:
Contributions
To run locally, you can use the docker container provided here. You can run it like so:
Then you can ssh into the php-fpm
container. Please note, you need to set your DAXKO API key and SECRET as
environmental variables $DAXKO_TOKEN
and $DAXKO_SECRET
respectively. However, the secret is not needed at this time
you could set it to anything.
xdebug
is fully configured to work as cli, hookup your favorite IDE to it and debug away!
There is auto-generated documentation as to how to run this library on local, please take a look at phpdocker/README.md
If you find an issue, have a question, or a suggestion, please don't hesitate to open a github issue.
Acknowledgments
Thank you to phpdocker.io for making getting PHP environments effortless!