github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/indexer/lookupAccountCreatedApplications.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 // LookupAccountCreatedApplicationsParams contains all of the query parameters for url serialization. 12 type LookupAccountCreatedApplicationsParams struct { 13 14 // ApplicationID application ID 15 ApplicationID uint64 `url:"application-id,omitempty"` 16 17 // IncludeAll include all items including closed accounts, deleted applications, 18 // destroyed assets, opted-out asset holdings, and closed-out application 19 // localstates. 20 IncludeAll bool `url:"include-all,omitempty"` 21 22 // Limit maximum number of results to return. There could be additional pages even 23 // if the limit is not reached. 24 Limit uint64 `url:"limit,omitempty"` 25 26 // Next the next page of results. Use the next token provided by the previous 27 // results. 28 Next string `url:"next,omitempty"` 29 } 30 31 // LookupAccountCreatedApplications lookup an account's created application 32 // parameters, optionally for a specific ID. 33 type LookupAccountCreatedApplications struct { 34 c *Client 35 36 accountId string 37 38 p LookupAccountCreatedApplicationsParams 39 } 40 41 // ApplicationID application ID 42 func (s *LookupAccountCreatedApplications) ApplicationID(ApplicationID uint64) *LookupAccountCreatedApplications { 43 s.p.ApplicationID = ApplicationID 44 45 return s 46 } 47 48 // IncludeAll include all items including closed accounts, deleted applications, 49 // destroyed assets, opted-out asset holdings, and closed-out application 50 // localstates. 51 func (s *LookupAccountCreatedApplications) IncludeAll(IncludeAll bool) *LookupAccountCreatedApplications { 52 s.p.IncludeAll = IncludeAll 53 54 return s 55 } 56 57 // Limit maximum number of results to return. There could be additional pages even 58 // if the limit is not reached. 59 func (s *LookupAccountCreatedApplications) Limit(Limit uint64) *LookupAccountCreatedApplications { 60 s.p.Limit = Limit 61 62 return s 63 } 64 65 // Next the next page of results. Use the next token provided by the previous 66 // results. 67 func (s *LookupAccountCreatedApplications) Next(Next string) *LookupAccountCreatedApplications { 68 s.p.Next = Next 69 70 return s 71 } 72 73 // Do performs the HTTP request 74 func (s *LookupAccountCreatedApplications) Do(ctx context.Context, headers ...*common.Header) (response models.ApplicationsResponse, err error) { 75 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/accounts/%s/created-applications", common.EscapeParams(s.accountId)...), s.p, headers) 76 return 77 }