From eaf6ac44e7d38ff6cc71ca72bdaceed59b86c550 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 4 Aug 2021 16:11:10 +0200 Subject: Added API documentation & updated the Typedoc theme dependency --- documentation/API/v1/repos.md | 165 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 documentation/API/v1/repos.md (limited to 'documentation/API/v1/repos.md') diff --git a/documentation/API/v1/repos.md b/documentation/API/v1/repos.md new file mode 100644 index 0000000..483676e --- /dev/null +++ b/documentation/API/v1/repos.md @@ -0,0 +1,165 @@ +## /repos +**Method:** GET + +**Description:**
+Retrieves a list of available repositories. + +**Parameters:**
+None + +**Response:**
+ +| Code | Description | Schema | +|---------|------------------------|---------------------------------------------------------------------| +| 200 | A list of repositories | [\[Repository summary\]](/docs/interfaces/api.RepositorySummary.html) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo +**Method:** GET + +**Description:**
+Retrieves a repository. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|------|----------|----------------|----------|--------| +| repo | path | The repository | true | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|--------------|----------------------------------------------------| +| 200 | A repository | [Repository](/docs/interfaces/api.Repository.html) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo/tree +**Method:** GET + +**Description:**
+Retrieves a repository tree. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|------|----------|------------------|----------|--------| +| repo | path | The repository | true | string | +| path | query | Path in the tree | false | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|-------------|---------------------------------------| +| 200 | A tree | [Tree](/docs/modules/api.html#Tree) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo/tags +**Method:** GET + +**Description:**
+Retrieves a repository tag. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|------|----------|----------------|----------|--------| +| repo | path | The repository | true | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|-------------|---------------------------------------| +| 200 | A tag | [\[Tag\]](/docs/modules/api.html#Tag) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo/log +**Method:** GET + +**Description:**
+Retrieves a repository's log. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|------|----------|----------------|----------|--------| +| repo | path | The repository | true | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|--------------|----------------------------------------------------| +| 200 | A log commit | [\[Log commit\]](/docs/modules/api.html#LogCommit) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo/log/:commit +**Method:** GET + +**Description:**
+Retrieves a commit from a repository. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|--------|----------|----------------|----------|--------| +| repo | path | The repository | true | string | +| commit | path | A commit SHA | true | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|-------------|--------------------------------------------| +| 200 | A commit | [Commit](/docs/interfaces/api.Commit.html) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo/branches +**Method:** GET + +**Description:**
+Retrieves a repository's branches. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|--------|----------|----------------|----------|--------| +| repo | path | The repository | true | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|-------------|---------------------------------------------------------------| +| 200 | A branch | [\[Branch summary\]](/docs/interfaces/api.BranchSummary.html) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | + +
+ +## /repos/:repo/branches/:branch +**Method:** GET + +**Description:**
+Retrieves a branch from a repository. + +**Parameters:**
+ +| Name | Location | Description | Required | Schema | +|--------|----------|----------------|----------|--------| +| repo | path | The repository | true | string | +| branch | path | A branch | true | string | + +**Response:**
+ +| Code | Description | Schema | +|---------|-------------|--------------------------------------------| +| 200 | A branch | [Branch](/docs/interfaces/api.Branch.html) | +| 400-599 | An error | [Error](/docs/modules/api.html#Error) | \ No newline at end of file -- cgit v1.2.3-18-g5258