Package Exports
- the-noun-project-v2
- the-noun-project-v2/nounproject.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (the-noun-project-v2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
The Noun Project - V2 API Wrapper
Node.js wrapper for The Noun Project's API.
This is heavily based on Ross Hettel's original wrapper for the V1 API. The V2 API has less endpoints, which I have removed from this package.
Installation
Simply add to your project with
npm install the-noun-project-v2
In your project file:
var NounProject = require("the-noun-project-v2"),
nounProject = new NounProject({
key: "foo",
secret: "bar",
});
You can get your keys from The Noun Project's API page.
Usage
See The Noun Project API Explorer for more information on the endpoints available.
The query string options
object is optional and can be omitted. See the tests for more information.
nounProject.getIconsByTerm("goat", { limit: 5 }, function (err, data) {
if (!err) {
console.log(data.icons);
}
});
or
nounProject.getIconsByTerm("goat", function (err, data) {
if (!err) {
console.log(data.icons);
}
});