myminerva.core

->User

(->User username password)
Positional factory function for class myminerva.core.User.

add-courses!

(add-courses! auth options)
Register for courses for a given semester and year. The options must have
the following keys:

:crns   - a seq of or a single crn to add
:season - #"winter|fall|summer"
:year   - this one is pretty obvious

Returns a seq of courses if the add/drop was successful or a seq of
errors if any.

Errors have the following keys

:error-message  - the identifier of the error as per minerva
:crn            - the crn attached to the error

Authorized

protocol

members

auth->cookies

(auth->cookies this)
Returns cookie string of given input

drop-courses!

(drop-courses! auth options)
Drop courses for a given semester and year. The options must have the
following keys:

:crns   - a seq of or a single crn to add
:season - #"winter|fall|summer"
:year   - this one is pretty obvious

Returns a seq of courses if the add/drop was successful or a seq of
errors if any.

Errors have the following keys

:error-message  - the identifier of the error as per minerva
:crn            - the crn attached to the error

get-courses

(get-courses auth options)
Search for courses to determine availability, instructor, times,
etc. The options take the following keys:

:season         - required, #"winter|fall|summer"
:year           - required, this one is pretty obvious
:department     - required, the department identifier. e.g. 'MECH'
:course-number  - optional, the course number

Returns a seq of courses with the following keys and values as
strings unless specified otherwise:

:course-number  - the course number
:course-title   - the title of the course
:credits        - the number of credits of the course
:crn            - the course identification number for add/drop purposes
:days           - a string or vector of strings matching #"[MTWRF]"+
:department     - the department identifier. e.g. 'MECH', 'COMP', ...
:full?          - a boolean representing if the course is full or not
:grade          - the user's grade in letter form
:instructor     - the professor giving the course
:notes          - nil, string or vector of strings of comments on the course
:section        - the section number taken
:status         - is the course is active, cancelled, ... ?
:time-slot      - a string or vector of strings representing the times
                  allocated for the course
:type           - a string such as lecture, tutorial, ...

Returns nil if the search was unsuccessful.

get-registered-courses

(get-registered-courses auth options)
Search for web-registered courses for a semester. Returns a seq of
courses with the following keys:

:course-number  - the course number
:course-title   - the title of the course
:credits        - the number of credits of the course
:crn            - the course identification number for add/drop purposes
:department     - the department identifier. e.g. 'MECH', 'COMP', ...
:section        - the section number taken
:status         - is the course is active, cancelled, ... ?
:type           - a string such as lecture, tutorial, ...

Returns nil if unsuccessful.

get-transcript

(get-transcript auth)
Obtain a seq of courses maps from the user's transcript.

Courses contain the following keys mapped to strings unless specified otherwise:

:class-avg     - the class average in letter form
:completed?    - boolean identifying if the course is completed or not
:course-number - the course number
:course-title  - the title of the course
:credits       - the number of credits of the course
:department    - the department identifier. e.g. 'MECH', 'COMP', ...
:grade         - the user's grade in letter form
:section       - the section number taken

Returns nil if the operation was unsuccessful.

map->User

(map->User m__5869__auto__)
Factory function for class myminerva.core.User, taking a map of keywords to field values.

user->cookies

(user->cookies user)
The authorized cookies are required to perform any action that requires
you to be logged into minerva. The user must have the following keys:

:username - the full email of the user
:password - the password of the user

Returns a cookie string, or nil if login was unsuccesful.