api

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Retries = 3

Retries sets the maximum retry count

View Source
const RetryDelay = 10 * time.Second

RetryDelay sets the delay between retries

View Source
const Timeout = 30 * time.Second

Timeout sets the timeout of the http client

Variables

This section is empty.

Functions

func DeleteFDItem

func DeleteFDItem(authToken string, ItemID string) error

DeleteFDItem delete an FD item

func DownloadFDItem

func DownloadFDItem(authToken string, parentItemID string, downloadItemID string, filePathName string) (int64, error)

DownloadFDItem downloads a FD file

func Inventory

func Inventory(authToken string) (*[]InventoryItem, error)

Inventory loads the users inventory

func LoadFDItems

func LoadFDItems(authToken string, parentItemID string, pupil InventoryItem) (*[]FDItem, error)

LoadFDItems loads items in a FD folder

func Login

func Login(user string, password string) (*string, error)

Login returns auth token

Types

type FDItem

type FDItem struct {
	Name                 string  `json:"name"`
	FullPath             string  `json:"fullPath"`
	CreatorName          string  `json:"creatorName"`
	ItemType             string  `json:"itemType"`
	ItemSubType          string  `json:"itemSubType"`
	TeachersAccessType   string  `json:"teachersAccessType"`
	ParentsAccessType    string  `json:"parentsAccessType"`
	NumberOfParticipants int64   `json:"numberOfParticipants"`
	HasPreview           bool    `json:"hasPreview"`
	Size                 int64   `json:"size"`
	LastEditedDate       string  `json:"lastEditedDate"`
	ParentItemID         *string `json:"parentItemId"`
	SchoolClassID        string  `json:"schoolClassId"`
	PupilID              string  `json:"pupilId"`
	AccessType           string  `json:"accessType"`
	ID                   string  `json:"id"`
	CreatedAt            string  `json:"createdAt"`
	CreatedBy            string  `json:"createdBy"`
	UpdatedAt            string  `json:"updatedAt"`
	UpdatedBy            string  `json:"updatedBy"`
	Deleted              bool    `json:"deleted"`
	Version              string  `json:"version"`
	IsActive             bool    `json:"isActive"`
}

FDItem type

func LoadFDItem

func LoadFDItem(authToken string, itemID string, pupil InventoryItem) (*FDItem, error)

LoadFDItem loads a single FDItem

type InventoryItem

type InventoryItem struct {
	Name                          string `json:"name"`
	ItemType                      string `json:"itemType"`
	ApplicationType               string `json:"applicationType"`
	SchoolClassID                 string `json:"schoolClassId"`
	SchoolClassName               string `json:"schoolClassName"`
	SchoolID                      string `json:"schoolId"`
	SchoolName                    string `json:"schoolName"`
	SchoolRegion                  string `json:"schoolRegion"`
	SchoolYearStart               int    `json:"schoolYearStart"`
	PurchasedFeature              string `json:"purchasedFeature"`
	PurchasedUntil                string `json:"purchasedUntil"`
	HasUnreadMessages             bool   `json:"hasUnreadMessages"`
	HasUnreadDiscussions          bool   `json:"hasUnreadDiscussions"`
	MigrationPending              bool   `json:"migrationPending"`
	SchoolClassPictureID          string `json:"schoolClassPictureId"`
	IsPrincipalMessagingActivated *bool  `json:"isPrincipalMessagingActivated"`
	TeacherRole                   string `json:"teacherRole"`
	CanCreateClasses              *bool  `json:"canCreateClasses"`
	IsFoxAdmin                    *bool  `json:"isFoxAdmin"`
	IsSchoolValid                 bool   `json:"isSchoolValid"`
	IsConnectedToPrincipal        bool   `json:"isConnectedToPrincipal"`
	ColorCode                     string `json:"colorCode"`
	HasTeamClass                  *bool  `json:"hasTeamClass"`
	IsTeamClass                   *bool  `json:"isTeamClass"`
	CreatedBy                     string `json:"createdBy"`
	UpdatedBy                     string `json:"updatedBy"`
	IsActive                      bool   `json:"isActive"`
	ID                            string `json:"id"`
	Version                       string `json:"version"`
	CreatedAt                     string `json:"createdAt"`
	UpdatedAt                     string `json:"updatedAt"`
	Deleted                       bool   `json:"deleted"`
}

InventoryItem type

Jump to

Keyboard shortcuts

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