Skip to content

Commit b304428

Browse files
committed
Style(comment): Add intro and JSdoc
1 parent 2176af7 commit b304428

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

requestbin.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
Name: requestbin
3+
Description: Node.js package to access the Requestb.in API
4+
Author: Franklin van de Meent (https://frankl.in)
5+
License: Unlicence (public domain, see LICENSE file)
6+
Source & docs: https://github.com/fvdm/nodejs-requestbin
7+
Feedback: https://github.com/fvdm/nodejs-requestbin/issues
8+
*/
9+
10+
111
var httpreq = require ('httpreq');
212
var config = {
313
timeout: 5000,
@@ -6,6 +16,18 @@ var config = {
616
userAgent: null
717
};
818

19+
20+
/**
21+
* Communicate with API
22+
*
23+
* @callback callback
24+
* @param method {string} - HTTP method, GET, POST, etc
25+
* @param path {string} - Request path
26+
* @param [props] {object} - Send query or POST parameters
27+
* @param callback {function} - `function (err, data) {}`
28+
* @return {void}
29+
*/
30+
931
function talk (method, path, props, callback) {
1032
var options = {
1133
url: (config.baseURL || 'http://requestb.in/api/v1/') + path,
@@ -61,6 +83,7 @@ function talk (method, path, props, callback) {
6183
});
6284
}
6385

86+
6487
module.exports = {
6588
config: function (props) {
6689
var name;

0 commit comments

Comments
 (0)