Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 854bd60

Browse files
authored
Update Contents.md
1 parent d9fa9d5 commit 854bd60

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

‎Repositories/Contents.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Status: 200 OK
6666
Content-Type: application/octet-stream
6767
```
6868

69-
## Get Contents
69+
## Get contents
7070

7171
```
7272
GET /repos/:username/:reponame/contents/:ref/:path
@@ -79,18 +79,20 @@ Status: 200 OK
7979
```json
8080
{
8181
"type": "file",
82-
"size": 0,
83-
"name": "text1.text",
84-
"path": "text1.text",
85-
"sha": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
86-
"url": "https://try.gogs.io/api/v1/repos/root/test-symlink/contents/text1.text",
87-
"git_url": "https://try.gogs.io/api/v1/repos/root/test-symlink/trees/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
88-
"html_url": "https://try.gogs.io/api/v1/repos/root/test-symlink/tree/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
89-
"download_url": "https://try.gogs.io/api/v1/root/test-symlink/raw/text1.text",
82+
"encoding": "base64",
83+
"size": 795,
84+
"name": "README.txt",
85+
"path": "README.txt",
86+
"content": "VGhpcyBpcyBhIHNhbXBsZSBwcm9qZWN0IHN0dWRlbnRzIGNhbiB1c2UgZHVyaW5nIE1hdHRoZXcncyBHaXQgY2xhc3MuCgpIZXJlIGlzIGFuIGFkZGl0aW9uIGJ5IG1lCgpXZSBjYW4gaGF2ZSBhIGJpdCBvZiBmdW4gd2l0aCB0aGlzIHJlcG8sIGtub3dpbmcgdGhhdCB3ZSBjYW4gYWx3YXlzIHJlc2V0IGl0IHRvIGEga25vd24gZ29vZCBzdGF0ZS4gIFdlIGNhbiBhcHBseSBsYWJlbHMsIGFuZCBicmFuY2gsIHRoZW4gYWRkIG5ldyBjb2RlIGFuZCBtZXJnZSBpdCBpbiB0byB0aGUgbWFzdGVyIGJyYW5jaC4KCkFzIGEgcXVpY2sgcmVtaW5kZXIsIHRoaXMgY2FtZSBmcm9tIG9uZSBvZiB0aHJlZSBsb2NhdGlvbnMgaW4gZWl0aGVyIFNTSCwgR2l0LCBvciBIVFRQUyBmb3JtYXQ6CgoqIGdpdEBnaXRodWIuY29tOm1hdHRoZXdtY2N1bGxvdWdoL2hlbGxvZ2l0d29ybGQuZ2l0CiogZ2l0Oi8vZ2l0aHViLmNvbS9tYXR0aGV3bWNjdWxsb3VnaC9oZWxsb2dpdHdvcmxkLmdpdAoqIGh0dHBzOi8vbWF0dGhld21jY3VsbG91Z2hAZ2l0aHViLmNvbS9tYXR0aGV3bWNjdWxsb3VnaC9oZWxsb2dpdHdvcmxkLmdpdAoKV2UgY2FuLCBhcyBhbiBleGFtcGxlIGVmZm9ydCwgZXZlbiBtb2RpZnkgdGhpcyBSRUFETUUgYW5kIGNoYW5nZSBpdCBhcyBpZiBpdCB3ZXJlIHNvdXJjZSBjb2RlIGZvciB0aGUgcHVycG9zZXMgb2YgdGhlIGNsYXNzLgoKVGhpcyBkZW1vIGFsc28gaW5jbHVkZXMgYW4gaW1hZ2Ugd2l0aCBjaGFuZ2VzIG9uIGEgYnJhbmNoIGZvciBleGFtaW5hdGlvbiBvZiBpbWFnZSBkaWZmIG9uIEdpdEh1Yi4K",
87+
"sha": "adfd6da3c0a3fb038393144becbf37f14f780087",
88+
"url": "https://try.gogs.io/api/v1/repos/unknwon/git-module-testrepo/contents/README.txt",
89+
"git_url": "https://try.gogs.io/api/v1/repos/unknwon/git-module-testrepo/git/blobs/adfd6da3c0a3fb038393144becbf37f14f780087",
90+
"html_url": "https://try.gogs.io/unknwon/git-module-testrepo/src/master/README.txt",
91+
"download_url": "https://try.gogs.io/unknwon/git-module-testrepo/raw/master/README.txt",
9092
"_links": {
91-
"git": "https://try.gogs.io/api/v1/repos/root/test-symlink/trees/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
92-
"self": "https://try.gogs.io/api/v1/repos/root/test-symlink/contents/text1.text",
93-
"html": "https://try.gogs.io/api/v1/repos/root/test-symlink/tree/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
93+
"git": "https://try.gogs.io/api/v1/repos/unknwon/git-module-testrepo/git/blobs/adfd6da3c0a3fb038393144becbf37f14f780087",
94+
"self": "https://try.gogs.io/api/v1/repos/unknwon/git-module-testrepo/contents/README.txt",
95+
"html": "https://try.gogs.io/unknwon/git-module-testrepo/src/master/README.txt"
9496
}
9597
}
9698
```
@@ -167,4 +169,4 @@ Status: 200 OK
167169
"html": "https://try.gogs.io/api/v1/repos/root/test-symlink/tree/2ddc5c87f1e6d78ea63a2d5fa19527a804ad252e"
168170
}
169171
}
170-
```
172+
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /