npm install --save lbry
Lbry-js supports both the LBRY daemon and LbryCrd; the api's are similar but slightly different. The daemon accepts arguments as an object, wheras since LbryCrd expects them as an array, you must pass them as an ordered array. see (the RPC docs)[https://lbryio.github.io/lbry/] for the parameters for each method on the corresponding clients.
// If in node; you'll need to supply a 'fetch' polyfill// global.fetch = require('node-fetch')const DaemonClient CrdClient =const client = ''clientclientclientconst crd = '' 'rpcuser' 'rpcpass'crdcrd
lbry-js is programatically generated by jrgen. The JSON file consumed by jrgen is currently generated by jrgen.js in the scripts directory, but will eventually be targeted at the artifact being generated for lbry.tech api documentation.
# do this once$ npm install$ npm setup# set up lbry-daemon virtualenv to get a raw json file from lbry-daemon, ensure a daemon is running then cd back here# also make sure a LbryCrd daemon is running$ npm run build$ npm test
Roadmap to 0.1.0
- basic client.request(<\method_name>, [params]) lbrycrd client
- programmatic generation of full lbry-daemon client
- lbry-daemon api tests
- programmatic generation of lbrycrd client
- lbrycrd api tests
- don't use a custom fork of jrgen; use plugin systems
- npm test script
- npm build script