Skip to content

an api to retrieve the Office (US) quotes and character co-occurrence data when needed (ALWAYS XD)

Notifications You must be signed in to change notification settings

anGie44/theOffice-api

Repository files navigation

theOffice-api

a REST api to retrieve the Office quotes when needed (ALWAYS 💁‍)

Currently hosted at: https://the-office.fly.dev

Currently used for: https://angie44.github.io/theOffice

API Reference

Available at: https://the-office.fly.dev/docs

GET

  • Get quotes or nodes/links by season number

    • URL: /season/:season/format/:format

    • Method: GET

    • URL Params:

      Required:

      • season=[integer] // season number [1-9], inclusive

      • format=[string] // "quotes" or "connections"

    • Success Response:

      • Code: 200
      • Content [Quotes]: [{ "season": seasonNumber, "episode" : episodeNumber, "scene": sceneNumber, "episode_name": episodeName, "character": character, "quote" : quote}]
      • Content [Connections]: [{ "episode": episodeNumber, "name": episodeName, "links" : [{ "source" : characterName, "target": characterName, "value" : numberOfCoOccurencesInEpisode }], "nodes" : [{ "id" : characterName }]
  • Get quotes for a specific season and episode

    • URL: /season/:season/episode/:episode

    • Method: GET

    • URL Params:

      Required:

      • season=[integer] // season number [1-9], inclusive

      • episode=[integer] // episode number within season (indexing begins at 1)

    • Success Response:

      • Code: 200
      • Content: [{ "season": seasonNumber, "episode" : episodeNumber, "scene": sceneNumber, "episode_name": episodeName, "character": character, "quote" : quote }]