mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-04-29 04:15:00 +08:00
Add multiple-tabs-per-language test
This commit is contained in:
@@ -5,7 +5,8 @@ language_tabs:
|
||||
- shell
|
||||
- ruby
|
||||
- python
|
||||
- javascript
|
||||
- javascript--browser: Browser!
|
||||
- javascript--node: Node!
|
||||
|
||||
toc_footers:
|
||||
- <a href='#'>Sign Up for a Developer Key</a>
|
||||
@@ -47,12 +48,16 @@ curl "api_endpoint_here"
|
||||
-H "Authorization: meowmeowmeow"
|
||||
```
|
||||
|
||||
```javascript
|
||||
```javascript--browser
|
||||
const kittn = require('kittn');
|
||||
|
||||
let api = kittn.authorize('meowmeowmeow');
|
||||
```
|
||||
|
||||
```javascript--node
|
||||
// node code here!
|
||||
```
|
||||
|
||||
> Make sure to replace `meowmeowmeow` with your API key.
|
||||
|
||||
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).
|
||||
@@ -88,13 +93,17 @@ curl "http://example.com/api/kittens"
|
||||
-H "Authorization: meowmeowmeow"
|
||||
```
|
||||
|
||||
```javascript
|
||||
```javascript--browser
|
||||
const kittn = require('kittn');
|
||||
|
||||
let api = kittn.authorize('meowmeowmeow');
|
||||
let kittens = api.kittens.get();
|
||||
```
|
||||
|
||||
```javascript--node
|
||||
// node code here!
|
||||
```
|
||||
|
||||
> The above command returns JSON structured like this:
|
||||
|
||||
```json
|
||||
@@ -154,13 +163,17 @@ curl "http://example.com/api/kittens/2"
|
||||
-H "Authorization: meowmeowmeow"
|
||||
```
|
||||
|
||||
```javascript
|
||||
```javascript--browser
|
||||
const kittn = require('kittn');
|
||||
|
||||
let api = kittn.authorize('meowmeowmeow');
|
||||
let max = api.kittens.get(2);
|
||||
```
|
||||
|
||||
```javascript--node
|
||||
// node code here!
|
||||
```
|
||||
|
||||
> The above command returns JSON structured like this:
|
||||
|
||||
```json
|
||||
|
||||
@@ -30,10 +30,10 @@ under the License.
|
||||
$(".lang-selector a").removeClass('active');
|
||||
$(".lang-selector a[data-language-name='" + language + "']").addClass('active');
|
||||
for (var i=0; i < languages.length; i++) {
|
||||
$(".highlight." + languages[i]).hide();
|
||||
$(".highlight.tab-" + languages[i]).hide();
|
||||
$(".lang-specific." + languages[i]).hide();
|
||||
}
|
||||
$(".highlight." + language).show();
|
||||
$(".highlight.tab-" + language).show();
|
||||
$(".lang-specific." + language).show();
|
||||
|
||||
global.toc.calculateHeights();
|
||||
|
||||
Reference in New Issue
Block a user