blua-blue-js
v1.0.1
Published
- cjs - es2015 - esm - umd
Downloads
2
Readme
Blua.Blue universal JS SDK
- cjs
- es2015
- esm
- umd
Installation
As UMD
<script src="https://unpkg.com/[email protected]/dist/axios.min.js"></script> // requires axios to be defined
<script src="dist/umd/BluaBlueClient.js"></script>
<script>
const public = 'D1BA9ADD390E11EC9509D83BBF2ADDD8';
const private = '3a91fe7a79f12a28de7fe5c4dccce19d3e37'; // needless to say in browser: use a read-only-scope-key
const client = new BluaBlueClient(public, private);
const container = document.getElementById('my-articles')
client.authenticate().then(()=>{
client.getOwnArticles().then(articles => {
console.log(articles)
})
})
</script>
In node
const Blua = require('blua-blue-js/dist/cjs').default
const client = new Blua('5594613839C611EC9509D83BBF2ADDD8','3a91fe7a79f12a28de7fe5c4dccce19d3e37');
(async ()=>{
await client.authenticate();
console.log(await client.getOwnArticles())
})()
CDN
| Format | CDN | | --- | --- | | esm | https://cdn.jsdelivr.net/npm/blua-blue-js@latest/dist/esm/index.js | | es2015 | https://cdn.jsdelivr.net/npm/blua-blue-js@latest/dist/es2015/index.js | | cjs | https://cdn.jsdelivr.net/npm/blua-blue-js@latest/dist/cjs/index.js | | umd | https://cdn.jsdelivr.net/npm/blua-blue-js@latest/dist/umd/BluaBlueClient.min.js |