ASPC

Associated Students of Pomona College

ASPC API

ASPC API

A standardized way to access ASPC features. Currently there are only APIs for the Menu and Courses.

Authentication Token

You must login to obtain your authentication token.

Example using cURL

	
curl -H "Authorization: Token YOUR_TOKEN" https://aspc.pomona.edu/api/menu/
	
	OR
	
curl "https://aspc.pomona.edu/api/menu/?auth_token=YOUR_TOKEN"
	

Example using JavaScript

		
var auth_token = 'YOUR_TOKEN',
	api_endpoint = 'https://aspc.pomona.edu/api/menu/',
	response = null;

// Requires jQuery
$.ajax({
	url: api_endpoint,
	data: {auth_token: auth_token}
}).done(function (data) {
	response = data;
});
		
	

Example using Python

		
import requests
import json

response = requests.get(
	'https://aspc.pomona.edu/api/menu/',
	params = {
		'auth_token': 'YOUR_TOKEN'
	}
)

data = json.loads(response.text)
		
	

All Menus [/api/menu/]

Lists all menus

Example request (GET)

	
curl "https://aspc.pomona.edu/api/menu/?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

[
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Breakfast Selections\", \"Scrambled Eggs\\nCheese & Bacon Eggs\\nTurkey Bacon & Sausage Patties\\nChorizo & Cheese Quesadilla\", \"Oatmeal & Grits\\nWaffles\\nHash Browns \\nCranberry & Apple Cinnamon Muffins\", \"Make Your Own Waffle Station\"]",
        "id": 11,
        "meal": "breakfast"
    },
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Chocolate Chip Cookies\\nCinnamon Roll Cheesecake Cookies\\nPina Colada Bar\\nLemon Blueberry Pound Cake\", \"Red Velvet Cake\\nVegan Banana Cream Pie\\nMade Without Gluten Rochers\"]",
        "id": 13,
        "meal": "dessert"
    }, ...
]

Lists all menus by a specific dining hall

Parameters

  • dining_hall (enum[string])

    Name of the dining hall

    • Members
      • frary
      • frank
      • cmc
      • mudd
      • scripps
      • oldenborg

Example request (GET)

	
curl "https://aspc.pomona.edu/api/menu/dining_hall/cmc?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

[
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Breakfast Selections\", \"Scrambled Eggs\\nCheese & Bacon Eggs\\nTurkey Bacon & Sausage Patties\\nChorizo & Cheese Quesadilla\", \"Oatmeal & Grits\\nWaffles\\nHash Browns \\nCranberry & Apple Cinnamon Muffins\", \"Make Your Own Waffle Station\"]",
        "id": 11,
        "meal": "breakfast"
    },
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Chocolate Chip Cookies\\nCinnamon Roll Cheesecake Cookies\\nPina Colada Bar\\nLemon Blueberry Pound Cake\", \"Red Velvet Cake\\nVegan Banana Cream Pie\\nMade Without Gluten Rochers\"]",
        "id": 13,
        "meal": "dessert"
    }, ...
]

Lists all menus by a specific day of the week

Parameters

  • day (enum[string])

    Name of the day of the week

    • Members
      • mon
      • tue
      • wed
      • thu
      • fri
      • sat
      • sun

Example request (GET)

	
curl "https://aspc.pomona.edu/api/menu/day/fri?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

[
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Breakfast Selections\", \"Scrambled Eggs\\nCheese & Bacon Eggs\\nTurkey Bacon & Sausage Patties\\nChorizo & Cheese Quesadilla\", \"Oatmeal & Grits\\nWaffles\\nHash Browns \\nCranberry & Apple Cinnamon Muffins\", \"Make Your Own Waffle Station\"]",
        "id": 11,
        "meal": "breakfast"
    },
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Chocolate Chip Cookies\\nCinnamon Roll Cheesecake Cookies\\nPina Colada Bar\\nLemon Blueberry Pound Cake\", \"Red Velvet Cake\\nVegan Banana Cream Pie\\nMade Without Gluten Rochers\"]",
        "id": 13,
        "meal": "dessert"
    }, ...
]

Lists all menus by dining hall and a specific day of the week

Parameters

  • dining_hall (enum[string])

    Name of the dining hall

    • Members
      • frary
      • frank
      • cmc
      • mudd
      • scripps
      • oldenborg
  • day (enum[string])

    Name of the day of the week

    • Members
      • mon
      • tue
      • wed
      • thu
      • fri
      • sat
      • sun

Example request (GET)

	
curl "https://aspc.pomona.edu/api/menu/dining_hall/cmc/day/fri?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

[
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Breakfast Selections\", \"Scrambled Eggs\\nCheese & Bacon Eggs\\nTurkey Bacon & Sausage Patties\\nChorizo & Cheese Quesadilla\", \"Oatmeal & Grits\\nWaffles\\nHash Browns \\nCranberry & Apple Cinnamon Muffins\", \"Make Your Own Waffle Station\"]",
        "id": 11,
        "meal": "breakfast"
    },
    {
        "day": "fri",
        "dining_hall": "cmc",
        "food_items": "[\"Chocolate Chip Cookies\\nCinnamon Roll Cheesecake Cookies\\nPina Colada Bar\\nLemon Blueberry Pound Cake\", \"Red Velvet Cake\\nVegan Banana Cream Pie\\nMade Without Gluten Rochers\"]",
        "id": 13,
        "meal": "dessert"
    }, ...
]

Find a menu with a specific dining hall, specific day of the week, and meal

Parameters

  • meal (enum[string])

    Name of the dining hall

    • Members
      • breakfast
      • lunch
      • dinner
  • dining_hall (enum[string])

    Name of the dining hall

    • Members
      • frary
      • frank
      • cmc
      • mudd
      • scripps
      • oldenborg
  • day (enum[string])

    Name of the day of the week

    • Members
      • mon
      • tue
      • wed
      • thu
      • fri
      • sat
      • sun

Example request (GET)

	
curl "https://aspc.pomona.edu/api/menu/dining_hall/cmc/day/fri/meal/breakfast?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
    "day": "fri",
    "dining_hall": "cmc",
    "food_items": "[\"Breakfast Selections\", \"Scrambled Eggs\\nCheese & Bacon Eggs\\nTurkey Bacon & Sausage Patties\\nChorizo & Cheese Quesadilla\", \"Oatmeal & Grits\\nWaffles\\nHash Browns \\nCranberry & Apple Cinnamon Muffins\", \"Make Your Own Waffle Station\"]",
    "id": 11,
    "meal": "breakfast"
}

All Departments [/api/departmentss/{name}/]

List all departments.

Example request (GET)

	
curl "https://aspc.pomona.edu/api/departments?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
    ...
    {
        "id": 30,
        "name": "Computer Sci-Mathematics",
        "code": "CSMT"
    },
    {
        "id": 31,
        "name": "Computer Science",
        "code": "CSCI"
    },
    ...
}

All Instructors [/api/instructors/{name}/]

List all instructors.

Example request (GET)

	
curl "https://aspc.pomona.edu/api/instructors?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
    ...
    {
        "id": 597,
        "name": "Shahriari, Shahriar",
        "rating": 4.5,
        "useful_rating": 4.07352941176471,
        "engagement_rating": 3.41911764705882,
        "difficulty_rating": 3.91176470588235,
        "competency_rating": 3.83088235294118,
        "lecturing_rating": 3.625,
        "enthusiasm_rating": 4.70588235294118,
        "approachable_rating": 3.30147058823529,
        "inclusivity_rating": null
    },
    {
        "id": 1170,
        "name": "Adrian Soldatenko-Gutierrez",
        "rating": 2.66666666666667,
        "useful_rating": 3.0,
        "engagement_rating": 2.33333333333333,
        "difficulty_rating": 4.33333333333333,
        "competency_rating": 4.33333333333333,
        "lecturing_rating": 3.33333333333333,
        "enthusiasm_rating": 4.0,
        "approachable_rating": 3.0,
        "inclusivity_rating": null
    },
    ...
}

Instructors by Name [/api/instructors/{name}/]

Find instructors with their full or partial names.

Parameters

  • name (enum[string])

    The full or partial name of the instructor.

