JSFiddle Api
Node library for accessing JSFiddle resources.
Example and test
// require jsfiddle apivar JSFiddleApi = ; // get this fiddleJSFiddleApi;
Run this example using
$ npm test > jsfiddle-api@0.0.1 test /home/.../jsfiddle-api> node test/1.js
Methods
getFiddle (@options, @callback)
@options
is a string containing the fiddle id and the version (e.g."iu8B29/1"
)@callback
is a function that will be called after fetching the fiddle information- First parameter will be the error (
null
if the call was made successfully) - Second parameter will be an object containing three fields:
html
: the HTML code provided in the JSFiddlejs
: the JavaScript codecss
: and the CSS code
- First parameter will be the error (
Changelog
v0.1.0
- Initial release
License
See LICENSE file.