this repo has no description
0
fork

Configure Feed

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

manually update record-agnostic API helpers as an example

+29 -30
+3 -3
api/agnostic/actorgetPreferences.go
··· 7 7 import ( 8 8 "context" 9 9 10 - "github.com/bluesky-social/indigo/xrpc" 10 + "github.com/bluesky-social/indigo/lex/util" 11 11 ) 12 12 13 13 // ActorGetPreferences_Output is the output of a app.bsky.actor.getPreferences call. ··· 16 16 } 17 17 18 18 // ActorGetPreferences calls the XRPC method "app.bsky.actor.getPreferences". 19 - func ActorGetPreferences(ctx context.Context, c *xrpc.Client) (*ActorGetPreferences_Output, error) { 19 + func ActorGetPreferences(ctx context.Context, c util.LexClient) (*ActorGetPreferences_Output, error) { 20 20 var out ActorGetPreferences_Output 21 21 22 22 params := map[string]interface{}{} 23 - if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { 23 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { 24 24 return nil, err 25 25 } 26 26
+3 -3
api/agnostic/actorputPreferences.go
··· 7 7 import ( 8 8 "context" 9 9 10 - "github.com/bluesky-social/indigo/xrpc" 10 + "github.com/bluesky-social/indigo/lex/util" 11 11 ) 12 12 13 13 // ActorPutPreferences_Input is the input argument to a app.bsky.actor.putPreferences call. ··· 16 16 } 17 17 18 18 // ActorPutPreferences calls the XRPC method "app.bsky.actor.putPreferences". 19 - func ActorPutPreferences(ctx context.Context, c *xrpc.Client, input *ActorPutPreferences_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { 19 + func ActorPutPreferences(ctx context.Context, c util.LexClient, input *ActorPutPreferences_Input) error { 20 + if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { 21 21 return err 22 22 } 23 23
+3 -3
api/agnostic/identitygetRecommendedDidCredentials.go
··· 8 8 "context" 9 9 "encoding/json" 10 10 11 - "github.com/bluesky-social/indigo/xrpc" 11 + "github.com/bluesky-social/indigo/lex/util" 12 12 ) 13 13 14 14 // IdentityGetRecommendedDidCredentials calls the XRPC method "com.atproto.identity.getRecommendedDidCredentials". 15 - func IdentityGetRecommendedDidCredentials(ctx context.Context, c *xrpc.Client) (*json.RawMessage, error) { 15 + func IdentityGetRecommendedDidCredentials(ctx context.Context, c util.LexClient) (*json.RawMessage, error) { 16 16 var out json.RawMessage 17 17 18 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { 18 + if err := c.LexDo(ctx, util.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { 19 19 return nil, err 20 20 } 21 21
+3 -3
api/agnostic/identitysignPlcOperation.go
··· 8 8 "context" 9 9 "encoding/json" 10 10 11 - "github.com/bluesky-social/indigo/xrpc" 11 + "github.com/bluesky-social/indigo/lex/util" 12 12 ) 13 13 14 14 // IdentitySignPlcOperation_Input is the input argument to a com.atproto.identity.signPlcOperation call. ··· 28 28 } 29 29 30 30 // IdentitySignPlcOperation calls the XRPC method "com.atproto.identity.signPlcOperation". 31 - func IdentitySignPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { 31 + func IdentitySignPlcOperation(ctx context.Context, c util.LexClient, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { 32 32 var out IdentitySignPlcOperation_Output 33 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { 33 + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { 34 34 return nil, err 35 35 } 36 36
+3 -3
api/agnostic/identitysubmitPlcOperation.go
··· 8 8 "context" 9 9 "encoding/json" 10 10 11 - "github.com/bluesky-social/indigo/xrpc" 11 + "github.com/bluesky-social/indigo/lex/util" 12 12 ) 13 13 14 14 // IdentitySubmitPlcOperation_Input is the input argument to a com.atproto.identity.submitPlcOperation call. ··· 17 17 } 18 18 19 19 // IdentitySubmitPlcOperation calls the XRPC method "com.atproto.identity.submitPlcOperation". 20 - func IdentitySubmitPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySubmitPlcOperation_Input) error { 21 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { 20 + func IdentitySubmitPlcOperation(ctx context.Context, c util.LexClient, input *IdentitySubmitPlcOperation_Input) error { 21 + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { 22 22 return err 23 23 } 24 24
+2 -3
api/agnostic/repoapplyWrites.go
··· 10 10 "fmt" 11 11 12 12 "github.com/bluesky-social/indigo/lex/util" 13 - "github.com/bluesky-social/indigo/xrpc" 14 13 ) 15 14 16 15 // RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema. ··· 179 178 } 180 179 181 180 // RepoApplyWrites calls the XRPC method "com.atproto.repo.applyWrites". 182 - func RepoApplyWrites(ctx context.Context, c *xrpc.Client, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { 181 + func RepoApplyWrites(ctx context.Context, c util.LexClient, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { 183 182 var out RepoApplyWrites_Output 184 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { 183 + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { 185 184 return nil, err 186 185 } 187 186
+3 -3
api/agnostic/repocreateRecord.go
··· 7 7 import ( 8 8 "context" 9 9 10 - "github.com/bluesky-social/indigo/xrpc" 10 + "github.com/bluesky-social/indigo/lex/util" 11 11 ) 12 12 13 13 // RepoDefs_CommitMeta is a "commitMeta" in the com.atproto.repo.defs schema. ··· 41 41 } 42 42 43 43 // RepoCreateRecord calls the XRPC method "com.atproto.repo.createRecord". 44 - func RepoCreateRecord(ctx context.Context, c *xrpc.Client, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { 44 + func RepoCreateRecord(ctx context.Context, c util.LexClient, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { 45 45 var out RepoCreateRecord_Output 46 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { 46 + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { 47 47 return nil, err 48 48 } 49 49
+3 -3
api/agnostic/repogetRecord.go
··· 8 8 "context" 9 9 "encoding/json" 10 10 11 - "github.com/bluesky-social/indigo/xrpc" 11 + "github.com/bluesky-social/indigo/lex/util" 12 12 ) 13 13 14 14 // RepoGetRecord_Output is the output of a com.atproto.repo.getRecord call. ··· 25 25 // collection: The NSID of the record collection. 26 26 // repo: The handle or DID of the repo. 27 27 // rkey: The Record Key. 28 - func RepoGetRecord(ctx context.Context, c *xrpc.Client, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { 28 + func RepoGetRecord(ctx context.Context, c util.LexClient, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { 29 29 var out RepoGetRecord_Output 30 30 31 31 params := map[string]interface{}{ ··· 34 34 "repo": repo, 35 35 "rkey": rkey, 36 36 } 37 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { 37 + if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { 38 38 return nil, err 39 39 } 40 40
+3 -3
api/agnostic/repolistRecords.go
··· 8 8 "context" 9 9 "encoding/json" 10 10 11 - "github.com/bluesky-social/indigo/xrpc" 11 + "github.com/bluesky-social/indigo/lex/util" 12 12 ) 13 13 14 14 // RepoListRecords_Output is the output of a com.atproto.repo.listRecords call. ··· 31 31 // limit: The number of records to return. 32 32 // repo: The handle or DID of the repo. 33 33 // reverse: Flag to reverse the order of the returned records. 34 - func RepoListRecords(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { 34 + func RepoListRecords(ctx context.Context, c util.LexClient, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { 35 35 var out RepoListRecords_Output 36 36 37 37 params := map[string]interface{}{ ··· 41 41 "repo": repo, 42 42 "reverse": reverse, 43 43 } 44 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { 44 + if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { 45 45 return nil, err 46 46 } 47 47
+3 -3
api/agnostic/repoputRecord.go
··· 7 7 import ( 8 8 "context" 9 9 10 - "github.com/bluesky-social/indigo/xrpc" 10 + "github.com/bluesky-social/indigo/lex/util" 11 11 ) 12 12 13 13 // RepoPutRecord_Input is the input argument to a com.atproto.repo.putRecord call. ··· 37 37 } 38 38 39 39 // RepoPutRecord calls the XRPC method "com.atproto.repo.putRecord". 40 - func RepoPutRecord(ctx context.Context, c *xrpc.Client, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { 40 + func RepoPutRecord(ctx context.Context, c util.LexClient, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { 41 41 var out RepoPutRecord_Output 42 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { 42 + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { 43 43 return nil, err 44 44 } 45 45