Skip to content

Commit

Permalink
New updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Aug 23, 2024
1 parent ec9f1a5 commit f2510f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ func NewItemItemTarballWithRefItemRequestBuilder(rawUrl string, requestAdapter i
// [API method documentation]
//
// [API method documentation]: https://docs.github.com/rest/repos/contents#download-a-repository-archive-tar
func (m *ItemItemTarballWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) {
func (m *ItemItemTarballWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]byte, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
return err
return nil, err
}
err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil)
res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", nil)
if err != nil {
return err
return nil, err
}
return nil
if res == nil {
return nil, nil
}
return res.([]byte), nil
}
// ToGetRequestInformation gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually`main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to usethe `Location` header to make a second `GET` request.> [!NOTE]> For private repositories, these links are temporary and expire after five minutes.
// returns a *RequestInformation when successful
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ func NewItemItemZipballWithRefItemRequestBuilder(rawUrl string, requestAdapter i
// [API method documentation]
//
// [API method documentation]: https://docs.github.com/rest/repos/contents#download-a-repository-archive-zip
func (m *ItemItemZipballWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) {
func (m *ItemItemZipballWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]byte, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
return err
return nil, err
}
err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil)
res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", nil)
if err != nil {
return err
return nil, err
}
return nil
if res == nil {
return nil, nil
}
return res.([]byte), nil
}
// ToGetRequestInformation gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually`main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to usethe `Location` header to make a second `GET` request.> [!NOTE]> For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect.
// returns a *RequestInformation when successful
Expand Down

0 comments on commit f2510f5

Please sign in to comment.