Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.
/ octopart-node Public archive
forked from omdathetkan/octopart

A simple wrapper for the Octopart V3 API for Node

License

Notifications You must be signed in to change notification settings

octopart/octopart-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Octopart

A simple wrapper for the Octopart V3 API for Node. http://octopart.com/api/docs/v3/rest-api

Quick Example

var octopart = require("octopart");

octopart.apikey = '12345678';

var queries = [
    {reference: '1', mpn: 'SN74S74N'},
    {reference: '2', mpn: 'CRCW060310K0FKEA'},
];

octopart.parts.match(queries, {
    exact_only: true,
    show: ['uid','mpn','manufacturer']
}).success(function(body) {
    for(var i=0;i<body.results.length;i++) {
        console.log("Result", i, body.results[i].items);
    }
}).failure(function(err) {
    console.log("Ooops....", err");
});

Implemented endpoints

octopart.brands.get(uids, options)
octopart.brands.search(q, options)
octopart.categories.get(uids, options)
octopart.categories.search(q, options)
octopart.parts.get(uids, options)
octopart.parts.match(queries, options)
octopart.parts.search(q, options)
octopart.sellers.get(uids, options)
octopart.sellers.search(q, options)

About

A simple wrapper for the Octopart V3 API for Node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published