gitee.com/openeuler/go-gitee@v0.0.0-20220530104019-3af895bc380c/docs/GitDataApi.md (about) 1 # \GitDataApi 2 3 All URIs are relative to *https://gitee.com/api* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**GetV5ReposOwnerRepoGitBlobsSha**](GitDataApi.md#GetV5ReposOwnerRepoGitBlobsSha) | **Get** /v5/repos/{owner}/{repo}/git/blobs/{sha} | 获取文件Blob 8 [**GetV5ReposOwnerRepoGitTreesSha**](GitDataApi.md#GetV5ReposOwnerRepoGitTreesSha) | **Get** /v5/repos/{owner}/{repo}/git/trees/{sha} | 获取目录Tree 9 10 11 # **GetV5ReposOwnerRepoGitBlobsSha** 12 > Blob GetV5ReposOwnerRepoGitBlobsSha(ctx, owner, repo, sha, optional) 13 获取文件Blob 14 15 获取文件Blob 16 17 ### Required Parameters 18 19 Name | Type | Description | Notes 20 ------------- | ------------- | ------------- | ------------- 21 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 22 **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 23 **repo** | **string**| 仓库路径(path) | 24 **sha** | **string**| 文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取 | 25 **optional** | ***GetV5ReposOwnerRepoGitBlobsShaOpts** | optional parameters | nil if no parameters 26 27 ### Optional Parameters 28 Optional parameters are passed through a pointer to a GetV5ReposOwnerRepoGitBlobsShaOpts struct 29 30 Name | Type | Description | Notes 31 ------------- | ------------- | ------------- | ------------- 32 33 34 35 **accessToken** | **optional.String**| 用户授权码 | 36 37 ### Return type 38 39 [**Blob**](Blob.md) 40 41 ### Authorization 42 43 No authorization required 44 45 ### HTTP request headers 46 47 - **Content-Type**: application/json, multipart/form-data 48 - **Accept**: application/json 49 50 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 51 52 # **GetV5ReposOwnerRepoGitTreesSha** 53 > Tree GetV5ReposOwnerRepoGitTreesSha(ctx, owner, repo, sha, optional) 54 获取目录Tree 55 56 获取目录Tree 57 58 ### Required Parameters 59 60 Name | Type | Description | Notes 61 ------------- | ------------- | ------------- | ------------- 62 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 63 **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 64 **repo** | **string**| 仓库路径(path) | 65 **sha** | **string**| 可以是分支名(如master)、Commit或者目录Tree的SHA值 | 66 **optional** | ***GetV5ReposOwnerRepoGitTreesShaOpts** | optional parameters | nil if no parameters 67 68 ### Optional Parameters 69 Optional parameters are passed through a pointer to a GetV5ReposOwnerRepoGitTreesShaOpts struct 70 71 Name | Type | Description | Notes 72 ------------- | ------------- | ------------- | ------------- 73 74 75 76 **accessToken** | **optional.String**| 用户授权码 | 77 **recursive** | **optional.Int32**| 赋值为1递归获取目录 | 78 79 ### Return type 80 81 [**Tree**](Tree.md) 82 83 ### Authorization 84 85 No authorization required 86 87 ### HTTP request headers 88 89 - **Content-Type**: application/json, multipart/form-data 90 - **Accept**: application/json 91 92 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 93