https://github.com/appointmind/api
A library integrating the Appointmind API
https://github.com/appointmind/api
api api-client appointment json-api json-rpc online saas scheduler scheduling
Last synced: 5 months ago
JSON representation
A library integrating the Appointmind API
- Host: GitHub
- URL: https://github.com/appointmind/api
- Owner: appointmind
- Created: 2018-01-28T02:29:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-03T10:19:53.000Z (about 7 years ago)
- Last Synced: 2024-12-07T20:44:41.884Z (over 1 year ago)
- Topics: api, api-client, appointment, json-api, json-rpc, online, saas, scheduler, scheduling
- Language: PHP
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Getting started
=
Appointmind is an [online appointment scheduling](https://www.appointmind.com "Online Appointment Scheduling") service. **appointmind/api** is an API client, written in PHP and using Zend Framework components, that alllows you to create users and appointments, and login users via single sign-on.
Features
-
- Create users
- Create appointments
- Single sign-on
Install with composer
-
```bash
composer require appointmind/api
```
Use
-
```php
$user = new \Appointmind\User();
$user->setUri('...');
$user->setAccessKey('...');
$user->setSecretKey('...');
$result = $user->create([]);
```
Response
```json
{
"result": {
"userId": "123456789"
},
"error": null,
"id": 1,
"jsonrpc": "2.0"
}
```
Login User
-
```php
$user = new \Appointmind\User();
$user->setUri('...');
$user->setAccessKey('...');
$user->setSecretKey('...');
$result = $user->login('info@example.com', $redirect = 'https://www.example.com/redirect/');
```
Response
```json
{
"result": {
"token": "2c3373ea2cf25743376fce78ef23383a651654b6802c965aa38ab5fd3b4863a3",
"url": "https://www.example.com/login/?token=2c3373ea2cf25743376fce78ef23383a651654b6802c965aa38ab5fd3b4863a3&singlesignon=1"
},
"error": null,
"id": 1,
"jsonrpc": "2.0"
}
```