代码拉取完成,页面将自动刷新
All URIs are relative to https://gitee.com/api
Method | HTTP request | Description |
---|---|---|
get_v5_repos_owner_repo_git_blobs_sha | GET /v5/repos/{owner}/{repo}/git/blobs/{sha} | 获取文件Blob |
get_v5_repos_owner_repo_git_trees_sha | GET /v5/repos/{owner}/{repo}/git/trees/{sha} | 获取目录Tree |
Blob get_v5_repos_owner_repo_git_blobs_sha(owner, repo, sha, access_token=access_token)
获取文件Blob
获取文件Blob
from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = gitee_client.GitDataApi()
owner = 'owner_example' # str | 用户名(username/login)
repo = 'repo_example' # str | 项目路径(path)
sha = 'sha_example' # str | 文件Blob的SHA值
access_token = 'access_token_example' # str | 用户授权码 (optional)
try:
# 获取文件Blob
api_response = api_instance.get_v5_repos_owner_repo_git_blobs_sha(owner, repo, sha, access_token=access_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling GitDataApi->get_v5_repos_owner_repo_git_blobs_sha: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | 用户名(username/login) | |
repo | str | 项目路径(path) | |
sha | str | 文件Blob的SHA值 | |
access_token | str | 用户授权码 | [optional] |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tree get_v5_repos_owner_repo_git_trees_sha(owner, repo, sha, access_token=access_token, recursive=recursive)
获取目录Tree
获取目录Tree
from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = gitee_client.GitDataApi()
owner = 'owner_example' # str | 用户名(username/login)
repo = 'repo_example' # str | 项目路径(path)
sha = 'sha_example' # str | 可以是分支名(如master)、Commit或者目录Tree的SHA值
access_token = 'access_token_example' # str | 用户授权码 (optional)
recursive = 56 # int | 赋值为1递归获取目录 (optional)
try:
# 获取目录Tree
api_response = api_instance.get_v5_repos_owner_repo_git_trees_sha(owner, repo, sha, access_token=access_token, recursive=recursive)
pprint(api_response)
except ApiException as e:
print("Exception when calling GitDataApi->get_v5_repos_owner_repo_git_trees_sha: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | 用户名(username/login) | |
repo | str | 项目路径(path) | |
sha | str | 可以是分支名(如master)、Commit或者目录Tree的SHA值 | |
access_token | str | 用户授权码 | [optional] |
recursive | int | 赋值为1递归获取目录 | [optional] |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。