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: 'your@email.com',
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.