Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@youri-kane/heroku-client

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@youri-kane/heroku-client

heroku developer api client with typescript support

  • 0.1.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by300%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 20 Jun 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc