4 Star 20 Fork 12

还是相信爱过 / gitee-python-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
GitDataApi.md 3.88 KB
一键复制 编辑 原始数据 按行查看 历史
还是相信爱过 提交于 2017-11-14 22:10 . init

gitee_client.GitDataApi

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

get_v5_repos_owner_repo_git_blobs_sha

Blob get_v5_repos_owner_repo_git_blobs_sha(owner, repo, sha, access_token=access_token)

获取文件Blob

获取文件Blob

Example

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)

Parameters

Name Type Description Notes
owner str 用户名(username/login)
repo str 项目路径(path)
sha str 文件Blob的SHA值
access_token str 用户授权码 [optional]

Return type

Blob

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_repos_owner_repo_git_trees_sha

Tree get_v5_repos_owner_repo_git_trees_sha(owner, repo, sha, access_token=access_token, recursive=recursive)

获取目录Tree

获取目录Tree

Example

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)

Parameters

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]

Return type

Tree

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Python
1
https://gitee.com/wuyu15255872976/gitee-python-client.git
git@gitee.com:wuyu15255872976/gitee-python-client.git
wuyu15255872976
gitee-python-client
gitee-python-client
master

搜索帮助