GetSchedule.wr
04-24-2017
This procedure looks at and figures out this Service's schedule for the amount of days requested. Then we Respond with that schedule.
The default here is that we will figure out the schedule for the current calendar month for the month that that the User Interface is currently in. In this default mode we will send back 6 weeks worth of days, with any days prior to this calendar month or after this
If the User Interface does not want the default schedule date range, then it must send the posted variable lnDaysInSchedule.
As input we get several posted variables * ServiceTable is the name of the main table that this instance * of this Service is stored in
- ID is the unique identifier of this instance of this Service in
-
this ServiceTable
-
Timezone is the offset from GMT that the browser that is giving
- us this Request is set to.
After we figure out the schedule of the next days for this instance of the Service, we respond with JSON text. As an intermediate step, we use a template table named ScheduleRow. We fill in each record in ScheduleRow.dbf with a string of text for each scheduled timeslot in this date range. We also fill in the one record in Schedule Row with the title of each day covered by this request. This title includes the spelled-out Day-of-week, Month and day of the month.
Finally, we convert all the records in ScheduleRow.dbf to JSON and send it back to the browser.
Parameters
- String : servicetable - Just put the word "calloutset"
- Number : timezone - Typical timzone offset multiplied by -1
- Number : id - The unique identifier of this instance of the service within the ServiceTable
- Number : getparameter1 - TRUE if this Schedule Request wants us to RETURN the value in Schedule.Parameter1 for each record in Schedule that we Return
- Number : daysinschedule - (optional) Number of days that the browser wants us to include in the schedule
- Number : startdate - The day that the browser wants us to start with on this schedule request.
Useage
Example Request
GET /getSchedule.wr?sidtoken=000000000000000000000000000&daysinschedule=0&getparameter1=true&id=31985&servicetable=calloutset&startdate=06%2F01%2F2011&timezone=5 HTTP/1.1
Host: api.voicebroadcasting.com
Content-Type: application/x-www-form-urlencoded
Example Response
[{"month":"July"},{"text":"Sun June 26","date":"06/26/2011","scheduleid":0,"whentodoit":""},{"text":"Mon June 27","date":"06/27/2011","scheduleid":0,"whentodoit":""}, etc...]