Skip to content

Commit 1661ddc

Browse files
authored
Merge pull request #7 from daeisbae/5-update-docs-due-to-update-in-fetchgithubrepotree-function
Update fetchGithubRepoTree function docs (#5)
2 parents 83d09a0 + d3f7039 commit 1661ddc

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

docs/README.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ https://api.github.com/repos/octocat/Hello-World
8282
"name": "Hello-World",
8383
"full_name": "octocat/Hello-World",
8484
"owner": {
85-
"login": "octocat",
85+
"login": "octocat"
8686
},
8787
"html_url": "https://github.com/octocat/Hello-World",
8888
"description": "My first repository on GitHub!",
@@ -98,33 +98,37 @@ https://api.github.com/repos/octocat/Hello-World
9898

9999
## 2.2 Crawl the file tree of the Repository
100100

101-
Retrieve the file tree of the given repository by providing the repo owner, the name of the repo, and the default_branch from crawling the Github Repo Information
101+
Retrieve the file tree of the given repository by providing the repo owner, the name of the repo, and the commit hash.
102102

103103
### 2.2.1 Information to fetch:
104104

105-
- sha
106-
- tree.path
105+
- path
106+
- files
107+
- subdirectories
107108

108109
### 2.2.2 Example
109110

110-
https://api.github.com/repos/octocat/Hello-World/git/trees/master?recursive=1
111+
https://api.github.com/repos/Octocat/Hello-World/contents?ref=7fd1a60b01f91b314f59955a4e4d4e80d8edf11d
111112

112113
```json
113-
{
114-
"sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
115-
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
116-
"tree": [
117-
{
118-
"path": "README",
119-
"mode": "100644",
120-
"type": "blob",
121-
"sha": "980a0d5f19a64b4b30a87d4206aade58726b60e3",
122-
"size": 13,
123-
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/980a0d5f19a64b4b30a87d4206aade58726b60e3"
114+
[
115+
{
116+
"name": "README",
117+
"path": "README",
118+
"sha": "980a0d5f19a64b4b30a87d4206aade58726b60e3",
119+
"size": 13,
120+
"url": "https://api.github.com/repos/octocat/Hello-World/contents/README?ref=7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
121+
"html_url": "https://github.com/octocat/Hello-World/blob/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/README",
122+
"git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/980a0d5f19a64b4b30a87d4206aade58726b60e3",
123+
"download_url": "https://raw.githubusercontent.com/octocat/Hello-World/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/README",
124+
"type": "file",
125+
"_links": {
126+
"self": "https://api.github.com/repos/octocat/Hello-World/contents/README?ref=7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
127+
"git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/980a0d5f19a64b4b30a87d4206aade58726b60e3",
128+
"html": "https://github.com/octocat/Hello-World/blob/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/README"
124129
}
125-
],
126-
"truncated": false
127-
}
130+
}
131+
]
128132
```
129133

130134
## 2.3 Crawl the files (Code) of the Repository

0 commit comments

Comments
 (0)