package module
v1.0.2 Latest Latest

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 10 Imported by: 1


PandA API for Golang



2021/04/21追記: お気に入りサイトの取得機能追加



go get -u
import ""

func main() {
    Panda := panda.NewClient()
    err := Panda.Login(ECS_ID, PASSWORD)
    if err != nil {




View Source
const BaseURI = ""


This section is empty.


This section is empty.


type Assignment

type Assignment struct {
	Access              string `json:"access"`
	AllPurposeItemText  string `json:"allPurposeItemText"`
	AllowPeerAssessment bool   `json:"allowPeerAssessment"`
	Author              string `json:"author"`
	AuthorLastModified  string `json:"authorLastModified"`
	CloseTimeString     string `json:"closeTimeString"`
	Content             string `json:"content"`
	Context             string `json:"context"`
	Creator             string `json:"creator"`
	CloseTime           time.Time
	DropDeadTime        time.Time
	TimeLastModified    time.Time
	OpenTime            time.Time
	TimeCreated         time.Time
	DueTime             time.Time
	DropDeadTimeString  string `json:"dropDeadTimeString"`
	DueTimeString       string `json:"dueTimeString"`
	GradeScale          string `json:"gradeScale"`
	GradeScaleMaxPoints string `json:"gradeScaleMaxPoints"`
	GradebookItemId     int    `json:"gradebookItemId"`
	GradebookItemName   string `json:"gradebookItemName"`
	ID                  string `json:"id"`
	Instructions        string `json:"instructions"`
	MaxGradePoint       string `json:"maxGradePoint"`
	ModelAnswerText     string `json:"modelAnswerText"`
	OpenTimeString      string `json:"openTimeString"`
	Position            int    `json:"position"`
	PrivateNoteText     string `json:"privateNoteText"`
	Section             string `json:"section"`
	Status              string `json:"status"`
	SubmissionType      string `json:"submissionType"`
	Title               string `json:"title"`
	AllowResubmission   bool   `json:"allowResubmission"`
	AnonymousGrading    bool   `json:"anonymousGrading"`
	Draft               bool   `json:"draft"`
	EntityReference     string `json:"entityReference"`
	EntityURL           string `json:"entityURL"`
	EntityId            string `json:"entityId"`
	EntityTitle         string `json:"entityTitle"`

func (*Assignment) UnmarshalJSON

func (a *Assignment) UnmarshalJSON(b []byte) error

type Content

type Content struct {
	Author          string `json:"author"`
	AuthorID        string `json:"authorId"`
	Container       string `json:"container"`
	CopyRightAlert  string `json:"copyrightAlert"`
	Description     string `json:"description"`
	EndDate         string `json:"endDate"`
	FromDate        string `json:"fromDate"`
	ModifiedDate    string `json:"modifiedDate"`
	NumChildren     int    `json:"numChildren"`
	Quota           string `json:"quota"`
	Size            int    `json:"size"`
	Title           string `json:"title"`
	Type            string `json:"type"`
	URL             string `json:"url"`
	Usage           string `json:"usage"`
	Hidden          bool   `json:"hidden"`
	Visible         bool   `json:"visible"`
	EntityReference string `json:"entityReference"`
	EntityURL       string `json:"entityURL"`
	EntityTitle     string `json:"entityTitle"`

type Data

type Data struct {
	EntityPrefix string `json:"entityPrefix"`

	AssignmentCollection []Assignment `json:"assignment_collection"`
	ContentCollection    []Content    `json:"content_collection"`

type FavoriteSiteList

type FavoriteSiteList struct {
	FavoriteSitesIDs     []string `json:"favoriteSiteIds"`
	AutoFavoritesEnabled bool     `json:"autoFavoritesEnabled"`

type Handler

type Handler struct {
	// contains filtered or unexported fields

func NewClient

func NewClient() *Handler

NewClient make new PandA Handler

func (*Handler) GetAssignment

func (p *Handler) GetAssignment() (assignments []Assignment, err error)

func (*Handler) GetAssignmentDetail

func (p *Handler) GetAssignmentDetail(assignmentID string) (assignment Assignment, err error)

func (*Handler) GetContent

func (p *Handler) GetContent(siteID string) (content []Content)

func (Handler) GetFavoriteSites

func (p Handler) GetFavoriteSites() (list FavoriteSiteList)

GetFavoriteSites get sites with star

func (*Handler) GetMyInfo

func (p *Handler) GetMyInfo() (content Content)

func (*Handler) GetSiteAssignment

func (p *Handler) GetSiteAssignment(siteID string) (assignments []Assignment, err error)

func (*Handler) Login

func (p *Handler) Login(id, pass string) error

Login logins panda with put ID / PASSWORD

Jump to

Keyboard shortcuts

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