@unvyl/rytr
v1.0.0
Published
rytr.me node.js client
Downloads
110
Readme
RYTR API Client
Intro
This is an inofficial API Client which abstracts the rytr API.
It supports following features:
- createCustomUseCase
- getLanguages
- getTones
- getUsage
- getUsecaseDetail
- getUsecases
- ryte
Installation
yarn add @unvyl/rytr
# or
npm i @unvyl/rytr
Initialize the client
You can initialize the client by calling rytr.init()
.
Either pass a key as argument or provide the key as an argument.
createCustomUseCase
More info about this endpoint can be found here: https://rytr.me/resources#custom-use-cases
rytr.init();
await rytr.createCustomUseCase({
name: 'use case name',
inputName: 'input name',
outputExample: 'output example',
inputPlaceholder: 'input placeholder',
});
getLanguages
rytr.init();
await rytr.getLanguages();
getTones
rytr.init();
await rytr.getTones();
getUsage
rytr.init();
await rytr.getUsage();
getUsecaseDetail
rytr.init();
await rytr.getUsecaseDetail('useCaseId');
getUsecases
rytr.init();
await rytr.getUsecaseDetail('useCaseId');
ryte
rytr.init();
await rytr.ryte({
languageId: 'languageId',
toneId: 'toneId',
useCaseId: 'useCaseId',
inputContexts: {
contextKeyLabel: 'value'
},
variations: 2,
format: 'text',
creativityLevel: 'low'
});