studentlund

package module
v0.0.0-...-b150aa2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 9 Imported by: 1

README

Studentlund

Simple Go wrapper to retreive event data from studentlund.se.

Requires Go 1.8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByDate

type ByDate []Event

func (ByDate) Len

func (e ByDate) Len() int

func (ByDate) Less

func (e ByDate) Less(i, j int) bool

func (ByDate) Swap

func (e ByDate) Swap(i, j int)

type Dates

type Dates struct {
	Start       time.Time `json:"start"`
	End         time.Time `json:"end"`
	LastUpdated time.Time `json:"last_updated"`
}

type Event

type Event struct {
	Id          string    `json:"id"`
	Summary     string    `json:"summary"`
	Description string    `json:"description"`
	Url         string    `json:"url"`
	ImageUrl    string    `json:"image_url"`
	Location    string    `json:"location"`
	Date        Dates     `json:"date"`
	Organizer   Organizer `json:"organizer"`
}

func GetCurrentDay

func GetCurrentDay() ([]Event, error)

func GetCurrentMonth

func GetCurrentMonth() ([]Event, error)

func GetCurrentWeek

func GetCurrentWeek() ([]Event, error)

func GetDay

func GetDay(date time.Time) ([]Event, error)

func GetMonth

func GetMonth(date time.Time) ([]Event, error)

func GetWeek

func GetWeek(date time.Time) ([]Event, error)

type Organizer

type Organizer struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL