Skip to content

danielbeardsley/dozuki-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dozuki-js

Build Status

A javascript library for accessing Dozuki.com's api.

Usage

var http = new Dozuki.wrapers.jquery($);
var dozuki = new Dozuki("www.ifixit.com", http);
dozuki.guides.get(1234).then(function(guide) {
   console.log(guide.title);
});

Interface

Dozuki.guides

An object exposing methods on the guide collection.

Dozuki.guides.get(guideid)

return a promise that will be fulfilled with a JSON object directly from the API

Dozuki.http modules

A mock module (Dozuki.http.mock) and a jQuery module (Dozuki.http.mock) are provided to give Dozuki a way to make requests. It's pretty trivial make a new module for any given HTTP library.

An http module only needs to have one method, send(url, options) the options object must support these attributes.

data:       Object containing key:value mappings to send with the request
            (as JSON for POST and as a query-string for GET)
headers:    Key:value map of any HTTP headers that should be sent.
method:     HTTP Method to use for the request: get, post, patch, ...

About

Javascript wrapper for ifixit.com's api (or any dozuki.com site)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published