diff --git a/README.md b/README.md index 6d694e92478bbdfc6c46255894205dc08a911ba6..035a91260f4f98080f5c643e18a8cae739a8efc9 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,23 @@ + + # Gitee SDK ## Description A Golang SDK that provides functionality of Gitee API. It allows you to interact with Gitee's API v8. ## Features -- [ ] Issues -- [ ] Members -- [ ] Issue Types -- [ ] Pull Requests -- [ ] Comments -- [ ] Statistics +- Issues +- Members +- Issue Types +- Pull Requests +- Comments +- Statistics ## Usage This SDK provides functionality to fetch user statistics for a given enterprise and date range. ### Client Functions The `Client` struct in the SDK provides several methods to interact with the Gitee API. Here are some of the key functions: - - `NewClient(apiBase string) (*Client)`: Creates a new Gitee API client. If `apiBase` is an empty string, it defaults to `"https://api.gitee.com"`. - `SetHTTPCookies(cookiesJar string)`: Sets the HTTP cookies for the client. Used for cookie-based authentication. - `SetBearerToken(bearerToken string)`: Sets the Bearer token for the client. Used for token-based authentication. @@ -30,19 +31,16 @@ The `Client` struct in the SDK provides several methods to interact with the Git ### User Statistics Functions The `Client` struct in the SDK provides a method to interact with the Gitee API for user statistics. Here is the key function: - - `ListUserStatistics(ctx context.Context, enterpriseId int, params *UserStatisticListParams) (*ListUserStatisticsResponse, error)`: Fetches user statistics for a set of users and a specified date range. ### Issues Functions The `Client` struct in the SDK provides several methods to interact with the Gitee API for issues. Here are some of the key functions: - - `CreateIssue(ctx context.Context, enterpriseId int, params *IssueCreateParams) (*CreateIssueResponse, error)`: Creates a new issue. - `ListIssues(ctx context.Context, enterpriseId int, params *IssueListParams) (*ListIssuesResponse, error)`: Lists issues. - `GetIssueDetail(ctx context.Context, enterpriseId int, issueId int) (*IssueResponse, error)`: Gets the details of an issue. ### Members Functions The `Client` struct in the SDK provides several methods to interact with the Gitee API for members. Here are some of the key functions: - - `GetMember(ctx context.Context, enterpriseId int, userId int) (*MemberResponse, error)`: Gets the details of a member. - `UpdateMember(ctx context.Context, enterpriseId int, userId int, params *MemberUpdateParams) (*MemberResponse, error)`: Updates a member. - `ListMembers(ctx context.Context, enterpriseId int, params *MemberListParams) (*ListMembersResponse, error)`: Lists members within an enterprise. @@ -50,27 +48,16 @@ The `Client` struct in the SDK provides several methods to interact with the Git ### Issue Types Functions The `Client` struct in the SDK provides several methods to interact with the Gitee API for issue types. Here are some of the key functions: - - `ListIssueTypes(ctx context.Context, enterpriseId int, params *IssueTypeListParams) (*ListIssueTypesResponse, error)`: Lists issue types. ### Pull Requests Functions The `Client` struct in the SDK provides methods to interact with Gitee Pull Requests. - - `GetPullDiff(ctx context.Context, enterpriseId, repoId, pullId int) (string, error)`: Retrieves the diff content of a specific pull request as a string. - `CreatePullComment(ctx context.Context, enterpriseId, repoId, pullId int, params *PullCommentCreateParams) (*CreatePullCommentResponse, error)`: Adds a comment to a specific pull request. -### API Documentation -Coming soon. - ## Contributing -Contributions are welcome! - ### How to Contribute -1. Fork the repository. -2. Create a new branch for your feature or bug fix. -3. Make your changes and commit them with descriptive commit messages. -4. Push your changes to your fork. -5. Create a pull request to the main repository. +If you are interested in contributing to the Gitee SDK, you can find more information about the contribution process in the [Gitee SDK Contribution Guide](https://gitee.com/oscstudio/go-gitee-sdk). ## License -This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. +The Gitee SDK is released under the MIT License. For more details, please refer to the [MIT License](https://mit-license.org). \ No newline at end of file