Download the PHP package gonebusy/gonebusy-php-client without Composer
On this page you can find all versions of the php package gonebusy/gonebusy-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gonebusy/gonebusy-php-client
More information about gonebusy/gonebusy-php-client
Files in gonebusy/gonebusy-php-client
Package gonebusy-php-client
Short Description This is a PHP client for communicating with the full Gonebusy API
License MIT
Homepage https://www.gonebusy.com
Informations about the package gonebusy-php-client
PHP SDK for the Gonebusy REST API
Sandbox
We have a Sandbox environment to play with!
To point at the Sandbox, just use sandbox.gonebusy.com instead of where you see beta.gonebusy.com referenced, including where to create an account to retrieve your API Key.
The Sandbox environment is completely separate from the Live site - that includes meaning your Sandbox API Key will not work in the Live environment.
How to Use
Summary of Gonebusy objects
(more info on the Developer Portal):
- A User is required to perform operations.
- A Resource (WHO) performs Services and is needed for all scheduling operations. Each User is assigned a default Resource (her/himself) automatically.
- A Service (WHAT) is performed by Resources according to a Schedule. Services are assigned a Pricing Model. Services can be assigned a Category as well.
- A Schedule (WHEN) defines when a Service is performed by a Resource. Pieces of a Schedule are called Time Windows.
- Finally, a Booking is placed (at a particular Time Window) in a Schedule, linking it to a Resource-Service combo.
- A Search of users and services can be performed.
API Key
If testing with Sandbox, Signup/Logon at https://sandbox.gonebusy.com/login.
If using Production site, Signup/Logon at https://beta.gonebusy.com/login.
Once logged in, navigate to the API Key page and request an API key.
Initialization/Authentication
In order to setup authentication and initialization of the API client, you need the following information.
Parameter | Description |
---|---|
authorization | Set Authorization to "Token your API key" |
API client can be initialized as following.
How to Build
Composer Install
[For Windows Users Only] Configuring CURL Certificate Path in php.ini
CURL used to include a list of accepted CAs, but no longer bundles ANY CA certs. So by default it will reject all SSL certificates as unverifiable. You will have to get your CA's cert and point curl at it. The steps are as follows:
- Download the certificate bundle (.pem file) from https://curl.haxx.se/docs/caextract.html on to your system.
- Add curl.cainfo = "PATH_TO/cacert.pem" to your php.ini file located in your php installation. “PATH_TO” must be an absolute path containing the .pem file.
How to Test
Unit tests in this SDK can be run using PHPUnit. The test cases are located in the test/Controllers/ dir.
- Make sure you've installed the dependencies using composer including the
require-dev
dependencies. - Run
vendor/bin/phpunit
from command line to execute the test suite. See https://phpunit.de/manual/current/en/textui.html for info on test output format as well as more command-line options. - Optionally, to check the code standards you may run
vendor/bin/phpcs
(Seephpcs.xml
). (No output means no problems.)
Class Reference
List of Controllers
- BookingsController
- CategoriesController
- PricingModelsController
- ResourcesController
- SchedulesController
- SearchController
- ServicesController
- UsersController
BookingsController
Get singleton instance
The singleton instance of the class can be accessed from the API Client.
getBookings
Return list of Bookings.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | A valid API key, in the format 'Token API_KEY' | |
page | Page offset to fetch. | |
perPage | Number of results to return per page. | |
states | Comma-separated list of Booking states to retrieve only Bookings in those states. Leave blank to retrieve all Bookings. | |
userId | Retrieve Bookings for Resources/Services owned by this User Id. You must be authorized to manage this User Id. | |
bookerId | Retrieve Bookings made by Booker Id. |
Example Usage
Errors
Error Code | Error Description |
---|---|
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
createBooking
Create a Booking with params
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | A valid API key, in the format 'Token API_KEY' | |
createBookingBody | the content of the request |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
422 | Unprocessable Entity |
0 | Unexpected error |
getBookingById
Return a Booking by id.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | A valid API key, in the format 'Token API_KEY' | |
id | TODO: Add a parameter description |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
updateBookingById
Update a Booking by id
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | A valid API key, in the format 'Token API_KEY' | |
id | TODO: Add a parameter description | |
updateBookingByIdBody | the content of the request |
Example Usage
php
function cancelBookingById(
$authorization,
$id,
$cancelRecurring = null,
$date = null,
$endDate = null)
Required Required Optional Optional Optional CategoriesController Required Optional DefaultValue Optional DefaultValue Optional Required Optional Required Required PricingModelsController Required Optional DefaultValue Optional DefaultValue Optional Required Optional Required Required Required Required Optional ResourcesController Required Optional DefaultValue Optional DefaultValue Optional Required Optional Required Optional DefaultValue Optional DefaultValue Required Required Required Required Optional Required Required SchedulesController Required Optional DefaultValue Optional DefaultValue Optional Required Optional Required Required Required Required Required Required Optional Required Required Required Optional Required Required Required SearchController Required Required ServicesController Required Optional DefaultValue Optional ``` DefaultValue
| Number of results to return per page. |
| userId | Optional
| Retrieve Services provided by the User specified by Id. You must be authorized to manage this User Id. |
Example Usage
Errors
Error Code | Error Description |
---|---|
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
createService
Create a Service with params.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
createServiceBody | Optional |
the content of the request |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
422 | Unprocessable Entity |
0 | Unexpected error |
getServiceAvailableSlotsById
Return available times for a Service.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
id | Required |
TODO: Add a parameter description |
date | Optional |
Date to check for availability. Either this field or a date range employing start_date and end_date must be supplied. If date is provided, start_date/end_date are ignored. Several formats are supported: '2014-10-31', 'October 31, 2014'. |
endDate | Optional |
End Date of a range to check for availability. If supplied, date must not be supplied and start_date must be supplied. Several formats are supported: '2014-10-31', 'October 31, 2014'. |
startDate | Optional |
Start Date of a range to check for availability. If supplied, date must not be supplied and end_date must be supplied. Several formats are supported: '2014-10-31', 'October 31, 2014'. |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
getServiceById
Return a Service by id.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
id | Required |
TODO: Add a parameter description |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
updateServiceById
Update a Service with params.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
id | Required |
TODO: Add a parameter description |
updateServiceByIdBody | Optional |
the content of the request |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
422 | Unprocessable Entity |
0 | Unexpected error |
deleteServiceById
Delete a Service by id
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
id | Required |
TODO: Add a parameter description |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
Back to List of Controllers
UsersController
Get singleton instance
The singleton instance of the UsersController
class can be accessed from the API Client.
getUsers
Return all Users that your account has access to. Includes your own User as well as any Users for which you are the Account Manager.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
page | Optional DefaultValue |
Page offset to fetch. |
perPage | Optional DefaultValue |
Number of results to return per page. |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
0 | Unexpected error |
createUser
Create a User
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
createUserBody | Optional |
the content of the request |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
422 | Unprocessable Entity |
0 | Unexpected error |
getUserById
Return a User by id.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
id | Required |
TODO: Add a parameter description |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
0 | Unexpected error |
updateUserById
Update a User by id, with params.
Parameters
Parameter | Tags | Description |
---|---|---|
authorization | Required |
A valid API key, in the format 'Token API_KEY' |
id | Required |
TODO: Add a parameter description |
updateUserByIdBody | Optional |
the content of the request |
Example Usage
Errors
Error Code | Error Description |
---|---|
400 | Bad Request |
401 | Unauthorized/Missing Token |
403 | Forbidden |
404 | Not Found |
422 | Unprocessable Entity |
0 | Unexpected error |
Back to List of Controllers
All versions of gonebusy-php-client with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
mashape/unirest-php Version ~3.0.1
apimatic/jsonmapper Version ~1.2.0