course

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

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 7 Imported by: 5

README

  • Course

This module is a library that provides course utilities for Greek government's e-class platform

For example use, see login_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Course

type Course struct {
	ID       string
	Name     string
	URL      string
	Favorite bool
}

func GetEnrolled

func GetEnrolled(ctx context.Context, opts Options, client *http.Client) ([]Course, error)

TODO: this implementation is not autonomous and needs revisit

func (Course) IsExcluded

func (crs Course) IsExcluded(opts Options) bool

IsExcluded method determines based on options if course should be excluded from final result

func (Course) PrepareAssignmentsURL

func (crs Course) PrepareAssignmentsURL(baseURL string) (string, error)

PrepareAssignmentsURL method prepares URL for the course's dahsboard for assignments

func (Course) String

func (crs Course) String() string

type Options

type Options struct {
	BaseDomain          string              `yaml:"baseDomain"`
	OnlyFavoriteCourses bool                `yaml:"onlyFavoriteCourses"`
	ExcludedCourses     map[string]struct{} `yaml:"excludedCourses"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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