1.0.0 • Published 6 months ago
@5pad/5pad-js v1.0.0
@5pad/js
An isomorphic JavaScript client for 5pad.cz
Usage
First of all, you need to install the library:
npm install @5pad/js
or
yarn add @5pad/js
Then you're able to import the library and create an API client:
import { createClient } from "@5pad/5pad-js";
const client = createClient("<API_KEY>");
Now, you can use API:
// name only
client.getDeclination({ name: "Petr" });
// { "name": "Petře" }
// name and last name
client.getDeclination({ name: "Petr", lastName: "Svoboda" });
// { "name": "Petře", "lastName": "Svobodo" }
// provide an optional 'sex' parameter for better accuracy
client.getDeclination({ name: "Petra", lastName: "Svobodová", sex: "f" });
// { "name": "Petro", "last_name": "Svobodová" }
1.0.0
6 months ago