Versions in this module Expand all Collapse all v0 v0.1.1 May 9, 2019 v0.1.0 May 8, 2019 Changes in this version + const AttachmentMaxSizeAudio + const AttachmentMaxSizeDocuments + const AttachmentMaxSizePictures + const AttachmentMaxSizeVideos + const BaseURLString + const MB + type Attachment struct + BasePath string + Reader io.Reader + type Attachments struct + Audio []Attachment + Documents []Attachment + Pictures []Attachment + Videos []Attachment + func (as Attachments) AttachAudio(filename string, r io.Reader) + func (as Attachments) AttachDocument(filename string, r io.Reader) + func (as Attachments) AttachPicture(filename string, r io.Reader) + func (as Attachments) AttachVideo(filename string, r io.Reader) + func (as Attachments) Populated() bool type Category + func (c Category) Check() error + type Event struct + End time.Time + Name string + Start time.Time + func (e Event) Check() error + type Publication struct + Attachments Attachments + Category Category + Dislike bool + Event Event + Group Group + ID PublicationID + Message string + Official bool + Private bool + Survey Survey + func CreatePublication(message string, category Category) *Publication + func (p *Publication) AddEvent(event Event) + func (p *Publication) AddSurvey(survey Survey) + func (p *Publication) Check() error + func (p *Publication) PublishAs(group Group, official bool) + type PublicationID uint type Session + func CreateSessionByCookie(cookie *http.Cookie, client *http.Client) *Session + func (s *Session) DeletePublication(publicationID PublicationID) error + func (s *Session) GetAvailableGroups() (map[Group]string, error) + func (s *Session) GetStudentByLink(link string) (Student, error) + func (s *Session) Logout() error + func (s *Session) PostPublication(publication *Publication) error type StudentList + func (sl StudentList) WriteCSV(writer io.Writer) error + func (sl StudentList) WriteJSON(writer io.Writer) error + type Survey struct + Answers []string + End time.Time + Multiple bool + Question string + func CreateSurvey(question string, end time.Time, multiple bool, answers ...string) Survey + func (s Survey) Check() error v0.0.1 May 8, 2019 Changes in this version + const Annales + const Divers + const Evenements + const Gazettes + const Journal + const News + const Photos + const Podcasts + const Sondages + const Videos + var BaseURL *url.URL = &url.URL + type Category uint8 + type FileType uint8 + const Audio + const Document + const Photo + const Video + type Group uint8 + const HustleISEP + const NoGroup + type Post struct + Audio []string + Category Category + Dislike bool + Documents []string + EventEnd time.Time + EventStart time.Time + EventTitle string + Group Group + Message string + Official bool + Photos []string + Private bool + SurveyAnswers []string + SurveyEnd time.Time + SurveyMultiple bool + SurveyQuestion string + Videos []string + func NewPost(message string, category Category, private bool, dislike bool) *Post + func (p *Post) AddEvent(title string, start time.Time, end time.Time) + func (p *Post) AddSurvey(question string, end time.Time, answers ...string) + func (p *Post) AttachAudio(filepath string) + func (p *Post) AttachDocument(filepath string) + func (p *Post) AttachPhoto(filepath string) + func (p *Post) AttachVideo(filepath string) + func (p *Post) PostAs(group Group, official bool) + type Session struct + Client *http.Client + func CreateSessionByCookieValue(cookieValue string, client *http.Client) *Session + func Login(username string, password string, client *http.Client) (*Session, error) + func (s *Session) AvailableGroups() (map[Group]string, error) + func (s *Session) Cookie() (*http.Cookie, error) + func (s *Session) DeletePost(postID uint) error + func (s *Session) GetStudentList() (StudentList, error) + func (s *Session) PublishPost(post *Post) error + type Student struct + Birthday string + Cell string + Email string + ID string + ISEPEmail string + Name string + Promo string + Quote string + type StudentList []Student + func (sl StudentList) CSV(writer io.Writer) error