Home Reference Source Test

fritzing-parts-api-client-js Build Status

This is a super simple nodejs Api-Client. It connects to the fritzing-parts-server and fetches fritzing parts.

File Structure

Install

install with yarn

yarn add fritzing/fritzing-parts-api-client-js

or use npm

npm install fritzing/fritzing-parts-api-client-js --save

Usage

initialize an api client and fetch /fzps endpoint

import {FritzingPartsAPIClient} from 'fritzing-parts-api-client-js'

FritzingPartsAPIClient.getFzps()
.then((fzpz) => {
  console.log(fzps)
})
.catch((err) => {
  console.error(err)
})

Api Documentation

The complete Api Documentation can be found here: Api Docs

Development

clone the repository

git clone git@github.com:fritzing/fritzing-parts-api-client-js.git
make test
make lint

if you have lint errors you can try running make lint-fix to fix the errors

to build an es5 compatible version run

make build

to generate the docs, run

make docs

if you want to open the docs after generating in your browser, run

make docs-open

License

MIT License