Socket
Socket
Sign inDemoInstall

oriskami

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oriskami

API wrapper to Oriskami


Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Oriskami node.js bindings

npm version Build Status Inline docs

The Oriskami Node.js library provides access to the Oriskami API from applications written in the Node.js language. It includes a pre-defined set of classes for API resources.

Quick Start

Install the nodejs binding of oriskami from npm.

npm install oriskami

Initialize the binding with your API access token:

var Oriskami    = require("oriskami")
  , oriskami    = new Oriskami("YOUR_API_ACCESS_TOKEN", "API_VERSION")

Send event

oriskami.events.create({
  "parameters"  :{
    "id": 16646,
    "email": "abc@gmail.com",
    "names": "M Abc",
    "account_creation_time": "2017-05-17 21:50:00",
    "account_id": "10000",
    "account_n_fulfilled": "1",
    "account_total_since_created": "49.40",
    "account_total_cur": "EUR",
    "invoice_time": "2017-05-17 21:55:00",
    "invoice_address_country": "France",
    "invoice_address_place": "75008 Paris",
    "invoice_address_street1": "1 Av. des Champs-Élysées",
    "invoice_name": "M ABC",
    "invoice_phone1": "0123456789",
    "invoice_phone2": null,
    "transport_date": "2017-05-18 08:00:00",
    "transport_type": "Delivery",
    "transport_mode": "TNT",
    "transport_weight": "9.000",
    "transport_unit": "kg",
    "transport_cur": "EUR",
    "delivery_address_country": "France",
    "delivery_address_place": "75008 Paris",
    "delivery_address_street1": "1 Av. des Champs-Élysées",
    "delivery_name": "M ABC",
    "delivery_phone1": "0123450689",
    "customer_ip_address": "1.2.3.4",
    "pmeth_origin": "FRA",
    "pmeth_validity": "0121",
    "pmeth_brand": "MC",
    "pmeth_bin": "510000",
    "pmeth_3ds": "-1",
    "cart_products": [ " Product ref #12345 " ],
    "cart_details": [
      {
      "name": "Product ref #12345",
      "pu": "10.00",
      "n": "1",
      "reimbursed": " 0",
      "available": "1",
      "amount": "10.00",
      "cur": "EUR"
    }
    ],
    "cart_n": "15000",
    "order_payment_accepted": "2017-05-17 22:00:00",
    "amount_pmeth": "ABC Payment Service Provider",
    "amount_discounts": 0.00,
    "amount_products": 20.00,
    "amount_transport": 10.00,
    "amount_total": 30.00,
    "amount_cur": "EUR"
  }
, function(err, res){
  if(err){ 
    console.log(err)
    return err 
  }
})
oriskami.events.retrieve("16646", function(err, res){
  if(err){ 
    console.log(err)
    return err
  }
})

Resources, actions, and arguments

Every resource is accessed via your oriskami instance and accepts an optional callback as the last argument. In the matrix below we list the resources (rows), the actions (columns) and the arguments (cells). The full documentation is available at https://oriskami.com/docs/nodejs.

ResourceCRUDLTest Specs
SettingsAuth, Credentials
RouterRouter123See on github
RouterParameter123, {}{}See on github
RouterData123, {}{}See on github
RouterDataGeocoding{}See on github
RouterDataGeoip123, {}{}See on github
RouterDataPhone123, {}{}See on github
RouterDataBlacklist123, {}{}See on github
RouterDataBin123, {}{}See on github
RouterDataFeature{}See on github
RouterFlow{}123, {}{}{}See on github
RouterBackup{}{}{}{}See on github
RouterTest---
Event dataEvent{}123123, {}123{}See on github
EventPast{}{}See on github
EventNotification123{}See on github
EventLastId{}See on github
EventLabel123123, {}123{}See on github
EventQueue123123, {}123{}See on github
EventReview123123, {}123{}See on github
Flow filtersFilter123, {}{}See on github
FilterWhitelist{}123, {}123{}See on github
FilterBlacklist123, {}{}See on github
FilterRulesCustom{}123, {}123{}See on github
FilterRulesBase123, {}{}See on github
FilterRulesAI123, {}123{}See on github
FilterScoringsDedicated123, {}{}See on github
Flow notifiersNotifier123, {}{}See on github
NotifierEmail{}123, {}123{}See on github
NotifierSms{}123, {}123{}See on github
NotifierSlack{}123, {}123{}See on github
NotifierWebhook{}123, {}123{}See on github
NotifierECommerce123, {}{}See on github
  • C: Create
  • R: Retrieve
  • U: Update
  • D: Delete
  • L: List
  • 123: resource id
  • {}: JSON with query parameters

Filter parameters

FilterDefaultExampleDescription
limit10{"limit":10}At most 10 returned results
gt{"id":{"gt":10}}id greater than 10
gte{"id":{"gte":10}}id greater than or equal
lt{"id":{"lt":10}}id less than
lte{"id":{"lte":10}}id less than or equal

Configuration

Extend this oriskami instance with a new resource whose accessibility is controlled by access rights.

oriskami.extend("resourceName", "resourcePath") // extend with 

Change API access token dynamically:

oriskami.set("auth", "your-api-token")

Define timeout of the binding:

oriskami.set("timeout", 20000) // in ms`, node's default is `120000ms`

Development

To run the tests, you will need a Oriskami test API key (from your Oriskami dashboard)

export ORISKAMI_TEST_TOKEN="your-test-api-key"
npm install -g mocha
npm test

Note: on Windows, use SET instead of export for setting the ORISKAMI_TEST_TOKEN environment variable.

Issues and feature requests

Author

Keywords

FAQs

Package last updated on 11 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc