0.1.17 • Published 2 years ago

@youri-kane/heroku-client v0.1.17

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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();
0.1.17

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago