forked from hunvreus/carte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d1354b7
Showing
16 changed files
with
833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
_site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: default | ||
title: 404 – Not found | ||
--- | ||
|
||
<h2>404 – Not found</h2> | ||
|
||
<p>The file or page you're looking for does not exist or has been moved.</p> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
exclude: ['README.markdown'] | ||
permalink: ':title' | ||
pygments: true | ||
safe: false | ||
title: 'Carte' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<title>{{ site.title }}</title> | ||
|
||
<!-- Meta --> | ||
<meta charset="utf-8"> | ||
<meta name="description" content="Documentation website"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
|
||
<!-- CSS --> | ||
<link href="/css/normalize.css" rel="stylesheet" type="text/css"> | ||
<link href="/css/style.css" rel="stylesheet" type="text/css"> | ||
</head> | ||
<body> | ||
{{ content }} | ||
|
||
<!-- JS --> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
(function($) { | ||
// Collapsible articles | ||
$('article').each(function () { | ||
var that = $(this); | ||
var header = that.children('a'); | ||
var body = that.children('.body'); | ||
body.hide(); | ||
header.toggle( | ||
function () { body.slideDown('fast'); that.addClass('active'); }, | ||
function () { body.slideUp('fast'); that.removeClass('active'); } | ||
); | ||
}); | ||
|
||
// Expanding the article on link click and scrolling down to it | ||
$('#links a').each(function () { | ||
var that = $(this); | ||
that.click(function (e) { | ||
e.preventDefault(); | ||
var that = $(this); | ||
var id = that.attr('href').substring(1); | ||
var header = $('article a[name="'+ id +'"]') | ||
if (!header.parent().hasClass('active')) header.trigger('click'); | ||
$('html, body').animate({ | ||
scrollTop: header.offset().top | ||
}, 'fast'); | ||
}); | ||
}); | ||
})(jQuery); | ||
</script> | ||
<!--[if lt IE 9]> | ||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="refresh" content="0;url={{ page.refresh_to_post_id }}.html" /> | ||
</head> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
path: '/stuff/:id' | ||
title: 'Delete a thing' | ||
type: 'DELETE' | ||
parameters: | ||
- name: 'id' | ||
description: 'the id of the thing to delete.' | ||
|
||
layout: nil | ||
--- | ||
|
||
This method allows the user to post a new thing to his stuff. | ||
|
||
### Request | ||
|
||
* Authentication is required. | ||
* The body is omitted. | ||
|
||
### Response | ||
|
||
Sends back a collection of things. | ||
|
||
```Status: 200 Deleted``` | ||
|
||
```{ | ||
code: 200, | ||
message: 'Your thing (id: 736) was deleted' | ||
}``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
path: '/stuff/:id' | ||
title: 'Update a thing' | ||
type: 'PUT' | ||
|
||
layout: post | ||
--- | ||
|
||
This method allows the user to retrieve his stuff. | ||
|
||
### Request | ||
|
||
#### Requirements | ||
|
||
* **URL**: `:id` is the id the thing to update.' | ||
* **Header**: Valid authentication token. | ||
* **Body**: can't be empty and must include at least **name**, a `string` that will be used as the name of the thing. | ||
|
||
#### Sample | ||
|
||
```Authentication: bearer f862f658-ad89-4fcb-995b-7a4c50554ff6``` | ||
```{ | ||
name: 'My new thing' | ||
}``` | ||
### Response | ||
Sends back a collection of things. | ||
```Status: 200 OK``` | ||
```{ | ||
{ | ||
id: thing_1, | ||
name: 'My first thing' | ||
}, | ||
{ | ||
id: thing_2, | ||
name: 'My second thing' | ||
} | ||
}``` | ||
For errors, see the [code] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
path: '/stuff' | ||
title: 'Post a thing' | ||
type: 'POST' | ||
|
||
layout: post | ||
--- | ||
|
||
This method allows users to crate a new thing. | ||
|
||
### Request | ||
|
||
Expects a fully formed thing object. | ||
|
||
```Authentication: bearer TOKEN``` | ||
|
||
```{ | ||
name: 'My new thing' | ||
}``` | ||
### Response | ||
**If succeeds**, returns the created thing. | ||
```Status: 201 Created``` | ||
```{ | ||
id: new_thing, | ||
name: 'My new thing' | ||
}``` | ||
ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
path: '/stuff' | ||
title: 'Get stuff' | ||
type: 'GET' | ||
|
||
layout: post | ||
--- | ||
|
||
This method allows users to retrieve stuff. | ||
|
||
### Response | ||
|
||
Sends back a collection of things. | ||
|
||
```Status: 200 OK``` | ||
|
||
```{ | ||
{ | ||
id: thing_1, | ||
name: 'My first thing' | ||
}, | ||
{ | ||
id: thing_2, | ||
name: 'My second thing' | ||
} | ||
}``` | ||
ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
path: '/login' | ||
title: 'Authenticate' | ||
|
||
layout: post | ||
--- | ||
|
||
This method allows users to retrieve stuff. | ||
|
||
### Response | ||
|
||
Sends back a collection of things. | ||
|
||
```Authentication: bearer TOKEN``` | ||
|
||
```{ | ||
id: thing_2, | ||
name: 'My second thing' | ||
}``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: 'Response status codes' | ||
|
||
layout: nil | ||
--- | ||
|
||
### Success | ||
|
||
### Error | ||
|
||
```Status: 401 Access denied``` | ||
|
||
```{ | ||
code: 401, | ||
message: 'Access denied: invalid authentication token.' | ||
}``` |
Oops, something went wrong.