diff --git a/api/agnostic/actorgetPreferences.go b/api/agnostic/actorgetPreferences.go index 9ee242c0..150e3e79 100644 --- a/api/agnostic/actorgetPreferences.go +++ b/api/agnostic/actorgetPreferences.go @@ -7,7 +7,7 @@ package agnostic import ( "context" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // ActorGetPreferences_Output is the output of a app.bsky.actor.getPreferences call. @@ -16,11 +16,11 @@ type ActorGetPreferences_Output struct { } // ActorGetPreferences calls the XRPC method "app.bsky.actor.getPreferences". -func ActorGetPreferences(ctx context.Context, c *xrpc.Client) (*ActorGetPreferences_Output, error) { +func ActorGetPreferences(ctx context.Context, c util.LexClient) (*ActorGetPreferences_Output, error) { var out ActorGetPreferences_Output params := map[string]interface{}{} - if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { + if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { return nil, err } diff --git a/api/agnostic/actorputPreferences.go b/api/agnostic/actorputPreferences.go index 3648e5bd..02276da2 100644 --- a/api/agnostic/actorputPreferences.go +++ b/api/agnostic/actorputPreferences.go @@ -7,7 +7,7 @@ package agnostic import ( "context" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // ActorPutPreferences_Input is the input argument to a app.bsky.actor.putPreferences call. @@ -16,8 +16,8 @@ type ActorPutPreferences_Input struct { } // ActorPutPreferences calls the XRPC method "app.bsky.actor.putPreferences". -func ActorPutPreferences(ctx context.Context, c *xrpc.Client, input *ActorPutPreferences_Input) error { - if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { +func ActorPutPreferences(ctx context.Context, c util.LexClient, input *ActorPutPreferences_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { return err } diff --git a/api/agnostic/identitygetRecommendedDidCredentials.go b/api/agnostic/identitygetRecommendedDidCredentials.go index ea0a70a9..85fabcf6 100644 --- a/api/agnostic/identitygetRecommendedDidCredentials.go +++ b/api/agnostic/identitygetRecommendedDidCredentials.go @@ -8,14 +8,14 @@ import ( "context" "encoding/json" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // IdentityGetRecommendedDidCredentials calls the XRPC method "com.atproto.identity.getRecommendedDidCredentials". -func IdentityGetRecommendedDidCredentials(ctx context.Context, c *xrpc.Client) (*json.RawMessage, error) { +func IdentityGetRecommendedDidCredentials(ctx context.Context, c util.LexClient) (*json.RawMessage, error) { var out json.RawMessage - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, util.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { return nil, err } diff --git a/api/agnostic/identitysignPlcOperation.go b/api/agnostic/identitysignPlcOperation.go index 59d83a23..44c6f732 100644 --- a/api/agnostic/identitysignPlcOperation.go +++ b/api/agnostic/identitysignPlcOperation.go @@ -8,7 +8,7 @@ import ( "context" "encoding/json" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // IdentitySignPlcOperation_Input is the input argument to a com.atproto.identity.signPlcOperation call. @@ -28,9 +28,9 @@ type IdentitySignPlcOperation_Output struct { } // IdentitySignPlcOperation calls the XRPC method "com.atproto.identity.signPlcOperation". -func IdentitySignPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { +func IdentitySignPlcOperation(ctx context.Context, c util.LexClient, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { var out IdentitySignPlcOperation_Output - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { return nil, err } diff --git a/api/agnostic/identitysubmitPlcOperation.go b/api/agnostic/identitysubmitPlcOperation.go index 91f9cf0c..ef7e8a0a 100644 --- a/api/agnostic/identitysubmitPlcOperation.go +++ b/api/agnostic/identitysubmitPlcOperation.go @@ -8,7 +8,7 @@ import ( "context" "encoding/json" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // IdentitySubmitPlcOperation_Input is the input argument to a com.atproto.identity.submitPlcOperation call. @@ -17,8 +17,8 @@ type IdentitySubmitPlcOperation_Input struct { } // IdentitySubmitPlcOperation calls the XRPC method "com.atproto.identity.submitPlcOperation". -func IdentitySubmitPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySubmitPlcOperation_Input) error { - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { +func IdentitySubmitPlcOperation(ctx context.Context, c util.LexClient, input *IdentitySubmitPlcOperation_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { return err } diff --git a/api/agnostic/repoapplyWrites.go b/api/agnostic/repoapplyWrites.go index de0799ac..0dbe127b 100644 --- a/api/agnostic/repoapplyWrites.go +++ b/api/agnostic/repoapplyWrites.go @@ -10,7 +10,6 @@ import ( "fmt" "github.com/bluesky-social/indigo/lex/util" - "github.com/bluesky-social/indigo/xrpc" ) // RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema. @@ -179,9 +178,9 @@ type RepoApplyWrites_UpdateResult struct { } // RepoApplyWrites calls the XRPC method "com.atproto.repo.applyWrites". -func RepoApplyWrites(ctx context.Context, c *xrpc.Client, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { +func RepoApplyWrites(ctx context.Context, c util.LexClient, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { var out RepoApplyWrites_Output - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { return nil, err } diff --git a/api/agnostic/repocreateRecord.go b/api/agnostic/repocreateRecord.go index 9dcddadb..44680b76 100644 --- a/api/agnostic/repocreateRecord.go +++ b/api/agnostic/repocreateRecord.go @@ -7,7 +7,7 @@ package agnostic import ( "context" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // RepoDefs_CommitMeta is a "commitMeta" in the com.atproto.repo.defs schema. @@ -41,9 +41,9 @@ type RepoCreateRecord_Output struct { } // RepoCreateRecord calls the XRPC method "com.atproto.repo.createRecord". -func RepoCreateRecord(ctx context.Context, c *xrpc.Client, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { +func RepoCreateRecord(ctx context.Context, c util.LexClient, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { var out RepoCreateRecord_Output - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { return nil, err } diff --git a/api/agnostic/repogetRecord.go b/api/agnostic/repogetRecord.go index 6025c959..0417c79e 100644 --- a/api/agnostic/repogetRecord.go +++ b/api/agnostic/repogetRecord.go @@ -8,7 +8,7 @@ import ( "context" "encoding/json" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // RepoGetRecord_Output is the output of a com.atproto.repo.getRecord call. @@ -25,7 +25,7 @@ type RepoGetRecord_Output struct { // collection: The NSID of the record collection. // repo: The handle or DID of the repo. // rkey: The Record Key. -func RepoGetRecord(ctx context.Context, c *xrpc.Client, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { +func RepoGetRecord(ctx context.Context, c util.LexClient, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { var out RepoGetRecord_Output params := map[string]interface{}{ @@ -34,7 +34,7 @@ func RepoGetRecord(ctx context.Context, c *xrpc.Client, cid string, collection s "repo": repo, "rkey": rkey, } - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { + if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { return nil, err } diff --git a/api/agnostic/repolistRecords.go b/api/agnostic/repolistRecords.go index 2e339250..74b6ba92 100644 --- a/api/agnostic/repolistRecords.go +++ b/api/agnostic/repolistRecords.go @@ -8,7 +8,7 @@ import ( "context" "encoding/json" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // RepoListRecords_Output is the output of a com.atproto.repo.listRecords call. @@ -31,7 +31,7 @@ type RepoListRecords_Record struct { // limit: The number of records to return. // repo: The handle or DID of the repo. // reverse: Flag to reverse the order of the returned records. -func RepoListRecords(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { +func RepoListRecords(ctx context.Context, c util.LexClient, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { var out RepoListRecords_Output params := map[string]interface{}{ @@ -41,7 +41,7 @@ func RepoListRecords(ctx context.Context, c *xrpc.Client, collection string, cur "repo": repo, "reverse": reverse, } - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { + if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { return nil, err } diff --git a/api/agnostic/repoputRecord.go b/api/agnostic/repoputRecord.go index 2448793a..0d2d80c4 100644 --- a/api/agnostic/repoputRecord.go +++ b/api/agnostic/repoputRecord.go @@ -7,7 +7,7 @@ package agnostic import ( "context" - "github.com/bluesky-social/indigo/xrpc" + "github.com/bluesky-social/indigo/lex/util" ) // RepoPutRecord_Input is the input argument to a com.atproto.repo.putRecord call. @@ -37,9 +37,9 @@ type RepoPutRecord_Output struct { } // RepoPutRecord calls the XRPC method "com.atproto.repo.putRecord". -func RepoPutRecord(ctx context.Context, c *xrpc.Client, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { +func RepoPutRecord(ctx context.Context, c util.LexClient, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { var out RepoPutRecord_Output - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { return nil, err }