github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/indexer/lookupApplicationByID.go (about) 1 package indexer 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 // LookupApplicationByIDParams contains all of the query parameters for url serialization. 12 type LookupApplicationByIDParams struct { 13 14 // IncludeAll include all items including closed accounts, deleted applications, 15 // destroyed assets, opted-out asset holdings, and closed-out application 16 // localstates. 17 IncludeAll bool `url:"include-all,omitempty"` 18 } 19 20 // LookupApplicationByID lookup application. 21 type LookupApplicationByID struct { 22 c *Client 23 24 applicationId uint64 25 26 p LookupApplicationByIDParams 27 } 28 29 // IncludeAll include all items including closed accounts, deleted applications, 30 // destroyed assets, opted-out asset holdings, and closed-out application 31 // localstates. 32 func (s *LookupApplicationByID) IncludeAll(IncludeAll bool) *LookupApplicationByID { 33 s.p.IncludeAll = IncludeAll 34 35 return s 36 } 37 38 // Do performs the HTTP request 39 func (s *LookupApplicationByID) Do(ctx context.Context, headers ...*common.Header) (response models.ApplicationResponse, err error) { 40 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/applications/%s", common.EscapeParams(s.applicationId)...), s.p, headers) 41 return 42 }