Overview
A node-js wrapper around the appetize api
Example
const { upsert } = require('@keg-hub/appetite')
const response = await upsert({
noteFields: {
branch: 'my-branch',
},
url: 'some.url.to.simulator.build.com'
platform: 'ios',
token: '123456',
disabled: true
})
Usage
Install
yarn add @keg-hub/appetite
Upload
const { upload } = require('@keg-hub/appetite')
const response = await upload({
url: <url to your simulator build>
filePath: <system file path to your simulator build>,
platform: <ios or android>,
token: <your appetize developer token>
....rest: <any other fields to include in the post form>
})
Update
const { update } = require('@keg-hub/appetite')
const response = await update({
publicKey: <public key of app build to update>,
url: <url to your simulator build>
filePath: <system file path to your simulator build>,
platform: <ios or android>,
token: <your appetize developer token>
....rest: <any other fields to include in the post form>
})
Upsert
const { upsert } = require('@keg-hub/appetite')
const response = await upsert({
note: 'note field of an existing app build; if found, this will update that app build',
noteFields: 'note fields of an existing app build; if matched, this will update that app build. Assumes the note is in json format.',
url: <url to your simulator build>
filePath: <system file path to your simulator build>,
platform: <ios or android>,
token: <your appetize developer token>
....rest: <any other fields to include in the post form>
})
Find
const { find } = require('@keg-hub/appetite')
const response = await find({
note: 'note field of an existing app build to search by',
noteFields: 'note fields of an existing app build to search by',
platform: <ios or android>,
token: <your appetize developer token>
})
Get
const { get } = require('@keg-hub/appetite')
const response = await get({
publicKey: <public key of app build to get>,
token: <your appetize developer token>
})
Remove
const { remove } = require('@keg-hub/appetite')
const response = await remove({
publicKey: <public key of app build to delete>,
token: <your appetize developer token>
})
Testing
- Unit:
yarn test
- Functional:
yarn test:e2e
- this test will require you to set some ENVS
- it's easiest to create a
.env file in the repo's root directory
- see the
example.env file for the expected variables to put there
- this will test creating, finding, updating, and deleting a single app using your Appetize account, live