scraper

package
v0.0.0-...-6a497d4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug *bool

Debug to set debugging mode for more logging output

Functions

func GetAnnouncements

func GetAnnouncements() []byte

GetAnnouncements to get Announcements byte array to be send to socket client

func GetAnnouncementsConky

func GetAnnouncementsConky() []byte

GetAnnouncementsConky to get Announcements byte array with conky color support

func GetAnnouncementsTerm

func GetAnnouncementsTerm() []byte

GetAnnouncementsTerm to get Announcements byte array with terminal color support

func GetEvents

func GetEvents() []byte

GetEvents to get Events byte array to be sent to socket client

func GetEventsConky

func GetEventsConky() []byte

GetEventsConky to get Events byte array with conky color support

func GetEventsTerm

func GetEventsTerm() []byte

GetEventsTerm function helps to get Events byte array with terminal color support

func GetUnknownResponse

func GetUnknownResponse() []byte

GetUnknownResponse for Unknown Args given to Socket server

func GetUserName

func GetUserName() string

GetUserName returns username which is used to login into lms portal

func SetDebugMode

func SetDebugMode(debug *bool)

SetDebugMode to set debug Mode for enabling more logs

func SetUserPass

func SetUserPass(user string, pass string)

SetUserPass sets username and password to login to lms portal

func Start

func Start() error

Start Scraper which logs into lms portal and creates a client cookiejar which stores cookie which is useful to maintain login session throughout the running of daemon service.

func Stop

func Stop() error

Stop Scraper application and logout of lms called when daemon is stopped

Types

type Announcement

type Announcement struct {
	Date     string
	Name     string
	Info     string
	CourseID int
}

Announcement Type

type App

type App struct {
	Client *http.Client
	// contains filtered or unexported fields
}

App is the base http Client

type Course

type Course struct {
	Name       string `json:"fullname"`
	Code       string `json:"shortname"`
	CourseID   int    `json:"id"`
	URL        string `json:"viewurl"`
	Isfavorite bool   `json:"isfavourite"`
}

Course Type

type Event

type Event struct {
	Name          string `json:"name"`
	Description   string `json:"description"`
	CourseID      int    `json:"course.id"`
	Instance      int    `json:"instance"`
	Eventtype     string `json:"eventtype"`
	Timestart     int    `json:"timestart"`
	Timeduration  int    `json:"timeduration"`
	Timesort      int    `json:"timesort"`
	Visible       int    `json:"visible"`
	Timemodified  int    `json:"timemodified"`
	Formattedtime string `json:"formattedtime"`
	URL           string `json:"url"`
}

Event Type

type NearEvent

type NearEvent struct {
	Title    string
	CourseID string
	EventID  string
	Deadline string
	URL      string
	Name     string
}

NearEvent Type

type SessKey

type SessKey struct {
	SessKey string
}

SessKey Type

Jump to

Keyboard shortcuts

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