@@ -66,7 +66,7 @@ Status: 200 OK
66
66
Content-Type: application/octet-stream
67
67
```
68
68
69
- ## Get Contents
69
+ ## Get contents
70
70
71
71
```
72
72
GET /repos/:username/:reponame/contents/:ref/:path
@@ -79,18 +79,20 @@ Status: 200 OK
79
79
``` json
80
80
{
81
81
"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" ,
90
92
"_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 "
94
96
}
95
97
}
96
98
```
@@ -167,4 +169,4 @@ Status: 200 OK
167
169
"html" : " https://try.gogs.io/api/v1/repos/root/test-symlink/tree/2ddc5c87f1e6d78ea63a2d5fa19527a804ad252e"
168
170
}
169
171
}
170
- ```
172
+ ```
0 commit comments