From 69c4cea65a7ba13469f43914fbdccf592053fec8 Mon Sep 17 00:00:00 2001 From: Jeremy Anderson Date: Thu, 26 Jul 2012 07:29:53 -0700 Subject: updating project api to include raw blob contents and single branch --- doc/api/projects.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index cd94cd42328..1475fbec23a 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -129,6 +129,43 @@ Parameters: ] ``` +Get a single project repository branch. + +``` +GET /projects/:id/repository/branches/:branch +``` + +Parameters: + ++ `id` (required) - The ID or code name of a project ++ `branch` (required) - The name of the branch + +```json +{ + "name": "master", + "commit": { + "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c", + "parents": [ + { + "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8" + } + ], + "tree": "46e82de44b1061621357f24c05515327f2795a95", + "message": "add projects API", + "author": { + "name": "John Smith", + "email": "john@example.com" + }, + "committer": { + "name": "John Smith", + "email": "john@example.com" + }, + "authored_date": "2012-06-27T05:51:39-07:00", + "committed_date": "2012-06-28T03:44:20-07:00" + } +} +``` + ## Project repository tags Get a list of project repository tags sorted by name in reverse alphabetical order. @@ -268,3 +305,19 @@ Parameters: + `snippet_id` (required) - The ID of a project's snippet Status code `200` will be returned on success. + +## Raw blob content + +Get the raw file contents for a file. + +``` +GET /projects/:id/repository/commits/:sha/blob +``` + +Parameters: + ++ `id` (required) - The ID or code name of a project ++ `sha` (required) - The commit or branch name ++ `filepath` (required) - The path th the file + +Will return the raw file contents. -- cgit v1.2.1 From ce837f3d1bbacd3dc9e9171d66f3cf5ed3317c7f Mon Sep 17 00:00:00 2001 From: Jeremy Anderson Date: Tue, 31 Jul 2012 07:34:06 -0700 Subject: fixed typo --- doc/api/projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 1475fbec23a..ead31003512 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -318,6 +318,6 @@ Parameters: + `id` (required) - The ID or code name of a project + `sha` (required) - The commit or branch name -+ `filepath` (required) - The path th the file ++ `filepath` (required) - The path the file Will return the raw file contents. -- cgit v1.2.1