Socket
Socket
Sign inDemoInstall

@youri-kane/heroku-client

Package Overview
Dependencies
38
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @youri-kane/heroku-client

heroku developer api client with typescript support


Version published
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

heroku-client

heroku developer api client with typescript support

TODO

  • handle heroku cache
  • handle lists
  • handle Rate-limit
  • handle metrics requests

createClient

    import { createClient } from '@youri-kane/heroku-client';

    const client = createClient({
        token: AUTH_TOKEN, // will thro if missing
    });

Making Requests

    import { createClient } from '@youri-kane/heroku-client';

    const client = createClient({
        token: AUTH_TOKEN,
    });

    const apps = await client.getApps({}) // types as App[]

Making Poll Requests

    import { createClient, createPollRequest } from '@youri-kane/heroku-client';

    const client = createClient({
        token: AUTH_TOKEN,
    });

    /** */
    const emitter = await createPollRequest({}, client.getApps, 5000);

    emitter.on("data", (apps: App[]) => {
        console.log(apps)
    })

    emitter.on("error", (error: Error) => {
        console.error(error)
    })

    emitter.close();

Keywords

FAQs

Last updated on 20 Jun 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc