From b9a98e75f3863b0bd63756be8f79a04c487f2181 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Sun, 2 Dec 2018 10:17:31 -0500 Subject: [PATCH] Upgrade to 1.0.1 --- README.md | 22 +++++++++++----------- package.json | 2 +- src/index.js | 4 +++- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8a61727..e9e72aa 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,17 @@ # FlipsideJS -FlipsideJS provides a library embeddable widgets that display data from the Flipside Platform API, including FCAS. +FlipsideJS provides a library of embeddable widgets that display data from the Flipside Platform API, including FCAS. + +## Example + +[View Live FCAS Example](https://jsfiddle.net/flipsidejim/f7zpd0uj/12/) ## Install +The FlipsideJS library is made available over our CDN to ensure a speedy response time. + ```html - + ``` ## Usage @@ -14,18 +20,18 @@ FlipsideJS provides a library embeddable widgets that display data from the Flip
``` ## API _create(id: string, symbol: string, options: object)_ -Creates an FCAS widget in the given element ID. +Creates an FCAS widget in the given DOM element ID. #### Parameters -- _id_: ID of the element in which to create the widget. +- _id_: ID of the DOM element in which to create the widget. - _symbol_: Symbol of the asset. e.g "BTC" - _opts_: Display options for the widget @@ -56,9 +62,3 @@ flipside.create("container", "ETH", { ``` $ yarn run build ``` - -## Development - -``` -$ yarn run dev -``` diff --git a/package.json b/package.json index a89d209..b88b503 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flipside-js", - "version": "1.0.0", + "version": "1.0.1", "description": "FlipsideJS provides a library embeddable widgets that display data from the Flipside Platform API, including FCAS.", "main": "index.js", "scripts": { diff --git a/src/index.js b/src/index.js index 64659fa..f3e0329 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,8 @@ class Flipside { this.api = new API(apiKey); } - create(id, symbol, opts) { + createFCAS(id, symbol, opts) { + let symbol = symbol.toLowerCase(); const defaults = { score: true, plot: true, @@ -17,6 +18,7 @@ class Flipside { rank: true }; const mergedOpts = Object.assign({}, defaults, opts); + render( , document.getElementById(id)