Example request (GET)

	
curl "https://aspc.pomona.edu/api/instructors/yamashita?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
        "id": 220,
        "name": "Yamashita, Samuel H.",
        "rating": 4.7037037037037,
        "useful_rating": 4.24691358024691,
        "engagement_rating": 2.67901234567901,
        "difficulty_rating": 4.06172839506173,
        "competency_rating": 2.85185185185185,
        "lecturing_rating": 2.71604938271605,
        "enthusiasm_rating": 4.65432098765432,
        "approachable_rating": 2.77777777777778,
        "inclusivity_rating": null
}

All Courses [/api/courses/{name}/]

List all courses.

Example request (GET)

	
curl "https://aspc.pomona.edu/api/courses?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
    ...
 {
        "id": 518,
        "name": "Machine Learning    ",
        "code": "CSCI158  PO",
        "number": 158,
        "rating": 5.0,
        "useful_rating": 4.0,
        "engagement_rating": 5.0,
        "difficulty_rating": 3.0,
        "competency_rating": 5.0,
        "lecturing_rating": 5.0,
        "enthusiasm_rating": 4.0,
        "approachable_rating": 5.0,
        "inclusivity_rating": null,
        "department": {
            "id": 31,
            "name": "Computer Science",
            "code": "CSCI"
        }
    },
    {
        "id": 1978,
        "name": "Natural Language Processing",
        "code": "CSCI159  PO",
        "number": 159,
        "rating": 5.0,
        "useful_rating": 4.0,
        "engagement_rating": 5.0,
        "difficulty_rating": 3.0,
        "competency_rating": 5.0,
        "lecturing_rating": 5.0,
        "enthusiasm_rating": 5.0,
        "approachable_rating": 5.0,
        "inclusivity_rating": null,
        "department": {
            "id": 31,
            "name": "Computer Science",
            "code": "CSCI"
        }
    },
    ...
}

Courses by instructor [/api/courses/instructor/{instructor_id}/]

Find courses taught by an instructor.

Parameters

  • instructor_id (enum[string])

    The id of the instructor.

Example request (GET)

	
curl "https://aspc.pomona.edu/api/courses/instructor/47?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
    {
        "id": 52,
        "name": "Introduction to Int'l Politics    ",
        "code": "GOVT070  CM",
        "number": 70,
        "rating": null,
        "useful_rating": null,
        "engagement_rating": null,
        "difficulty_rating": null,
        "competency_rating": null,
        "lecturing_rating": null,
        "enthusiasm_rating": null,
        "approachable_rating": null,
        "inclusivity_rating": null,
        "department": {
            "id": 58,
            "name": "Government",
            "code": "GOVT"
        }
    }
}

Courses by department [/api/courses/department/{department-id}/]

Find courses in a department.

Parameters

  • department-id (enum[string])

    The id of the department.

Example request (GET)

	
curl "https://aspc.pomona.edu/api/courses/department/25?auth_token=YOUR_TOKEN"
	

Example response 200 (application/json)

{
    ...
    {
        "id": 243,
        "name": "Central Americans in the US    ",
        "code": "CHLT072  CH",
        "number": 72,
        "rating": null,
        "useful_rating": null,
        "engagement_rating": null,
        "difficulty_rating": null,
        "competency_rating": null,
        "lecturing_rating": null,
        "enthusiasm_rating": null,
        "approachable_rating": null,
        "inclusivity_rating": null,
        "department": {
            "id": 24,
            "name": "Chican@/Latin@ Transnatl",
            "code": "CHLT"
        }
    },
    {
        "id": 465,
        "name": "Decolonial Love US Latina/o Lit    ",
        "code": "CHLT185A CH",
        "number": 185,
        "rating": null,
        "useful_rating": null,
        "engagement_rating": null,
        "difficulty_rating": null,
        "competency_rating": null,
        "lecturing_rating": null,
        "enthusiasm_rating": null,
        "approachable_rating": null,
        "inclusivity_rating": null,
        "department": {
            "id": 24,
            "name": "Chican@/Latin@ Transnatl",
            "code": "CHLT"
        }
    },
    ...
}