Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

fritzing/fritzing-parts-api-client-js

Repository files navigation

This API is unmaintained and as far as we know, not used by anybody. See issue #19

fritzing-parts-api-client-js Build Status

This is a simple javascript/nodejs api client that connects to the fritzing parts data at https://fritzing.github.io/fritzing-parts. The api client support functions to fetch fzb, fzp and svg files.

File Structure

  • docs generated esdoc artifact
  • lib generated babel artifact
  • src the main sourcecode
  • test jest test code

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

const {FritzingPartsAPIClient} = require('fritzing-parts-api-client-js')
//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 [email protected]: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