Skip to main content

Classification API

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

MethodHTTP requestDescription
convertGenericClassificationPOST /classification/generic/convertConvert Generic Classification

convertGenericClassification​

SeededFormat convertGenericClassification()

This endpoint converts on a best effort basis from one generic format to another, i.e. from Code to HLJS

Example​

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

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

const body: Pieces.ConvertGenericClassificationRequest = {
// SeededFormat | This is a seededFormat that we want to turn into a specific rendering SeededFormat. Ensure that you pass through a fragment.string.raw Ensure that you pass through a classification with the generic/specific/rendering all specified (optional)
seededFormat: ,
};

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

Parameters​

NameTypeDescriptionNotes
seededFormatSeededFormatThis is a seededFormat that we want to turn into a specific rendering SeededFormat. Ensure that you pass through a fragment.string.raw Ensure that you pass through a classification with the generic/specific/rendering all specified

Return type​

SeededFormat

HTTP request headers​

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

HTTP response details​

Status codeDescriptionResponse headers
200OK - The SeededFormat that was successfully converted to the rendering format that was specified.-
500Internal Server Error-
501Generic Classification Conversion Not Implemented-