Skip to content

Latest commit

 

History

History
1150 lines (909 loc) · 24.5 KB

File metadata and controls

1150 lines (909 loc) · 24.5 KB

MyBCA.Server | v1 v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Bus

get__api_Bus_List

Code samples

GET /api/Bus/List

Retrieves a map of each bus to its position

Example responses

200 Response

{"count":0,"data":{"property1":"string","property2":"string"},"expiry":"2019-08-24T14:15:22Z"}
{
  "count": 0,
  "data": {
    "property1": "string",
    "property2": "string"
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK OK BusApiResponse
This operation does not require authentication

get__api_Bus_Info

Code samples

GET /api/Bus/Info

Retrieves information about a bus

Parameters

Name In Type Required Description
bus query string false none

Example responses

200 Response

{"name":"string","company":{"name":"string"}}
{
  "name": "string",
  "company": {
    "name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK BusInfoDto
This operation does not require authentication

get__api_Bus_History

Code samples

GET /api/Bus/History

Retrieves a history of a bus's arrivals

Parameters

Name In Type Required Description
bus query string false none

Example responses

200 Response

[{"busName":"string","busPosition":"string","arrivalTime":"2019-08-24T14:15:22Z"}]
[
  {
    "busName": "string",
    "busPosition": "string",
    "arrivalTime": "2019-08-24T14:15:22Z"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [BusArrivalDto] false none none
» busName string¦null true none none
» busPosition string¦null true none none
» arrivalTime string(date-time) true none none
This operation does not require authentication

get__api_Bus_Reports_Generate

Code samples

GET /api/Bus/Reports/Generate

Generates a CSV report of all bus arrival data

Parameters

Name In Type Required Description
start query string(date) false none
end query string(date) false none

Responses

Status Meaning Description Schema
200 OK OK None
This operation does not require authentication

Link

get__api_Links

Code samples

GET /api/Links

Retrieves a list of quick links to key BCA services

Example responses

200 Response

{"count":0,"data":[{"name":"string","target":"http://example.com"}]}
{
  "count": 0,
  "data": [
    {
      "name": "string",
      "target": "http://example.com"
    }
  ]
}
Status Meaning Description Schema
200 OK OK LinkApiResponse
This operation does not require authentication

News

get__api_News_Stories_Latest

Code samples

GET /api/News/Stories/Latest

Retrieves the latest news story

Example responses

200 Response

{"data":{"id":0,"title":"string","link":"string","imageLink":"string","contentHtml":"string","createdAt":"2019-08-24T14:15:22Z"},"expiry":"2019-08-24T14:15:22Z"}
{
  "data": {
    "id": 0,
    "title": "string",
    "link": "string",
    "imageLink": "string",
    "contentHtml": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK OK NewsApiResponseOfNewsStoryDto
This operation does not require authentication

get__api_News_Stories

Code samples

GET /api/News/Stories

Retrieves the top 10 latest news stories

Example responses

200 Response

{"data":[{"id":0,"title":"string","link":"string","imageLink":"string","contentHtml":"string","createdAt":"2019-08-24T14:15:22Z"}],"expiry":"2019-08-24T14:15:22Z"}
{
  "data": [
    {
      "id": 0,
      "title": "string",
      "link": "string",
      "imageLink": "string",
      "contentHtml": "string",
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "expiry": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK OK NewsApiResponseOfIEnumerableOfNewsStoryDto
This operation does not require authentication

get__api_News_Stories_{id}

Code samples

GET /api/News/Stories/{id}

Retrieves a story by its ID

Parameters

Name In Type Required Description
id path integer(int32) true none

Example responses

200 Response

{"id":0,"title":"string","link":"string","imageLink":"string","contentHtml":"string","createdAt":"2019-08-24T14:15:22Z"}
{
  "id": 0,
  "title": "string",
  "link": "string",
  "imageLink": "string",
  "contentHtml": "string",
  "createdAt": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK OK NewsStoryDto2
This operation does not require authentication

Nutrislice

get__api_Lunch_Week

Code samples

GET /api/Lunch/Week

Retrieves the lunch menu for the week

Example responses

200 Response

{"data":{"startDate":"string","displayName":"string","days":[{"date":"string","menuItems":[{"date":"2019-08-24T14:15:22Z","position":0,"isSectionTitle":true,"text":"string","food":{"id":0,"name":"string","description":"string","subtext":"string","imageUrl":"string"},"stationID":0,"isStationHeader":true,"image":"string","category":"string"}]}]},"expiry":"2019-08-24T14:15:22Z"}
{
  "data": {
    "startDate": "string",
    "displayName": "string",
    "days": [
      {
        "date": "string",
        "menuItems": [
          {
            "date": "2019-08-24T14:15:22Z",
            "position": 0,
            "isSectionTitle": true,
            "text": "string",
            "food": {
              "id": 0,
              "name": "string",
              "description": "string",
              "subtext": "string",
              "imageUrl": "string"
            },
            "stationID": 0,
            "isStationHeader": true,
            "image": "string",
            "category": "string"
          }
        ]
      }
    ]
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK OK NutrisliceApiResponseOfMenuWeekDto
This operation does not require authentication

get__api_Lunch_Day

Code samples

GET /api/Lunch/Day

Retrieves the lunch menu for the day

Example responses

200 Response

{"data":{"date":"string","menuItems":[{"date":"2019-08-24T14:15:22Z","position":0,"isSectionTitle":true,"text":"string","food":{"id":0,"name":"string","description":"string","subtext":"string","imageUrl":"string"},"stationID":0,"isStationHeader":true,"image":"string","category":"string"}]},"expiry":"2019-08-24T14:15:22Z"}
{
  "data": {
    "date": "string",
    "menuItems": [
      {
        "date": "2019-08-24T14:15:22Z",
        "position": 0,
        "isSectionTitle": true,
        "text": "string",
        "food": {
          "id": 0,
          "name": "string",
          "description": "string",
          "subtext": "string",
          "imageUrl": "string"
        },
        "stationID": 0,
        "isStationHeader": true,
        "image": "string",
        "category": "string"
      }
    ]
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK OK NutrisliceApiResponseOfMenuDayDto
This operation does not require authentication

Schedule

get__api_Schedule_Day_{date}

Code samples

GET /api/Schedule/Day/{date}

Retrieves details of the schedule for a day

Parameters

Name In Type Required Description
date path string(date) true none

Example responses

200 Response

{"id":0,"day":"2019-08-24","scheduleId":0,"schedule":{"id":0,"name":"string","items":[{"periodName":"string","startTime":"14:15:22Z","endTime":"14:15:22Z"}]}}
{
  "id": 0,
  "day": "2019-08-24",
  "scheduleId": 0,
  "schedule": {
    "id": 0,
    "name": "string",
    "items": [
      {
        "periodName": "string",
        "startTime": "14:15:22Z",
        "endTime": "14:15:22Z"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK OK ScheduleDayDto
This operation does not require authentication

Schemas

BusApiResponse

{
  "count": 0,
  "data": {
    "property1": "string",
    "property2": "string"
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
count integer(int32) true none none
data object true none none
» additionalProperties string false none none
expiry string(date-time)¦null true none none

BusArrivalDto

{
  "busName": "string",
  "busPosition": "string",
  "arrivalTime": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
busName string¦null true none none
busPosition string¦null true none none
arrivalTime string(date-time) true none none

BusCompanyDto

{
  "name": "string"
}

Properties

Name Type Required Restrictions Description
name string true none none

BusInfoDto

{
  "name": "string",
  "company": {
    "name": "string"
  }
}

Properties

Name Type Required Restrictions Description
name string true none none
company BusCompanyDto true none none

FoodItemDto

{
  "id": 0,
  "name": "string",
  "description": "string",
  "subtext": "string",
  "imageUrl": "string"
}

Properties

Name Type Required Restrictions Description
id integer(int32) true none none
name string¦null true none none
description string¦null true none none
subtext string¦null true none none
imageUrl string¦null true none none

LinkApiResponse

{
  "count": 0,
  "data": [
    {
      "name": "string",
      "target": "http://example.com"
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) true none none
data [LinkDto] true none none

LinkDto

{
  "name": "string",
  "target": "http://example.com"
}

Properties

Name Type Required Restrictions Description
name string true none none
target string(uri) true none none

MenuDayDto

{
  "date": "string",
  "menuItems": [
    {
      "date": "2019-08-24T14:15:22Z",
      "position": 0,
      "isSectionTitle": true,
      "text": "string",
      "food": {
        "id": 0,
        "name": "string",
        "description": "string",
        "subtext": "string",
        "imageUrl": "string"
      },
      "stationID": 0,
      "isStationHeader": true,
      "image": "string",
      "category": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
date string¦null true none none
menuItems [MenuItemDto] true none none

MenuDayDto2

{
  "date": "string",
  "menuItems": [
    {
      "date": "2019-08-24T14:15:22Z",
      "position": 0,
      "isSectionTitle": true,
      "text": "string",
      "food": {
        "id": 0,
        "name": "string",
        "description": "string",
        "subtext": "string",
        "imageUrl": "string"
      },
      "stationID": 0,
      "isStationHeader": true,
      "image": "string",
      "category": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
date string¦null true none none
menuItems [MenuItemDto] true none none

MenuItemDto

{
  "date": "2019-08-24T14:15:22Z",
  "position": 0,
  "isSectionTitle": true,
  "text": "string",
  "food": {
    "id": 0,
    "name": "string",
    "description": "string",
    "subtext": "string",
    "imageUrl": "string"
  },
  "stationID": 0,
  "isStationHeader": true,
  "image": "string",
  "category": "string"
}

Properties

Name Type Required Restrictions Description
date string(date-time)¦null true none none
position integer(int32) true none none
isSectionTitle boolean true none none
text string¦null true none none
food FoodItemDto true none none
stationID integer(uint32) true none none
isStationHeader boolean true none none
image string¦null true none none
category string¦null true none none

MenuWeekDto

{
  "startDate": "string",
  "displayName": "string",
  "days": [
    {
      "date": "string",
      "menuItems": [
        {
          "date": "2019-08-24T14:15:22Z",
          "position": 0,
          "isSectionTitle": true,
          "text": "string",
          "food": {
            "id": 0,
            "name": "string",
            "description": "string",
            "subtext": "string",
            "imageUrl": "string"
          },
          "stationID": 0,
          "isStationHeader": true,
          "image": "string",
          "category": "string"
        }
      ]
    }
  ]
}

Properties

Name Type Required Restrictions Description
startDate string¦null true none none
displayName string¦null true none none
days [MenuDayDto] true none none

NewsApiResponseOfIEnumerableOfNewsStoryDto

{
  "data": [
    {
      "id": 0,
      "title": "string",
      "link": "string",
      "imageLink": "string",
      "contentHtml": "string",
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "expiry": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
data [NewsStoryDto2]¦null true none none
expiry string(date-time)¦null true none none

NewsApiResponseOfNewsStoryDto

{
  "data": {
    "id": 0,
    "title": "string",
    "link": "string",
    "imageLink": "string",
    "contentHtml": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
data NewsStoryDto true none none
expiry string(date-time)¦null true none none

NewsStoryDto

{
  "id": 0,
  "title": "string",
  "link": "string",
  "imageLink": "string",
  "contentHtml": "string",
  "createdAt": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
id integer(int32) true none none
title string true none none
link string true none none
imageLink string¦null true none none
contentHtml string¦null true none none
createdAt string(date-time) true none none

NewsStoryDto2

{
  "id": 0,
  "title": "string",
  "link": "string",
  "imageLink": "string",
  "contentHtml": "string",
  "createdAt": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
id integer(int32) true none none
title string true none none
link string true none none
imageLink string¦null true none none
contentHtml string¦null true none none
createdAt string(date-time) true none none

NutrisliceApiResponseOfMenuDayDto

{
  "data": {
    "date": "string",
    "menuItems": [
      {
        "date": "2019-08-24T14:15:22Z",
        "position": 0,
        "isSectionTitle": true,
        "text": "string",
        "food": {
          "id": 0,
          "name": "string",
          "description": "string",
          "subtext": "string",
          "imageUrl": "string"
        },
        "stationID": 0,
        "isStationHeader": true,
        "image": "string",
        "category": "string"
      }
    ]
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
data MenuDayDto2 true none none
expiry string(date-time)¦null true none none

NutrisliceApiResponseOfMenuWeekDto

{
  "data": {
    "startDate": "string",
    "displayName": "string",
    "days": [
      {
        "date": "string",
        "menuItems": [
          {
            "date": "2019-08-24T14:15:22Z",
            "position": 0,
            "isSectionTitle": true,
            "text": "string",
            "food": {
              "id": 0,
              "name": "string",
              "description": "string",
              "subtext": "string",
              "imageUrl": "string"
            },
            "stationID": 0,
            "isStationHeader": true,
            "image": "string",
            "category": "string"
          }
        ]
      }
    ]
  },
  "expiry": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
data MenuWeekDto true none none
expiry string(date-time)¦null true none none

ScheduleDayDto

{
  "id": 0,
  "day": "2019-08-24",
  "scheduleId": 0,
  "schedule": {
    "id": 0,
    "name": "string",
    "items": [
      {
        "periodName": "string",
        "startTime": "14:15:22Z",
        "endTime": "14:15:22Z"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
id integer(int32) true none none
day string(date) true none none
scheduleId integer(int32) true none none
schedule ScheduleDto true none none

ScheduleDto

{
  "id": 0,
  "name": "string",
  "items": [
    {
      "periodName": "string",
      "startTime": "14:15:22Z",
      "endTime": "14:15:22Z"
    }
  ]
}

Properties

Name Type Required Restrictions Description
id integer(int32) true none none
name string true none none
items [ScheduleItemDto] true none none

ScheduleItemDto

{
  "periodName": "string",
  "startTime": "14:15:22Z",
  "endTime": "14:15:22Z"
}

Properties

Name Type Required Restrictions Description
periodName string true none none
startTime string(time) true none none
endTime string(time) true none none