bricklink-api
Node package for connecting to Bricklink's API.
npm install --save bricklink-api
Basic Usage
Initialize a client with your OAuth credentials as supplied at the following:
https://www.bricklink.com/v2/api/register_consumer.page
You are required to have a Bricklink account and register your IP address from which your application will be using the API.
var api = ;var Client = apiClient ItemType = apiItemType; var bricklink = "consumer_key": "<ConsumerKey>" "consumer_secret": "<ConsumerSecret>" "token": "<TokenValue>" "token_secret": "<TokenSecret>" ; bricklink ; \\ Alternate Usage: var CatalogItem = apiCatalogItem;var req = CatalogItem;bricklink ;
ES6 Support
Read basic usage.
; const bricklink = "consumer_key": "<ConsumerKey>" "consumer_secret": "<ConsumerSecret>" "token": "<TokenValue>" "token_secret": "<TokenSecret>" ; bricklink ; \\ Alternate Usage: let req = CatalogItem;bricklink ;
Proxy Support
Due to the IP restriction you may need to use a proxy in a cloud hosted environment where IP addresses are not always reserved.
First you will need to have an https capable proxy agent.
npm install -S https-proxy-agent
Then you will need to pass in a created agent in the agent
parameter of the
client configuration options.
;; const proxy = 'http://217.33.216.114:8080'; const bricklink = "agent": proxy "consumer_key": "<ConsumerKey>" "consumer_secret": "<ConsumerSecret>" "token": "<TokenValue>" "token_secret": "<TokenSecret>" ;
Documentation
Full API documentation is available at:
https://ryansh100.github.io/bricklink-api
Change Log
- 2017/04/03: Fix bugs with require of dictionaries. Update to make more intuitive imports. Add support for color and category lookup.