Skip to content

Commit f074168

Browse files
Update readme to explain the settings some more
1 parent 7ab5175 commit f074168

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ATLauncher-API---NodeJS
22
=======================
33
Node.js module for interacting with the ATLauncher API.
44

5-
Examples
5+
Getting Started
66
----
77
To get started simply require the package and optionally provide an optional object with settings.
88

@@ -14,6 +14,20 @@ var api = require('atlauncher-api')({
1414

1515
The api_key argument is your API-KEY used for admin or PSP api calls.
1616

17+
All the arguments you can pass in are below:
18+
19+
```
20+
{
21+
base_url: 'https://api.atlauncher.com/', # The base url of the api
22+
api_version: 'v1', # A string representing the verison to be used in URLS
23+
api_key: false, # The API key for authenticated requests/higher rate limits
24+
return_full: false # If the returns from each callback should contain all the data from the response or just the data attribute of the response
25+
}
26+
```
27+
28+
Examples
29+
----
30+
1731
For instance for running public api calls such as getting a list of all packs you can use the following:
1832

1933
```
@@ -28,6 +42,22 @@ api.packs.full.all(function(err, res) {
2842
});
2943
```
3044

45+
Or to get the entire return from the API and not just the data:
46+
47+
```
48+
var api = require('atlauncher-api')({
49+
return_full: true
50+
});
51+
52+
api.packs.full.all(function(err, res) {
53+
if (err) {
54+
return console.error(err);
55+
}
56+
57+
console.log(res.data);
58+
});
59+
```
60+
3161
Documentation
3262
----
3363
* [ATLauncher API Docs](http://wiki.atlauncher.com/api:information)

0 commit comments

Comments
 (0)