github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/algod/accountApplicationInformation.go (about) 1 package algod 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/algorand/go-algorand-sdk/client/v2/common" 8 "github.com/algorand/go-algorand-sdk/client/v2/common/models" 9 ) 10 11 // AccountApplicationInformationParams contains all of the query parameters for url serialization. 12 type AccountApplicationInformationParams struct { 13 14 // Format configures whether the response object is JSON or MessagePack encoded. 15 Format string `url:"format,omitempty"` 16 } 17 18 // AccountApplicationInformation given a specific account public key and 19 // application ID, this call returns the account's application local state and 20 // global state (AppLocalState and AppParams, if either exists). Global state will 21 // only be returned if the provided address is the application's creator. 22 type AccountApplicationInformation struct { 23 c *Client 24 25 address string 26 applicationId uint64 27 28 p AccountApplicationInformationParams 29 } 30 31 // Do performs the HTTP request 32 func (s *AccountApplicationInformation) Do(ctx context.Context, headers ...*common.Header) (response models.AccountApplicationResponse, err error) { 33 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/accounts/%s/applications/%s", common.EscapeParams(s.address, s.applicationId)...), s.p, headers) 34 return 35 }