mintpresso/api-server — pull request #30 by eces (2013-06-18 13:20:29+00:00)
Title: Edge limit offset

- Support limit, offset for pagination
- Remove _url duplication on each edges
- Fill url(request uri without limit, offset parameters), length(result rows), size(total rows)
- Some legacy support of _length; It may be removed at version 2?
- Fill current(request uri with limit, offset), next, previous

@admire93 아포가토 구현에 참고: **`next` and `previous` will not contained in JSON response only if there is no more items to be next or previously searched.**

## Basic response

```json
{
"status": {
"code": 200,
"message": ""
},
"edges": [
{
"subjectId": 2293,
"subjectType": "user",
"verb": "log",
"objectId": 29692,
"objectType": "request",
"createdAt": 1370595392000
}
],
"length": 1,
"_length": 1,
"size": 29814,
"url": "http://127.0.0.1:15100/v1/account/1/edge?subjectType=user&verb=log&objectType=request",
"current": "http://127.0.0.1:15100/v1/account/1/edge?subjectType=user&verb=log&objectType=request&limit=1&offset=2",
"next": "http://127.0.0.1:15100/v1/account/1/edge?subjectType=user&verb=log&objectType=request&limit=1&offset=3",
"previous": "http://127.0.0.1:15100/v1/account/1/edge?subjectType=user&verb=log&objectType=request&limit=1&offset=1"
}
```

## No result
```json
{
"status": {
"code": 404,
"message": "Edge not found. Out of 0."
}
}
```

## Nothing selected but some results found
```json
{
"status": {
"code": 404,
"message": "Edge not found. Out of 29814."
}
}
```