File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ language_tabs:
5
5
- shell
6
6
- ruby
7
7
- python
8
+ - javascript
8
9
9
10
toc_footers :
10
11
- <a href='#'>Sign Up for a Developer Key</a>
@@ -46,6 +47,12 @@ curl "api_endpoint_here"
46
47
-H " Authorization: meowmeowmeow"
47
48
```
48
49
50
+ ``` javascript
51
+ const kittn = require (' kittn' );
52
+
53
+ let api = kittn .authorize (' meowmeowmeow' );
54
+ ```
55
+
49
56
> Make sure to replace ` meowmeowmeow ` with your API key.
50
57
51
58
Kittn uses API keys to allow access to the API. You can register a new Kittn API key at our [ developer portal] ( http://example.com/developers ) .
@@ -81,6 +88,13 @@ curl "http://example.com/api/kittens"
81
88
-H " Authorization: meowmeowmeow"
82
89
```
83
90
91
+ ``` javascript
92
+ const kittn = require (' kittn' );
93
+
94
+ let api = kittn .authorize (' meowmeowmeow' );
95
+ let kittens = api .kittens .get ();
96
+ ```
97
+
84
98
> The above command returns JSON structured like this:
85
99
86
100
``` json
@@ -140,6 +154,13 @@ curl "http://example.com/api/kittens/2"
140
154
-H " Authorization: meowmeowmeow"
141
155
```
142
156
157
+ ``` javascript
158
+ const kittn = require (' kittn' );
159
+
160
+ let api = kittn .authorize (' meowmeowmeow' );
161
+ let max = api .kittens .get (2 );
162
+ ```
163
+
143
164
> The above command returns JSON structured like this:
144
165
145
166
``` json
You can’t perform that action at this time.
0 commit comments