Skip to main content

Hint API

All URIs are relative to http://localhost:1000

MethodHTTP requestDescription
hintScoresIncrementPOST /hint/{hint}/scores/increment'/hint/{hint}/scores/increment' [POST]
hintSpecificHintSnapshotGET /hint/{hint}/hint/{hint} [POST]
hintUpdatePOST /hint/update/hint/update [POST]

hintScoresIncrement

hintScoresIncrement()

This will take in a SeededScoreIncrement and will increment the material relative to the incoming body.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.HintApi(configuration)

const body: Pieces.HintScoresIncrementRequest = {
// string | This is a specific hint uuid
hint: hint_example,
// SeededScoreIncrement (optional)
seededScoreIncrement: ,
};

apiInstance.hintScoresIncrement(body).then((data: void (empty response body)) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
seededScoreIncrementSeededScoreIncrement
hint[string]This is a specific hint uuiddefaults to undefined

Return type

void (empty response body)

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204No Content-
500Internal Server Error-

hintSpecificHintSnapshot

Hint hintSpecificHintSnapshot()

This will get a snapshot of a specific hint.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.HintApi(configuration)

const body: Pieces.HintSpecificHintSnapshotRequest = {
// string | This is a specific hint uuid
hint: hint_example,
};

apiInstance.hintSpecificHintSnapshot(body).then((data: Hint) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
hint[string]This is a specific hint uuiddefaults to undefined

Return type

Hint

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

hintUpdate

Hint hintUpdate()

This will update a specific hint.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.HintApi(configuration)

const body: Pieces.HintUpdateRequest = {
// Hint (optional)
hint: ,
};

apiInstance.hintUpdate(body).then((data: Hint) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
hintHint

Return type

Hint

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-