diff --git a/source/index.html.md b/source/index.html.md index fc26b19..8fd3b20 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -187,3 +187,53 @@ Parameter | Description --------- | ----------- ID | The ID of the kitten to retrieve +## Delete a Specific Kitten + +```ruby +require 'kittn' + +api = Kittn::APIClient.authorize!('meowmeowmeow') +api.kittens.delete(2) +``` + +```python +import kittn + +api = kittn.authorize('meowmeowmeow') +api.kittens.delete(2) +``` + +```shell +curl "http://example.com/api/kittens/2" + -X DELETE + -H "Authorization: meowmeowmeow" +``` + +```javascript +const kittn = require('kittn'); + +let api = kittn.authorize('meowmeowmeow'); +let max = api.kittens.delete(2); +``` + +> The above command returns JSON structured like this: + +```json +{ + "id": 2, + "deleted" : ":(" +} +``` + +This endpoint retrieves a specific kitten. + +### HTTP Request + +`DELETE http://example.com/kittens/` + +### URL Parameters + +Parameter | Description +--------- | ----------- +ID | The ID of the kitten to delete + diff --git a/source/javascripts/app/_toc.js b/source/javascripts/app/_toc.js index ebd5194..17e785c 100644 --- a/source/javascripts/app/_toc.js +++ b/source/javascripts/app/_toc.js @@ -59,9 +59,12 @@ var $best = $toc.find("[href='" + best + "']").first(); if (!$best.hasClass("active")) { + // .active is applied to the ToC link we're currently on, and its parent