github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/algod/getApplicationByID.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 // GetApplicationByID given a application ID, it returns application information 12 // including creator, approval and clear programs, global and local schemas, and 13 // global state. 14 type GetApplicationByID struct { 15 c *Client 16 17 applicationId uint64 18 } 19 20 // Do performs the HTTP request 21 func (s *GetApplicationByID) Do(ctx context.Context, headers ...*common.Header) (response models.Application, err error) { 22 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/applications/%s", common.EscapeParams(s.applicationId)...), nil, headers) 23 return 24 }