Skip to content

Commit

Permalink
Regenerate code from specification file (algorand#635)
Browse files Browse the repository at this point in the history
Co-authored-by: Algorand Generation Bot <[email protected]>
  • Loading branch information
2 people authored and scholtz committed Sep 15, 2024
1 parent a651ced commit eabc0bf
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/v2/algod/algod.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri
return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers)
}

// getRaw performs a GET request to the specific path against the server, assumes msgpack response
// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response
func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) {
return (*common.Client)(c).GetRaw(ctx, path, body, headers)
}
Expand Down
13 changes: 13 additions & 0 deletions client/v2/common/models/account_asset_holding.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package models

// AccountAssetHolding accountAssetHolding describes the account's asset holding
// and asset parameters (if either exist) for a specific asset ID.
type AccountAssetHolding struct {
// AssetHolding (asset) Details about the asset held by this account.
// The raw account uses `AssetHolding` for this type.
AssetHolding AssetHolding `json:"asset-holding"`

// AssetParams (apar) parameters of the asset held by this account.
// The raw account uses `AssetParams` for this type.
AssetParams AssetParams `json:"asset-params,omitempty"`
}
15 changes: 15 additions & 0 deletions client/v2/common/models/account_assets_information_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package models

// AccountAssetsInformationResponse accountAssetsInformationResponse contains a
// list of assets held by an account.
type AccountAssetsInformationResponse struct {
// AssetHoldings
AssetHoldings []AccountAssetHolding `json:"asset-holdings,omitempty"`

// NextToken used for pagination, when making another request provide this token
// with the next parameter.
NextToken string `json:"next-token,omitempty"`

// Round the round for which this information is relevant.
Round uint64 `json:"round"`
}
2 changes: 1 addition & 1 deletion client/v2/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri
return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers)
}

// getRaw performs a GET request to the specific path against the server, assumes msgpack response
// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response
func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) {
return (*common.Client)(c).GetRaw(ctx, path, body, headers)
}
Expand Down

0 comments on commit eabc0bf

Please sign in to comment.