Nacho Portion Monitor

    mds-carrotquest-client

    1.2.0 • Public • Published

    mds-carrotquest-client

    Simple carrotquest.io client with Promises for nodejs.

    test

    Carrot quest web api documentation: https://carrotquest.io/developers/webapi/

    Installation

    npm install mds-carrotquest-client or yarn add mds-carrotquest-client

    Examples

    const CarrotQuest = require('mds-carrotquest-client')
    const client = new CarrotQuest(apiKey)
    
    // Get all users
    client.apps.users().then(users => {
      console.log(users)
    }).catch(err => {
      console.error(err)
    })

    Methods

    Get active users

    client.apps.activeUsers()

    Get app users

    client.apps.users(query)
    Parameter Type
    query Object

    Get conversations

    client.apps.conversations(query)
    Parameter Type
    query Object

    Get app channels

    client.apps.channels()

    Get user

    client.users.get(id, query)
    Parameter Type
    id String
    query Object

    Get user events

    client.users.events(id, query)
    Parameter Type
    id String
    query Object

    Get user conversations

    client.users.conversations(id, query)
    Parameter Type
    id String
    query Object

    Create user event

    client.users.createEvent(id, query)
    Parameter Type
    id String
    query Object

    Set user props

    client.users.setProps(id, query)
    Parameter Type
    id String
    query Object

    Set user presence

    client.users.setPresence(id, query)
    Parameter Type
    id String
    query Object

    Send a message to user

    client.users.sendMessage(id, query)
    Parameter Type
    id String
    query Object

    Start a conversation with user

    client.users.startConversation(id, query)
    Parameter Type
    id String
    query Object

    Unsubscribe user email

    client.users.unsubscribeEmail(id, query)
    Parameter Type
    id String
    query Object

    Testing

    Create .env file with your Carrot Quest API key and run yarn test:

    echo API_KEY > .env
    yarn install
    yarn test
    

    Keywords

    none

    Install

    npm i mds-carrotquest-client

    DownloadsWeekly Downloads

    8

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    16.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • mindesik