Giter Site home page Giter Site logo

knightlife-api's Introduction

Knight Life API

v2.0 Documentation

The following will provide as a brief description of all callable API routes, as well as their general purpose, required parameters, and response. A more in-depth guide will be available soon.

Schedule Routes

Schedule Template

Path: /schedule/template
Purpose: Returns the default BB&N schedule

Request:
Method: GET
Headers: None Required
Body: None Required
Params: None Required
Response:
Returns a list of Days, identified by IDs, and a list of blocks available on those days.

Schedule for Specific Date

Path: /schedule
Purpose: Returns the schedule for a given day.

Request:
Method: GET
Headers: None Required
Body: None Required
Params:
  - date (YYYY-MM-dd)
Response:
Returns a list of blocks occurring on the given `date`. Additionally provides a list of notices to display to the user.

Next Schoolday

Path: /schedule/next
Purpose: Fetches the next Date with blocks available.

Request:
Method: GET
Headers: None Required
Body: None Required
Params:
  - date (YYYY-MM-dd) (this will typically be today's date)
Response:
Returns the Date and Schedule for the next day of school after the given `date`.

Retrieve Special Schedules

Path: /schedule/special
Purpose: Retrieves all upcoming special schedules for the next month.

Request:
Method: GET
Headers: None Required
Body: None Required
Params:
  - date (YYYY-MM-dd) (this will typically be today's date)
Response:
Returns a list of schedules (and dates) across the next 28 days that have irregular block schedules or notices available for the user. This route is commonly accessed to display upcoming irregular schedule items.

Lunch Routes

Retrieve Date Lunch Menu

Path: /lunch
Purpose: Retrieves the Lunch menu for a given date.

Request:
Method: GET
Headers: None Required
Body: None Required
Params:
  - date (YYYY-MM-dd)
Response:
Returns a list of Foods, denoted by a name and nullable allergy, and a nullable menu title. This list of foods will be empty if there has been no menu inputted.

Event Routes

Retrieve Date Events

Path: /events
Purpose: Retrieves all events for a given date.

Request:
Method: GET
Headers: None Required
Body: None Required
Params:
  - date (YYYY-MM-dd)
Response:
Returns a list of Events occurring on the given `date`.

Misc. Routes

Upcoming Items

Path: /upcoming
Purpose: Retrieves all upcoming events, schedule changes, and notices.

Request:
Method: GET
Headers: None Required
Body: None Required
Params:
  - date (YYYY-MM-dd)
Response:
Returns a compiled list of all Upcoming Items, sorted by date. These are of three types: Event, Schedule Change, Notice. There can be multiple Items for a single date.

DEVELOPMENT ENVIRONMENT HOWTO

  1. Install Docker Desktop. https://www.docker.com/products/docker-desktop

  2. At the terminal, build the images, export the root certificate for installing into the iOS simulator, then launch the containers.

$ cd knightlife-api
$ docker-compose build
$ docker/genca/export_ca.sh
$ docker-compose up
  1. Open a Finder window, navigate to /Users/[you]/tempCA, and drag rootCA.cer to the Simulator window.

  2. The simulator will tell you to finish installing it in Settings. Navigate to Settings > About > Certificate Trust Settings and install.

knightlife-api's People

Contributors

jovialis avatar spud304 avatar zrusilla avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.