go-gitea / go-sdk

Gitea: Golang SDK, moved to https://gitea.com/gitea/go-sdk
http://gitea.io
MIT License
29 stars 53 forks source link

Adds structures for repo file and blob APIs #152

Closed richmahn closed 5 years ago

richmahn commented 5 years ago

These are changes to the SDK to work with the feature of Creating/Updating/Deleting/Viewing repo files in the API (https://github.com/go-gitea/gitea/issues/4762)

This adds a few structures to the SDK to handle API calls for files, creating, updating, deleting and viewing the blob. There are different input/output structures so that the API Swagger will respectively show slight differences for Create, Update and Delete input/output yet reuse code/names to keep everything unified.

These structures are identical to what one can find for GitHub's API in https://developer.github.com/v3/repos/contents/#create-a-file (and the other sections) and https://developer.github.com/v3/git/blobs/#get-a-blob

Dependent upon by the Gitea PR: https://github.com/go-gitea/gitea/pull/6314

techknowlogick commented 5 years ago

@richmahn can you merge the latest changes to master into this branch. I’ve updated things with Drone that’ll hopefully resolve the issues that have been happening with the build of the Pr.