npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coronado

v0.0.19

Published

triple API Typescript/JavaScript wrapper

Downloads

22

Readme

Coronado TypeScript

coronado - Native language wrapper for the triple API. The triple API enables partners to integrate with the triple platform. The full API documentation is available from https://api.tripleup.dev/docs

Typescript/JavaScript API:

  • https://coronado-fi.github.io/coronado-js

Python API reference implementation:

  • https://coronado-fi.github.io/coronado

JVM API:

  • https://coronado-fi.github.io/coronado-jvm/

Description

Reference implementation wrapper for the triple API. All wrappers are implemented under the umbrella project Coronado, can can be viewed on-line at:

  • https://github.com/coronado-fi
  • https://coronado.fi - under construction

Use of this API requires credentials issued by tripleup.com and access to an S3 bucket provided by them. Contact tripleup.com to assist you in setting up access.

Installation

The coronado package is available on npm. Use the corresponding best-practice mechanism to install.

TypeScript/JavaScript

Install using npm

npm install coronado

Install using yarn

yarn add coronado

Authentication

This component requires OAuth2 credentials available from triple - please contact a triple representative to get this information. Credentials cover:

  • clientID
  • clientName
  • secret
  • serviceURL - different URLs for sandbox, staging, production
  • tokenURL - the OAuth2 service provider

Creating a Client object with a given scope allows you to access any of the subsequent API wrappers below. It is assumed that the .env will be stored in the proper location given your operating system.

CORONADO_CLIENT_ID=
CORONADO_CLIENT_NAME=
CORONADO_SECRET=
CORONADO_SERVICE_URL=
CORONADO_TOKEN_URL=

First thing to do is initialize a Client with a given scope. It will throw an exception should the config not exist and/or auth fail.

const client = await Client.createClient(Scope.PUBLISHERS)

API wrappers usage

This example leverages the Publisher object and service, but the concepts shown here apply to all the Coronado API business objects. We use the async/await syntax for brevity but all of these methods return a Promise which can be used as expected.

# Return a Coronado client object for given entity
const publisher = await client.publisher()

const publisherList = await publisher.list()

const publisherEntity = await publisher.byId(42)

assert publisherList][3].assumedName === publisherEntity.assumedName

print(publisherEntity.address)

Implemented Wrappers

The following is a list of the wrappers we currently implement from the core numo library.

To be implemented:

  • Transactions
  • Offer Activation
  • Offer Display
  • Offer Display Rules (not ready yet)
  • Offer Providers
    • Merchants
    • Offers (not implemented yet)
  • Affiliate Links

Command Line

The library also contains a command line interface which exposes most of the functionality through command names and flags and exercises the wrappers.

Here we're assuming yarn but npm should work just the same.

To run the health check and return the JSON response execute from the root of project:

yarn cli health

API reference

Under construction

The API references for all supported languages are available from:

https://coronado.fi/docs

BUGS

See GitHub issues: https://github.com/coronado-fi/coronado-js/issues

AUTHOR

numo LLC and triple LLC, <coronado.project AT numo.com>

SEE ALSO

  • https://api.tripleup.dev/docs