0.0.19 • Published 1 year ago

coronado v0.0.19

Weekly downloads
-
License
SEE LICENSE IN ht...
Repository
github
Last release
1 year ago

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:

Python API reference implementation:

JVM API:

Description

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

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

0.0.17

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.3

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago