Skip to content

patchboard/patchboard-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchboard Client for JavaScript

Usage

Client = require "patchboard-js"

# Give Client.discover the URL to a Patchboard API server
Client.discover "http://api.wherever.com/", (error, client) ->
  unless error?
    {users} = client.resources
    users.create {login: "matthew"}, (error, response) ->
      unless error?
        user.update {email: "matthew@mail.com"}, (error, response) ->
      else
        console.error error
  else
    console.error error