1.5.22 • Published 3 years ago
@betty-blocks/api-test-framework v1.5.22
Introduction
This package can be used to call Betty Blocks API's
Getting started
Install package
yarn add @betty-blocks/api-test-framework
Alias
You might want to rename the framework for simplicity sake
yarn add api-test-framework@npm:@betty-blocks/api-test-framework
Get an API instance
setAPI function
Expects an object as the first and only parameter. Based on the keys passed you are able to access different API's.
Betty 5:
const api = setupAPI({
applicationDomain,
/*
NL3: `https://${app}.bettyblocks.com`
Acceptance: `https://${app}.acceptance.bettyblocks.com`
Edge: `https://${app}.edge.bettyblocks.com`
*/
applicationToken,
/*
Token that can be generated on a per app basis in my-bb.
Should correspond to the below username
*/
username,
/*
The username you fill in, its generally an email.
For most existing apps this mail is used:
'testbaselinebettyblocks@gmail.com'
*/
});
Meta API
const api = setupAPI({
metaAPIURL,
/*
NL3: 'https://meta-api-nl3.betty.services/graphql',
Acceptance: 'https://meta-api-acceptance.betty.services/graphql',
Edge: 'https://meta-api.betty.services/graphql',
*/
applicationName,
/*
Name of the application you are using. For example:
'data-api-edge'
*/
username
/*
The username you fill in, its generally an email.
For most existing apps this mail is used:
'testbaselinebettyblocks@gmail.com'
*/
password,
/*
Password for your user (is used to get valid tokens)
For the mail provided above the password is:
'123!IkMaakDit'
*/
});
MyBB API
const api = setupAPI({
username
/*
The username you fill in, its generally an email.
For most existing apps this mail is used:
'testbaselinebettyblocks@gmail.com'
*/
password,
/*
Password for your user (is used to get valid tokens)
For the mail provided above the password is:
'123!IkMaakDit'
*/
});
Usage
You can, after calling setupAPI
, use the different classes to create different entities. For example:
await api.model.create({ name: 'asfd', table_name: 'asdf', options: { label: 'asdf' } });
1.5.21
3 years ago
1.5.20
3 years ago
1.5.22
3 years ago
1.5.19
3 years ago
1.5.18
3 years ago
1.5.17
3 years ago
1.5.16
3 years ago
1.5.15
3 years ago
1.5.14
3 years ago
1.5.13
3 years ago
1.5.12
3 years ago
1.5.11
3 years ago
1.5.10
3 years ago
1.5.9
3 years ago
1.5.8
3 years ago
1.5.7
3 years ago
1.5.6
3 years ago
1.5.5
3 years ago
1.5.4
3 years ago
1.5.3
3 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.0
3 years ago
1.3.0
3 years ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.0
3 years ago