Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

core / api / tangled / repolistIssues.go
2.3 kB 69 lines
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package tangled 4 5// schema: sh.tangled.repo.listIssues 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13const ( 14 RepoListIssuesNSID = "sh.tangled.repo.listIssues" 15) 16 17// RepoListIssues_IssueListItem is a "issueListItem" in the sh.tangled.repo.listIssues schema. 18type RepoListIssues_IssueListItem struct { 19 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 20 // commentCount: Count of sh.tangled.repo.issue.comment records targeting this issue. 21 CommentCount int64 `json:"commentCount" cborgen:"commentCount"` 22 // state: Latest derived state. 23 State string `json:"state" cborgen:"state"` 24 // stateUpdatedAt: TID-derived timestamp of the latest state record. 25 StateUpdatedAt *string `json:"stateUpdatedAt,omitempty" cborgen:"stateUpdatedAt,omitempty"` 26 Uri string `json:"uri" cborgen:"uri"` 27 // value: Embedded sh.tangled.repo.issue record 28 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 29} 30 31// RepoListIssues_Output is the output of a sh.tangled.repo.listIssues call. 32type RepoListIssues_Output struct { 33 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 34 Items []*RepoListIssues_IssueListItem `json:"items" cborgen:"items"` 35} 36 37// RepoListIssues calls the XRPC method "sh.tangled.repo.listIssues". 38// 39// author: Restrict to issues authored by this user DID. 40// cursor: Pagination cursor 41// order: Sort direction by createdAt. 42// state: Restrict to issues whose latest derived state matches. 43// subject: Repo DID to list issues for 44func RepoListIssues(ctx context.Context, c util.LexClient, author string, cursor string, limit int64, order string, state string, subject string) (*RepoListIssues_Output, error) { 45 var out RepoListIssues_Output 46 47 params := map[string]interface{}{} 48 if author != "" { 49 params["author"] = author 50 } 51 if cursor != "" { 52 params["cursor"] = cursor 53 } 54 if limit != 0 { 55 params["limit"] = limit 56 } 57 if order != "" { 58 params["order"] = order 59 } 60 if state != "" { 61 params["state"] = state 62 } 63 params["subject"] = subject 64 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.listIssues", params, nil, &out); err != nil { 65 return nil, err 66 } 67 68 return &out, nil 69}