Class SpazInstapaper
Defined in: spazinstapaper.js.
Constructor Attributes | Constructor Name and Description |
---|---|
SpazInstapaper(opts)
a library to interact with the Instapaper API |
Method Attributes | Method Name and Description |
---|---|
add(data, onSuccess, onFailure)
save a URL |
|
authenticate(data, onSuccess, onFailure)
Authenticate against the service (not ACTUALLY required -- see http://blog.instapaper.com/post/73123968/read-later-api) |
Class Detail
SpazInstapaper(opts)
a library to interact with the Instapaper API
- Parameters:
- {object} opts
- options
- {string} opts.username Optional
- the username
- {string} opts.password Optional
- the password
Method Detail
add(data, onSuccess, onFailure)
save a URL
- Parameters:
- {object} data
- data hash we'll pass to authenticate
- {string} data.url
- the url to save
- {string} data.username Optional
- the username -- required if not set in constructor
- {string} data.password Optional
- the password -- required if not set in constructor
- {string} data.title Optional
- the title. If set, will not auto-retrieve title
- {string} data.selection Optional
- text to associate with the URL
- {number} data.auto-title Optional
- Whether to try to retrieve the document's title from the URL automatically. 1 or 0
- {function} onSuccess
- callback to fire on success. takes one param, a hash with 'url' and 'title'
- {function} onFailure
- callback to fire on failure. takes parameters errmsg, status_code, xhr
authenticate(data, onSuccess, onFailure)
Authenticate against the service (not ACTUALLY required -- see http://blog.instapaper.com/post/73123968/read-later-api)
- Parameters:
- {object} data
- data hash we'll pass to authenticate
- {string} data.username Optional
- the username -- required if not set in constructor
- {string} data.password Optional
- the password -- required if not set in constructor
- {function} onSuccess
- callback to fire on success. takes no parameters
- {function} onFailure
- callback to fire on failure. takes parameters errmsg, status_code, xhr