Struct zermelo::Schedule [] [src]

pub struct Schedule {
    pub school: String,
    pub access_token: String,
    pub appointments: Vec<Appointment>,
}

This struct represents the schedule, containing Appointments.

Fields

The school id used in the URL. For the school id of 'example', this URL will be: https://example.zportal.nl/.

The access token obtained from the API, used to obtain appointments.

A vector of the appointments.

Methods

impl Schedule
[src]

[src]

Create a new Schedule from an authorization code (only once usable) and a school identifier. This will get the access token from the API. Returns a Schedule or an error.

[src]

Create a new Schedule when an access token has been obtained already. This cannot fail, so this will not return a Result.

[src]

Get the appointments between start and end from the API, and set them to self.appointments. Returns a reference to itself, or an error.

Trait Implementations

Auto Trait Implementations

impl Send for Schedule

impl Sync for Schedule