Skip to content

Commit

Permalink
Adding it on the gh-pages branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hunvreus committed Dec 27, 2012
0 parents commit d1354b7
Show file tree
Hide file tree
Showing 16 changed files with 833 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
_site/
8 changes: 8 additions & 0 deletions 404-not-found.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: 404 – Not found
---

<h2>404 &ndash; Not found</h2>

<p>The file or page you're looking for does not exist or has been moved.</p>
Empty file added README.md
Empty file.
6 changes: 6 additions & 0 deletions _config.yml
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'
53 changes: 53 additions & 0 deletions _layouts/default.html
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>
7 changes: 7 additions & 0 deletions _layouts/refresh.html
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>
28 changes: 28 additions & 0 deletions _posts/2012-12-24-delete-a-thing.md
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'
}```
43 changes: 43 additions & 0 deletions _posts/2012-12-25-put-a-thing.md
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]
32 changes: 32 additions & 0 deletions _posts/2012-12-26-post-a-thing.md
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
28 changes: 28 additions & 0 deletions _posts/2012-12-27-get-stuff.md
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
19 changes: 19 additions & 0 deletions _posts/2012-12-28-authentication.md
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'
}```
16 changes: 16 additions & 0 deletions _posts/2012-12-28-response-status-codes.md
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.'
}```
Loading

0 comments on commit d1354b7

Please sign in to comment.