Skip to content

Latest commit

 

History

History
347 lines (225 loc) · 10 KB

File metadata and controls

347 lines (225 loc) · 10 KB

\CourseLocationsAPI

All URIs are relative to https://api.eduframe.nl/api/v1

Method HTTP request Description
CreateCourseLocation Post /course_locations Create a course location.
DeleteCourseLocationById Delete /course_locations/{id} Delete a course location.
GetCourseLocationById Get /course_locations/{id} Get a course location record
GetCourseLocations Get /course_locations Get all course location records
UpdateCourseLocationById Patch /course_locations/{id} Update a course location.

CreateCourseLocation

CourseLocationWithIncludes CreateCourseLocation(ctx).CreateCourseLocationRequest(createCourseLocationRequest).Execute()

Create a course location.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	createCourseLocationRequest := *openapiclient.NewCreateCourseLocationRequest("Name_example") // CreateCourseLocationRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
createCourseLocationRequest CreateCourseLocationRequest

Return type

CourseLocationWithIncludes

Authorization

Bearer

HTTP request headers

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

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

DeleteCourseLocationById

DeleteCourseLocationById(ctx, id).Execute()

Delete a course location.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	id := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.CourseLocationsAPI.DeleteCourseLocationById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CourseLocationsAPI.DeleteCourseLocationById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

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

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

GetCourseLocationById

CourseLocationWithIncludes GetCourseLocationById(ctx, id).Execute()

Get a course location record

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	id := int32(56) // int32 | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

CourseLocationWithIncludes

Authorization

Bearer

HTTP request headers

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

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

GetCourseLocations

[]CourseLocationWithIncludes GetCourseLocations(ctx).Cursor(cursor).PerPage(perPage).Execute()

Get all course location records

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	cursor := "cursor_example" // string | **Note**: It's almost never necessary to use this parameter directly, the URL   should be retrieved from the `Link` header.  The cursor used to fetch the next result set.  (optional)
	perPage := int32(10) // int32 | The number of results to retrieve for this page. (optional) (default to 25)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
cursor string Note: It's almost never necessary to use this parameter directly, the URL should be retrieved from the `Link` header. The cursor used to fetch the next result set.
perPage int32 The number of results to retrieve for this page. [default to 25]

Return type

[]CourseLocationWithIncludes

Authorization

Bearer

HTTP request headers

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

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

UpdateCourseLocationById

CourseLocationWithIncludes UpdateCourseLocationById(ctx, id).UpdateCourseLocationByIdRequest(updateCourseLocationByIdRequest).Execute()

Update a course location.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	id := int32(56) // int32 | 
	updateCourseLocationByIdRequest := *openapiclient.NewUpdateCourseLocationByIdRequest() // UpdateCourseLocationByIdRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

updateCourseLocationByIdRequest | UpdateCourseLocationByIdRequest | |

Return type

CourseLocationWithIncludes

Authorization

Bearer

HTTP request headers

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

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