anonfile-lib
Advanced tools
Comparing version
@@ -5,4 +5,8 @@ const requestlib = require('request'); | ||
var request = requestlib.defaults({ headers: { 'User-Agent': 'AnonFile-LIB Api Wrapper 1.0.0 by Jacub' } }); | ||
var request = requestlib.defaults({ headers: { 'User-Agent': 'AnonFile-LIB Api Wrapper 1.0.1 by Jacub' } }); | ||
/** | ||
* | ||
* @param {String} id | ||
* @description Gets the specified file from anonfile and provides info object. | ||
*/ | ||
function anonget(id) { | ||
@@ -15,2 +19,7 @@ return new Promise((resolve) => { | ||
} | ||
/** | ||
* | ||
* @param {String} filepath | ||
* @description Uploads the specified file to anon file and returns info object. | ||
*/ | ||
function anonupload(filepath) { | ||
@@ -17,0 +26,0 @@ return new Promise((resolve) => { |
{ | ||
"name": "anonfile-lib", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A anonfile api wrapper", | ||
@@ -5,0 +5,0 @@ "main": "anonfile.js", |
@@ -7,4 +7,40 @@ # AnonFile Lib | ||
###Docs: | ||
API Usage: | ||
<dl> | ||
<dt><a href="#get">get(id)</a></dt> | ||
<dd><p>Gets the specified file from anonfile and returns a promise of the info object.</p> | ||
</dd> | ||
<dt><a href="#upload">upload(filepath)</a></dt> | ||
<dd><p>Uploads the specified file to anon file and returns a promise of the info object.</p> | ||
</dd> | ||
</dl> | ||
<a name="get"></a> | ||
## get(id) | ||
Gets the specified file from anonfile and returns a promise of the info object. | ||
**Kind**: module function | ||
| Param | Type | | ||
| --- | --- | | ||
| id | <code>String</code> | | ||
<a name="upload"></a> | ||
## upload(filepath) | ||
Uploads the specified file to anon file and returns a promise of the info object. | ||
**Kind**: module function | ||
| Param | Type | | ||
| --- | --- | | ||
| filepath | <code>String</code> | | ||
------------ | ||
###Examples: | ||
```js | ||
@@ -11,0 +47,0 @@ const anonfile = require('anonfile-lib'); |
2590
64.97%41
32.26%58
163.64%