Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

workfrom

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workfrom

Workfrom.co API client for Node.js and the browser

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

workfrom NPM version Build Status Dependency Status

Workfrom.co API client for Node.js

workfrom is a high-level library for interacting with the Workfrom API.

Works on all major Node versions- we test 0.10, 0.12, 4.0, 5.0, and 6.0.

Getting started

Install via npm

$ npm i --save workfrom

Create a client instance

import Workfrom from 'workfrom'; // or: var Workfrom = require('workfrom')

let wf = Workfrom({
  id: 'abcdef1234567890' // replace with your Workfrom appid
});

Documentation

Methods are namespaced under endpoints, which logically separate things you can interact with.

Generally, the interface is laid out as [endpoint].[method].

places.get

Get information on a specific place

wf.places.get({ id: 9075 })
  .then(place => { /* do stuff */ });

wf.places.get({ slug: 'venice-grind' })
  .then(place => { /* do stuff */ });
ParameterTypeRequired?Notes
idInteger or Stringyes*mutually exclusive with slug
slugStringyes*mutually exclusive with id

places.search

Search for places by name

wf.places.search({ name: 'Starbucks', limit: 10, page: 2 })
  .then(results => { /* do stuff */ });
ParameterTypeRequired?Notes
nameStringyes
limitIntegernodefaults to 20
pageIntegernodefaults to 1

places.near

Search for places near a location

wf.places.near({ postalCode: 94104, limit: 10, page: 1 })
  .then(results => { /* do stuff */ });

wf.places.near({ lat: '37.783575', long: '-122.409048', radius: 2 })
  .then(results => { /* do stuff */ });
ParameterTypeRequired?Notes
latStringyes*required if postalCode is omitted
longStringyes*required if postalCode is omitted
postalCodeInteger or Stringyes*required if lat & long are omitted
radiusIntegernoin miles, defaults to 5; not allowed alongside postalCode
limitIntegernodefaults to 20; not allowed alongside lat/long
pageIntegernodefaults to 1; not allowed alongside lat/long

Contributing

Pull requests are welcome, provided that documentation and tests are updated to match any changes made.

Keywords

workfrom

FAQs

Package last updated on 18 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts