Skip to content

UpStudyTeam/UpStudyGoSdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for UpStudyGoSdk

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install with go get:

go get github.com/UpStudyTeam/UpStudyGoSdk@v0.1.0

Use Sdk Example

package main

import (
	"context"
	"fmt"
	"github.com/UpStudyTeam/UpStudyGoSdk"
)

func main() {
	configuration := UpStudyGoSdk.NewConfiguration()
	apiClient := UpStudyGoSdk.NewAPIClient(configuration)
	ctx := context.WithValue(context.Background(), UpStudyGoSdk.ContextAPIKeys, map[string]UpStudyGoSdk.APIKey{
		"BearerAuth": {
			Key:    "<your_app_id_key>", // TODO: change to your key
			Prefix: "Bearer",
		},
	})
	resp, httpResp, err := apiClient.ThothEngineModuleAPI.V1SingleAnswerPost(ctx).Data(UpStudyGoSdk.RequestSolveRequestV1{
		Input: "x+1=2",
	}).Execute()
	if err != nil {
		panic(err)
	}
	if httpResp.StatusCode != 200 {
		panic(httpResp.Status)
	}
	fmt.Println(resp)
}

Documentation for API Endpoints

All URIs are relative to https://api.cameramath.com

Class Method HTTP request Description
ThothEngineModuleAPI V1BriefAnswersPost Post /v1/brief-answers Answers to all lists of each block
ThothEngineModuleAPI V1ShowStepsPost Post /v1/show-steps All lists and all steps of all blocks
ThothEngineModuleAPI V1SingleAnswerPost Post /v1/single-answer First answer of the first block, text version

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: BearerAuth and passed in as the auth context for each request.

Example

auth := context.WithValue(
		context.Background(),
		UpStudyGoSdk.ContextAPIKeys,
		map[string]UpStudyGoSdk.APIKey{
			"BearerAuth": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

About

go sdk for upstudy api

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors