mirror of
https://github.com/danbulant/api_docs
synced 2026-06-24 09:02:20 +00:00
Merge pull request #23 from tripit/dev
Bug fixes, a new link in the README, and a new partials feature
This commit is contained in:
commit
0c41f3c213
6 changed files with 46 additions and 34 deletions
4
Gemfile
4
Gemfile
|
|
@ -11,7 +11,7 @@ gem "middleman-syntax"
|
||||||
gem 'middleman-gh-pages'
|
gem 'middleman-gh-pages'
|
||||||
|
|
||||||
# Live-reloading plugin
|
# Live-reloading plugin
|
||||||
gem "middleman-livereload", "~> 3.1.0"
|
gem "middleman-livereload", "~> 3.2.0"
|
||||||
|
|
||||||
gem 'redcarpet', '~> 3.1.1'
|
gem 'redcarpet', '~> 3.1.1'
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ platforms :mri_18 do
|
||||||
gem "ruby18_source_location"
|
gem "ruby18_source_location"
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "rake", "~> 10.1.0"
|
gem "rake", "~> 10.2.0"
|
||||||
|
|
||||||
gem 'execjs'
|
gem 'execjs'
|
||||||
gem 'therubyracer', :platforms => :ruby
|
gem 'therubyracer', :platforms => :ruby
|
||||||
22
Gemfile.lock
22
Gemfile.lock
|
|
@ -54,11 +54,11 @@ GEM
|
||||||
tilt (~> 1.4.1)
|
tilt (~> 1.4.1)
|
||||||
middleman-gh-pages (0.0.3)
|
middleman-gh-pages (0.0.3)
|
||||||
rake (> 0.9.3)
|
rake (> 0.9.3)
|
||||||
middleman-livereload (3.1.1)
|
middleman-livereload (3.2.1)
|
||||||
em-websocket (>= 0.2.0)
|
em-websocket (~> 0.5.0)
|
||||||
middleman-core (>= 3.0.2)
|
middleman-core (~> 3.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.8.4)
|
||||||
rack-livereload
|
rack-livereload (~> 0.3.15)
|
||||||
middleman-sprockets (3.3.1)
|
middleman-sprockets (3.3.1)
|
||||||
middleman-core (>= 3.2)
|
middleman-core (>= 3.2)
|
||||||
sprockets (~> 2.1)
|
sprockets (~> 2.1)
|
||||||
|
|
@ -67,13 +67,13 @@ GEM
|
||||||
middleman-syntax (2.0.0)
|
middleman-syntax (2.0.0)
|
||||||
middleman-core (~> 3.2)
|
middleman-core (~> 3.2)
|
||||||
rouge (~> 1.0)
|
rouge (~> 1.0)
|
||||||
multi_json (1.9.2)
|
multi_json (1.8.4)
|
||||||
rack (1.5.2)
|
rack (1.5.2)
|
||||||
rack-livereload (0.3.15)
|
rack-livereload (0.3.15)
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.2)
|
rack-test (0.6.2)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rake (10.1.1)
|
rake (10.2.2)
|
||||||
rb-fsevent (0.9.4)
|
rb-fsevent (0.9.4)
|
||||||
rb-inotify (0.9.3)
|
rb-inotify (0.9.3)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
|
|
@ -83,7 +83,7 @@ GEM
|
||||||
ref (1.0.5)
|
ref (1.0.5)
|
||||||
rouge (1.3.3)
|
rouge (1.3.3)
|
||||||
ruby18_source_location (0.2)
|
ruby18_source_location (0.2)
|
||||||
sass (3.2.17)
|
sass (3.2.18)
|
||||||
sprockets (2.12.0)
|
sprockets (2.12.0)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
|
@ -97,7 +97,7 @@ GEM
|
||||||
therubyracer (0.12.1)
|
therubyracer (0.12.1)
|
||||||
libv8 (~> 3.16.14.0)
|
libv8 (~> 3.16.14.0)
|
||||||
ref
|
ref
|
||||||
thor (0.18.1)
|
thor (0.19.1)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
uglifier (2.4.0)
|
uglifier (2.4.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
|
|
@ -110,9 +110,9 @@ DEPENDENCIES
|
||||||
execjs
|
execjs
|
||||||
middleman (~> 3.2.0)
|
middleman (~> 3.2.0)
|
||||||
middleman-gh-pages
|
middleman-gh-pages
|
||||||
middleman-livereload (~> 3.1.0)
|
middleman-livereload (~> 3.2.0)
|
||||||
middleman-syntax
|
middleman-syntax
|
||||||
rake (~> 10.1.0)
|
rake (~> 10.2.0)
|
||||||
redcarpet (~> 3.1.1)
|
redcarpet (~> 3.1.1)
|
||||||
ruby18_source_location
|
ruby18_source_location
|
||||||
therubyracer
|
therubyracer
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ Examples of Slate in the Wild
|
||||||
|
|
||||||
* [Orchestrate.io API docs](https://docs.orchestrate.io/)
|
* [Orchestrate.io API docs](https://docs.orchestrate.io/)
|
||||||
* [ChaiOne Gameplan API docs](http://chaione.github.io/gameplanb2b/#introduction)
|
* [ChaiOne Gameplan API docs](http://chaione.github.io/gameplanb2b/#introduction)
|
||||||
|
* [Drcaban's Build a Quine tutorial](http://drcabana.github.io/build-a-quine/#introduction)
|
||||||
|
|
||||||
Need Help? Found a bug?
|
Need Help? Found a bug?
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
||||||
20
source/includes/_errors.md
Normal file
20
source/includes/_errors.md
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Errors
|
||||||
|
|
||||||
|
<aside class="notice">This error section is stored in a separate file in `includes/_errors.md`. Slate allows you to optionally separate out your docs into many files...just save them to the `includes` folder and add them to the top of your `index.md`'s frontmatter. Files are included in the order listed.</aside>
|
||||||
|
|
||||||
|
The Kittn API uses the following error codes:
|
||||||
|
|
||||||
|
|
||||||
|
Error Code | Meaning
|
||||||
|
---------- | -------
|
||||||
|
400 | Bad Request -- Your request sucks
|
||||||
|
401 | Unauthorized -- Your API key is wrong
|
||||||
|
403 | Forbidden -- The kitten requested is hidden for administrators only
|
||||||
|
404 | Not Found -- The specified kitten could not be found
|
||||||
|
405 | Method Not Allowed -- You tried to access a kitten with an invalid method
|
||||||
|
406 | Not Acceptable -- You requested a format that isn't json
|
||||||
|
410 | Gone -- The kitten requested has been removed from our servers
|
||||||
|
418 | I'm a teapot
|
||||||
|
429 | Too Many Requests -- You're requesting too many kittens! Slown down!
|
||||||
|
500 | Internal Server Error -- We had a problem with our server. Try again later.
|
||||||
|
503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later.
|
||||||
|
|
@ -7,8 +7,12 @@ language_tabs:
|
||||||
- python
|
- python
|
||||||
|
|
||||||
toc_footers:
|
toc_footers:
|
||||||
- <a href='#'>Sign Up for a Developer Key</a>
|
- <a href='#'>Sign Up for a Developer Key</a>
|
||||||
- <a href='http://github.com/tripit/slate'>Documentation Powered by Slate</a>
|
- <a href='http://github.com/tripit/slate'>Documentation Powered by Slate</a>
|
||||||
|
|
||||||
|
includes:
|
||||||
|
- errors
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
|
|
@ -161,21 +165,3 @@ Parameter | Description
|
||||||
--------- | -----------
|
--------- | -----------
|
||||||
ID | The ID of the cat to retrieve
|
ID | The ID of the cat to retrieve
|
||||||
|
|
||||||
# Errors
|
|
||||||
|
|
||||||
The Kittn API uses the following error codes:
|
|
||||||
|
|
||||||
|
|
||||||
Error Code | Meaning
|
|
||||||
---------- | -------
|
|
||||||
400 | Bad Request -- Your request sucks
|
|
||||||
401 | Unauthorized -- Your API key is wrong
|
|
||||||
403 | Forbidden -- The kitten requested is hidden for administrators only
|
|
||||||
404 | Not Found -- The specified kitten could not be found
|
|
||||||
405 | Method Not Allowed -- You tried to access a kitten with an invalid method
|
|
||||||
406 | Not Acceptable -- You requested a format that isn't json
|
|
||||||
410 | Gone -- The kitten requested has been removed from our servers
|
|
||||||
418 | I'm a teapot
|
|
||||||
429 | Too Many Requests -- You're requesting too many kittens! Slown down!
|
|
||||||
500 | Internal Server Error -- We had a problem with our server. Try again later.
|
|
||||||
503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later.
|
|
||||||
|
|
@ -26,7 +26,7 @@ under the License.
|
||||||
|
|
||||||
<%= stylesheet_link_tag "screen", media: 'screen' %>
|
<%= stylesheet_link_tag "screen", media: 'screen' %>
|
||||||
<%= stylesheet_link_tag "print", media: 'print' %>
|
<%= stylesheet_link_tag "print", media: 'print' %>
|
||||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||||
<%= javascript_include_tag "all" %>
|
<%= javascript_include_tag "all" %>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -83,6 +83,11 @@ under the License.
|
||||||
<div class="page-wrapper">
|
<div class="page-wrapper">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
<% if current_page.data.includes %>
|
||||||
|
<% current_page.data.includes.each do |include| %>
|
||||||
|
<%= partial "includes/#{include}" %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="dark-box">
|
<div class="dark-box">
|
||||||
<div id="lang-selector">
|
<div id="lang-selector">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue