avatarbox.sdk
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.8 • Public • Published

    avatarbox.sdk

    nodejs sdk for avatarbox.io


    Build Status Coverage Status GitHub tag (latest SemVer) license

    NPM

    Description

    avatarbox.sdk is a specialized library designed to facilitate the development of application components such as avatarbox.publisher, avatarbox.worker, avatarbox.app and avatarbox.api. Unlike a general-purpose library, avatarbox.sdk is tailored to back-end resources situated within the AvatarBox Virtual Private Cloud (VPC) hosted on Amazon Web Services (AWS).

    Checklist

    SQS Queue Setup:

    Setting Description
    Lambda Triggers avbx-worker a.
    Name avbx-worker-queue
    Type Standard

    a. Use avatarbox.worker to define this Lambda function.

    Installation

    # clone repo
    $ git clone https://github.com/mrtillman/avatarbox.sdk.git
    
    # install dependencies
    $ cd avatarbox.sdk && npm install

    Next, find demo.env, rename it to .env and modify:

    KMS_KEY_ID={YOUR-KMS-KEY-ID}
    REGION=us-east-1
    QUEUE_URL={YOUR-SQS-QUEUE-URL}
    PUSHER_APP_ID=0000000
    PUSHER_SECRET=xxxxxxxxxxxxxxxxxxx
    PUSHER_KEY=11111112222222333333
    PUSHER_CLUSTER=xx1

    Tests

    # unit tests
    $ npm test
    
    # test coverage
    $ npm run test:cov

    Usage

    avatarbox.sdk defines a Gravatar client and a Twitter client. Both implement the AvbxClient interface.

    import { 
      AvbxGravatarClient,
      AvbxTwitterClient
    } from 'avatarbox.sdk';
    
    const gravatarClient = new AvbxGravatarClient();
    const twitterClient = new AvbxTwitterClient();

    License

    MIT

    Install

    npm i avatarbox.sdk

    DownloadsWeekly Downloads

    23

    Version

    1.2.8

    License

    MIT

    Unpacked Size

    151 kB

    Total Files

    88

    Last publish

    Collaborators

    • mrtillman