Documentation ¶
Index ¶
- Constants
- func ClearEvents(credentialsPath string, deleteFrom time.Time, deleteCalendar bool)
- func GetGoogleCalendarByName(service *calendar.Service, name string) (*calendar.Calendar, error)
- func GetGoogleCalendarEvents(calID string, service *calendar.Service) ([]*calendar.Event, error)
- func GetGoogleCalendarService(credentialsPath string) (*calendar.Service, error)
- func GetOrCreateGoogleCalendar(service *calendar.Service, name string) (*calendar.Calendar, error)
- func ListEvents(epitechToken string)
- func NewGoogleCalendarEvent(event *EpitechEvent) (*calendar.Event, error)
- func SyncCalendar(credentialsPath, token string)
- type EpitechEvent
Constants ¶
View Source
const ( CalendarName = "EpiCal" Version = "0.1.5" )
View Source
const ( EpitechApiQueryTimeFormat = "2006-01-02" EpitechEventTimeFormat = "2006-01-02 15:04:05" EpitechBaseUrl = "https://intra.epitech.eu" )
View Source
const (
GoogleCalendarApiTimeFormat = "2006-01-02T15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
func ClearEvents ¶
func GetGoogleCalendarByName ¶
func GetGoogleCalendarEvents ¶
func ListEvents ¶
func ListEvents(epitechToken string)
func NewGoogleCalendarEvent ¶
func NewGoogleCalendarEvent(event *EpitechEvent) (*calendar.Event, error)
func SyncCalendar ¶
func SyncCalendar(credentialsPath, token string)
Types ¶
type EpitechEvent ¶
type EpitechEvent struct { ScholarYear string `json:"scolaryear"` CodeModule string `json:"codemodule"` CodeInstance string `json:"codeinstance"` CodeActi string `json:"codeacti"` CodeEvent string `json:"codeevent"` Semester int `json:"semester"` InstanceLocation string `json:"instance_location"` ModuleTitle string `json:"titlemodule"` ProfInst []struct { Type string `json:"type"` Login string `json:"login"` Title string `json:"title"` Picture string `json:"picture"` } `json:"prof_inst"` ActiTitle string `json:"acti_title"` NumEvent int `json:"num_event"` Start string `json:"start"` End string `json:"end"` TotalStudentsRegistered int `json:"total_students_registered"` Title interface{} `json:"title"` TypeTitle string `json:"type_title"` TypeCode string `json:"type_code"` IsRdv string `json:"is_rdv"` NbHours string `json:"nb_hours"` AllowedPlanningStart string `json:"allowed_planning_start"` AllowedPlanningEnd string `json:"allowed_planning_end"` NbGroup int `json:"nb_group"` NbMaxStudentsProjet interface{} `json:"nb_max_students_projet"` Room struct { Code string `json:"code"` Type string `json:"type"` Seats int `json:"seats"` } `json:"room"` Dates interface{} `json:"dates"` ModuleAvailable bool `json:"module_available"` ModuleRegistered bool `json:"module_registered"` Past bool `json:"past"` AllowRegister bool `json:"allow_register"` EventRegistered interface{} `json:"event_registered"` Display string `json:"display"` Project bool `json:"project"` RdvGroupRegistered interface{} `json:"rdv_group_registered"` RdvIndivRegistered interface{} `json:"rdv_indiv_registered"` AllowToken bool `json:"allow_token"` RegisterStudent bool `json:"register_student"` RegisterProf bool `json:"register_prof"` RegisterMonth bool `json:"register_month"` InMoreThanOneMonth bool `json:"in_more_than_one_month"` }
func GetRegisteredEvents ¶
func GetRegisteredEvents(token string) ([]EpitechEvent, error)
GetCalendar aims to fetch Epitech calendar data
Click to show internal directories.
Click to hide internal directories.