classroom

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptedAssignment

type AcceptedAssignment struct {
	Id                     int              `json:"id"`
	Submitted              bool             `json:"submitted"`
	Passing                bool             `json:"passing"`
	CommitCount            int              `json:"commit_count"`
	Grade                  string           `json:"grade"`
	FeedbackPullRequestUrl string           `json:"feedback_pull_request_url"`
	Students               []Student        `json:"students"`
	Repository             GithubRepository `json:"repository"`
	Assignment             Assignment       `json:"assignment"`
}

func (AcceptedAssignment) RepositoryUrl

func (a AcceptedAssignment) RepositoryUrl() string

type AcceptedAssignmentList

type AcceptedAssignmentList struct {
	AcceptedAssignments []AcceptedAssignment
	Classroom           Classroom
	Assignment          Assignment
	Count               int
}

func ListAcceptedAssignments

func ListAcceptedAssignments(client api.RESTClient, assignmentID int, page int, perPage int) (AcceptedAssignmentList, error)

func NewAcceptedAssignmentList

func NewAcceptedAssignmentList(assignments []AcceptedAssignment) AcceptedAssignmentList

type Assignment

type Assignment struct {
	Id                          int              `json:"id"`
	PublicRepo                  bool             `json:"public_repo"`
	Title                       string           `json:"title"`
	AssignmentType              string           `json:"type"`
	InviteLink                  string           `json:"invite_link"`
	InvitationsEnabled          bool             `json:"invitations_enabled"`
	Slug                        string           `json:"slug"`
	StudentsAreRepoAdmins       bool             `json:"students_are_repo_admins"`
	FeedbackPullRequestsEnabled bool             `json:"feedback_pull_requests_enabled"`
	MaxTeams                    int              `json:"max_teams"`
	MaxMembers                  int              `json:"max_members"`
	Editor                      string           `json:"editor"`
	Accepted                    int              `json:"accepted"`
	Submissions                 int              `json:"submissions"`
	Passing                     int              `json:"passing"`
	Language                    string           `json:"language"`
	Deadline                    string           `json:"deadline"`
	Classroom                   Classroom        `json:"classroom"`
	StarterCodeRepository       GithubRepository `json:"starter_code_repository"`
}

func GetAssignment

func GetAssignment(client api.RESTClient, assignmentID int) (Assignment, error)

func (Assignment) IsGroupAssignment

func (a Assignment) IsGroupAssignment() bool

func (Assignment) Url

func (a Assignment) Url() string

type AssignmentList

type AssignmentList struct {
	Assignments []Assignment
	Classroom   Classroom
	Count       int
}

func ListAssignments

func ListAssignments(client api.RESTClient, classroomID int, page int, perPage int) (AssignmentList, error)

func NewAssignmentList

func NewAssignmentList(assignments []Assignment) AssignmentList

func (AssignmentList) Url

func (a AssignmentList) Url() string

type Classroom

type Classroom struct {
	Id           int                `json:"id"`
	Name         string             `json:"name"`
	Archived     bool               `json:"archived"`
	Url          string             `json:"url"`
	Organization GitHubOrganization `json:"organization"`
}

func GetClassroom

func GetClassroom(client api.RESTClient, classroomID int) (Classroom, error)

func ListClassrooms

func ListClassrooms(client api.RESTClient, page int, perPage int) ([]Classroom, error)

type GitHubOrganization

type GitHubOrganization struct {
	Id        int    `json:"id"`
	Login     string `json:"login"`
	NodeID    string `json:"node_id"`
	HtmlUrl   string `json:"html_url"`
	Name      string `json:"name"`
	AvatarUrl string `json:"avatar_url"`
}

type GithubRepository

type GithubRepository struct {
	Id            int    `json:"id"`
	FullName      string `json:"full_name"`
	HtmlUrl       string `json:"html_url"`
	NodeId        string `json:"node_id"`
	Private       bool   `json:"private"`
	DefaultBranch string `json:"default_branch"`
}

func (GithubRepository) Name

func (gr GithubRepository) Name() string

type Student

type Student struct {
	Id        int    `json:"id"`
	Login     string `json:"login"`
	AvatarUrl string `json:"avatar_url"`
	HtmlUrl   string `json:"html_url"`
}

Jump to

Keyboard shortcuts

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