-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbooked-api-config.php
More file actions
117 lines (112 loc) · 5.38 KB
/
Copy pathbooked-api-config.php
File metadata and controls
117 lines (112 loc) · 5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
/**
* Title: booked-php-api-client
* Ver: 0.1.1 Alpha
* By: Ryan C Crawford
* Email: ryan@mytrueserenity.com
*
* This file is part of Booked PHP Client Library.
* There are other files that make up the whole library
* and that are dependent on this file or that this file is dependent on.
*
*
*/
namespace BookedAPI;
class config{
//Change these to match your server and time zone.
const YOURTIMEZONE = 'America/New_York';
//The FULL URL to the Booked Web/services/index.php file
const BOOKEDWEBSERVICESURL = 'http://localhost/booked/Web/services/index.php';
// End Points
const AUTHENTICATE = '/Authentication/Authenticate';
const GETRESOURCES = '/Resources/';
const GETRESERVATIONS = '/Reservations/';
const FILTERRESERVATION = '/Reservations';
const GETAVAILABILITY = '/Resources/Availability';
const GETACCESSORY = '/Accessories';
const GETCATATTRIBUTE = '/Attributes/Category';
const GETATTRIBUTE = '/Attributes';
const GETGROUPS = '/Groups';
const RESERVATIONS = '/Reservations/';
const SCHEDULES = '/Schedules/';
const SLOTS = '/Slots/';
const STATUS = '/Resources/Status';
const STATUSREASONS = '/Resources/Status/Reasons';
const RESOURCETYPES = '/Types/';
const USERS = '/Users';
const INTERVALHOURS = 'hours';
const INTERVALMINUTES = 'minutes';
const INTERVALDAYS = 'days';
// updateScope are this|full|future
const UPDATESCOPE_THIS = 'this';
const UPDATESCOPE_FULL = 'full';
const UPDATESCOPE_FUTURE = 'future';
// Recurrance Rule Const
const RECURRENCETYPE_DAILY = 'daily';
const RECURRENCETYPE_MONTHLY = 'monthly';
const RECURRENCETYPE_NONE = 'none';
const RECURRENCETYPE_WEEKLY = 'weekly';
const RECURRENCETYPE_YEARLY = 'yearly';
const RECURRENCE_MONTHLY_TYPE_DAYOFMONTH = 'dayOfMonth';
const RECURRENCE_MONTHLY_TYPE_DAYOFWEEK = 'dayOfWeek';
const RECURRENCE_MONTHLY_TYPE_NULL = null;
const RECURRENCE_WEEKDAY_SUN = 0;
const RECURRENCE_WEEKDAY_MON = 1;
const RECURRENCE_WEEKDAY_TUE = 2;
const RECURRENCE_WEEKDAY_WED = 3;
const RECURRENCE_WEEKDAY_THR = 4;
const RECURRENCE_WEEKDAY_FRI = 5;
const RECURRENCE_WEEKDAY_SAT = 6;
// Attibute Categories Enum
const ATT_CAT_RESERVATION = 1;
const ATT_CAT_USER = 2;
const ATT_CAT_RESOURCE = 4;
const ATT_CAT_RESOURCE_TYPE = 5;
// Attribute Types Enum
const SINGLE_LINE_TEXT = 1;
const SELECT_LIST = 3;
const MULTI_LINE_TEXT = 2;
const CHECK_BOX = 4;
//Other Settings
const TIMEOUT = 600;
const NUMBEROFRETRIES = 2;
const TIMEBETWEENRETRIES = 5;
public static $routes = array(
'doAuth'=>'/Authentication/Authenticate',
'getAllAccessories' => '/Accessories/',
'createCustomAttribute' => '/Attributes/',
'updateCustomAttribute' => '/Attributes/:attributeId',
'getCategoryAttributes' => '/Attributes/Category/:categoryId', //RESERVATION = 1, USER = 2, RESOURCE = 4
'getAttribute' => '/Attributes/:attributeId',
'deleteCustomAttribute' => '/Attributes/:attributeId',
'getAllGroups' => '/Groups/',
'getGroup' => '/Groups/:groupId',
'createReservation' => '/Reservations/',
'updateReservation' => '/Reservations/:referenceNumber',
'approveReservation' => '/Reservations/:referenceNumber/Approval',
'checkInReservation' => '/Reservations/:referenceNumber/CheckIn',
'checkOutReservation' => '/Reservations/:referenceNumber/CheckOut',
'getAllReservations' => '/Reservations/',
'getReservation' => '/Reservations/:referenceNumber',
'deleteReservation' => '/Reservations/:referenceNumber',
'createResource' => '/Resources/',
'updateResource' => '/Resources/:resourceId',
'getResourceStatuses' => '/Resources/Status',
'getAllResources' => '/Resources/',
'getResourceStatusReasons' => '/Resources/Status/Reasons',
'getAvailability' => '/Resources/Availability',
'getAllResourceGroups' => '/Resources/Groups',
'getResource' => '/Resources/:resourceId',
'getResourceAvailability' => '/Resources/:resourceId/Availability',
'DeleteResource' => '/Resources/:resourceId',
'getAllSchedules' => '/Schedules/',
'getSchedule' => '/Schedules/:scheduleId',
'getSlots' => '/Schedules/:scheduleId/Slots',
'createUser' => '/Users/', //This service is only available to application administrators
'updateUser' => '/Users/:userId', //This service is only available to application administrators
'updatePassword' => '/Users/:userId/Password', //This service is only available to application administrators
'getAllUsers' => '/Users/',
'getUser' => '/Users/:userId',
'deleteUser' => '/Users/:userId', // This service is only available to application administrators
);
}