Skip to content

Commit

Permalink
add import_term
Browse files Browse the repository at this point in the history
  • Loading branch information
btb committed Jul 12, 2024
1 parent 3d77667 commit 2cdd2ae
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion uw_mazevo/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from uw_mazevo import get_resource, post_resource
from uw_mazevo import DAO, get_resource, post_resource
from uw_mazevo.models import Booking, Building, Room, Status


Expand Down Expand Up @@ -41,6 +41,20 @@ def get_statuses(self):
return statuses


class PublicCourses(object):
URL = "/api/publiccourses/{}"

def import_term(self, courses):
"""
Import a Term
"""
url = self.URL.format("importterm")
body = courses
body["apiKey"] = DAO.get_service_setting("API_KEY")

post_resource(url, body)


class PublicEvent(object):
URL = "/api/PublicEvent/{}"

Expand Down

0 comments on commit 2cdd2ae

Please sign in to comment.