Skip to content

Latest commit

 

History

History
769 lines (504 loc) · 20.7 KB

File metadata and controls

769 lines (504 loc) · 20.7 KB

\CourseAPIAPI

All URIs are relative to https://octopus.codio.com

Method HTTP request Description
ArchiveCourse Post /api/v1/courses/{courseId}/archive Archive Course
CourseStructure Get /api/v1/courses/{courseId} Fetch Course Structure
CoursesList Get /api/v1/courses_list List Organization Courses
CreateCourse Post /api/v1/courses Create Course
CreateCourseModule Post /api/v1/courses/{courseId}/modules Create Course Module
FilterLearnersForMentors Post /api/v1/courses/{courseId}/filterLearnersForMentors Filter Learners For Mentors
FindCourse Get /api/v1/courses Find Course
ListCourseStudents Get /api/v1/courses/{courseId}/students List Course Students
ListCourseTeachers Get /api/v1/courses/{courseId}/teachers List Course Teachers
StudentCourseProgress Get /api/v1/courses/{courseId}/students/{studentId}/progress Fetch Course Structure
UpdateBooks Post /api/v1/courses/{courseId}/update_books Update Course Books

ArchiveCourse

ArchiveCourse ArchiveCourse(ctx, courseId).Execute()

Archive Course

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id to archive

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.ArchiveCourse(context.Background(), courseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.ArchiveCourse``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ArchiveCourse`: ArchiveCourse
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.ArchiveCourse`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id to archive

Other Parameters

Other parameters are passed through a pointer to a apiArchiveCourseRequest struct via the builder pattern

Name Type Description Notes

Return type

ArchiveCourse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CourseStructure

Course CourseStructure(ctx, courseId).WithHiddenAssignments(withHiddenAssignments).Execute()

Fetch Course Structure

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id
	withHiddenAssignments := "withHiddenAssignments_example" // string | Fetch hidden assignments (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.CourseStructure(context.Background(), courseId).WithHiddenAssignments(withHiddenAssignments).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.CourseStructure``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CourseStructure`: Course
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.CourseStructure`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id

Other Parameters

Other parameters are passed through a pointer to a apiCourseStructureRequest struct via the builder pattern

Name Type Description Notes

withHiddenAssignments | string | Fetch hidden assignments |

Return type

Course

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CoursesList

ListCourses CoursesList(ctx).NextToken(nextToken).Archived(archived).Execute()

List Organization Courses

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	nextToken := "nextToken_example" // string | Next search data portion token, if specified - other parameters will be ignored (optional)
	archived := "archived_example" // string | Archived courses filter (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.CoursesList(context.Background()).NextToken(nextToken).Archived(archived).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.CoursesList``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CoursesList`: ListCourses
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.CoursesList`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCoursesListRequest struct via the builder pattern

Name Type Description Notes
nextToken string Next search data portion token, if specified - other parameters will be ignored
archived string Archived courses filter

Return type

ListCourses

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateCourse

CreateCourseAnswer CreateCourse(ctx).CreateCourse(createCourse).Execute()

Create Course

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	createCourse := *openapiclient.NewCreateCourse() // CreateCourse |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.CreateCourse(context.Background()).CreateCourse(createCourse).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.CreateCourse``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateCourse`: CreateCourseAnswer
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.CreateCourse`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateCourseRequest struct via the builder pattern

Name Type Description Notes
createCourse CreateCourse

Return type

CreateCourseAnswer

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateCourseModule

CreateCourseModuleAnswer CreateCourseModule(ctx, courseId).CreateCourseModule(createCourseModule).Execute()

Create Course Module

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id
	createCourseModule := *openapiclient.NewCreateCourseModule() // CreateCourseModule |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.CreateCourseModule(context.Background(), courseId).CreateCourseModule(createCourseModule).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.CreateCourseModule``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateCourseModule`: CreateCourseModuleAnswer
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.CreateCourseModule`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id

Other Parameters

Other parameters are passed through a pointer to a apiCreateCourseModuleRequest struct via the builder pattern

Name Type Description Notes

createCourseModule | CreateCourseModule | |

Return type

CreateCourseModuleAnswer

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FilterLearnersForMentors

FilterLearnersForMentorsAnswerExample FilterLearnersForMentors(ctx, courseId).Body(body).Execute()

Filter Learners For Mentors

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id
	body := "body_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.FilterLearnersForMentors(context.Background(), courseId).Body(body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.FilterLearnersForMentors``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `FilterLearnersForMentors`: FilterLearnersForMentorsAnswerExample
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.FilterLearnersForMentors`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id

Other Parameters

Other parameters are passed through a pointer to a apiFilterLearnersForMentorsRequest struct via the builder pattern

Name Type Description Notes

body | string | |

Return type

FilterLearnersForMentorsAnswerExample

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindCourse

Course FindCourse(ctx).Name(name).WithHiddenAssignments(withHiddenAssignments).Execute()

Find Course

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	name := "name_example" // string | Course name
	withHiddenAssignments := "withHiddenAssignments_example" // string | Fetch hidden assignments (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.FindCourse(context.Background()).Name(name).WithHiddenAssignments(withHiddenAssignments).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.FindCourse``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `FindCourse`: Course
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.FindCourse`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFindCourseRequest struct via the builder pattern

Name Type Description Notes
name string Course name
withHiddenAssignments string Fetch hidden assignments

Return type

Course

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListCourseStudents

[]User ListCourseStudents(ctx, courseId).Execute()

List Course Students

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.ListCourseStudents(context.Background(), courseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.ListCourseStudents``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListCourseStudents`: []User
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.ListCourseStudents`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id

Other Parameters

Other parameters are passed through a pointer to a apiListCourseStudentsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]User

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListCourseTeachers

[]User ListCourseTeachers(ctx, courseId).Execute()

List Course Teachers

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.ListCourseTeachers(context.Background(), courseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.ListCourseTeachers``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListCourseTeachers`: []User
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.ListCourseTeachers`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id

Other Parameters

Other parameters are passed through a pointer to a apiListCourseTeachersRequest struct via the builder pattern

Name Type Description Notes

Return type

[]User

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

StudentCourseProgress

[]AssignmentProgressItem StudentCourseProgress(ctx, courseId, studentId).Execute()

Fetch Course Structure

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id
	studentId := "studentId_example" // string | Student id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.StudentCourseProgress(context.Background(), courseId, studentId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.StudentCourseProgress``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `StudentCourseProgress`: []AssignmentProgressItem
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.StudentCourseProgress`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id
studentId string Student id

Other Parameters

Other parameters are passed through a pointer to a apiStudentCourseProgressRequest struct via the builder pattern

Name Type Description Notes

Return type

[]AssignmentProgressItem

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateBooks

Course UpdateBooks(ctx, courseId).BookId(bookId).Execute()

Update Course Books

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/codio/codio-api-go"
)

func main() {
	courseId := "courseId_example" // string | Course id
	bookId := "bookId_example" // string | Book id to process (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CourseAPIAPI.UpdateBooks(context.Background(), courseId).BookId(bookId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseAPIAPI.UpdateBooks``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateBooks`: Course
	fmt.Fprintf(os.Stdout, "Response from `CourseAPIAPI.UpdateBooks`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
courseId string Course id

Other Parameters

Other parameters are passed through a pointer to a apiUpdateBooksRequest struct via the builder pattern

Name Type Description Notes

bookId | string | Book id to process |

Return type

Course

Authorization

bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data, application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]