1.0.5 • Published 1 year ago

koyeb-api v1.0.5

Weekly downloads
-
License
GNU
Repository
github
Last release
1 year ago

Koyeb API Wrapper

An API wrapper for Koyeb Rest API (v1.0.0), which allows you to interact with the Koyeb platform in a simple, programmatic way using asyncronous functions.

Install

npm install koyeb-api

Usage/Examples

Import it to your code using

const Client = require('koyeb-api');
const Koyeb = new Client("YOUR-API-TOKEN"); 

Get app list

const result = await Koyeb.getApps()
console.log(result)

Get services

const result = await Koyeb.getServices()
console.log(result)

Get app details

const appName = "my-app"
const result = await Koyeb.getAppInfo(appName)
console.log(result)

Get service details

const service_id = "your-service-id" // Get service id using Koyeb.getServices() method
const result = await Koyeb.getServiceInfo()
console.log(result)

Creating/Updating service environment variables

const options = {
    Var: "PORT"
    value: "3000"
    serviceName: "my-service"
}
await Koyeb.setEnv(options)

Redeploy service

const serviceName = "my-service"
await Koyeb.reDeploy(serviceName)

Pause service

const serviceName = "my-service"
await Koyeb.pauseService(serviceName)

Get activity list

const result = await Koyeb.listActivities()
console.log(result)
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago