fetch-files
Download files using presets.
Install
Install with npm
$ npm i fetch-files --save
Usage
var FetchFiles = ;var downloader = destBase: 'foo/bar';
API
FetchFiles
Create an instance of FetchFiles
with the given options
.
Params
options
{Object}
.preset
Store a preset with the given configuration values.
Params
name
{String}: Preset name, e.g.github
config
{Object}returns
{Object}: ReturnsFetchFiles
for chaining
Example
downloader;
.queue
Add a URL to the download queue.
Params
url
{String}config
{Object}: The configuration to use for the URL.returns
{Object}: ReturnsFetchFiles
for chaining
Example
downloader;
.fetch
Fetch all files in the queue.
Params
cb
{Function}: callbackreturns
{Object}: ReturnsFetchFiles
for chaining
Example
downloader;
Complete example
Fetch three files from three different GitHub repos:
var FetchFiles = ;var downloader = destBase: 'foo/bar'; downloader
Related projects
- github-base: Base methods for creating node.js apps that work with the GitHub API.
- gists: Methods for working with the GitHub Gist API. Node.js/JavaScript
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 19, 2015.