@bitforgehq/yago-api-client
v1.2.3
Published
Client library to access [Yago REST API](https://yago.cloud/api/doc/).
Downloads
32
Readme
yago-api-client
Client library to access Yago REST API.
Generated with openapi-generator
using the Fetch API.
Installation
Use your favorite package manager:
npm install @bitforgehq/yago-api-client
OR
yarn add @bitforgehq/yago-api-client
Usage
// Create auth token. Can be saved in local storage
const token = await new AuthApi().authCreate({
tokenObtainRequest: {
email: '[email protected]',
password: 'yourPa$$w0Rd',
},
});
// Initialize API configuration with token
const apiConfig = new Configuration({
basePath = 'https://yago.cloud',
accessToken: token.access,
});
// Fetch projects and models
const projects = await new ProjectsApi(apiConfig).projectsList();
const models = await new ModelsApi(apiConfig).modelsList({ project: projects[0].id });
See API Docs for a full list of all available endpoints.