+274
-2
api/bsky/cbor_gen.go
+274
-2
api/bsky/cbor_gen.go
···
6921
6921
}
6922
6922
6923
6923
cw := cbg.NewCborWriter(w)
6924
-
fieldCount := 4
6924
+
fieldCount := 7
6925
6925
6926
6926
if t.Labels == nil {
6927
+
fieldCount--
6928
+
}
6929
+
6930
+
if t.ReasonTypes == nil {
6931
+
fieldCount--
6932
+
}
6933
+
6934
+
if t.SubjectCollections == nil {
6935
+
fieldCount--
6936
+
}
6937
+
6938
+
if t.SubjectTypes == nil {
6927
6939
fieldCount--
6928
6940
}
6929
6941
···
7007
7019
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
7008
7020
return err
7009
7021
}
7022
+
7023
+
// t.ReasonTypes ([]*string) (slice)
7024
+
if t.ReasonTypes != nil {
7025
+
7026
+
if len("reasonTypes") > 1000000 {
7027
+
return xerrors.Errorf("Value in field \"reasonTypes\" was too long")
7028
+
}
7029
+
7030
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("reasonTypes"))); err != nil {
7031
+
return err
7032
+
}
7033
+
if _, err := cw.WriteString(string("reasonTypes")); err != nil {
7034
+
return err
7035
+
}
7036
+
7037
+
if len(t.ReasonTypes) > 8192 {
7038
+
return xerrors.Errorf("Slice value in field t.ReasonTypes was too long")
7039
+
}
7040
+
7041
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.ReasonTypes))); err != nil {
7042
+
return err
7043
+
}
7044
+
for _, v := range t.ReasonTypes {
7045
+
if v == nil {
7046
+
if _, err := cw.Write(cbg.CborNull); err != nil {
7047
+
return err
7048
+
}
7049
+
} else {
7050
+
if len(*v) > 1000000 {
7051
+
return xerrors.Errorf("Value in field v was too long")
7052
+
}
7053
+
7054
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*v))); err != nil {
7055
+
return err
7056
+
}
7057
+
if _, err := cw.WriteString(string(*v)); err != nil {
7058
+
return err
7059
+
}
7060
+
}
7061
+
7062
+
}
7063
+
}
7064
+
7065
+
// t.SubjectTypes ([]*string) (slice)
7066
+
if t.SubjectTypes != nil {
7067
+
7068
+
if len("subjectTypes") > 1000000 {
7069
+
return xerrors.Errorf("Value in field \"subjectTypes\" was too long")
7070
+
}
7071
+
7072
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("subjectTypes"))); err != nil {
7073
+
return err
7074
+
}
7075
+
if _, err := cw.WriteString(string("subjectTypes")); err != nil {
7076
+
return err
7077
+
}
7078
+
7079
+
if len(t.SubjectTypes) > 8192 {
7080
+
return xerrors.Errorf("Slice value in field t.SubjectTypes was too long")
7081
+
}
7082
+
7083
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.SubjectTypes))); err != nil {
7084
+
return err
7085
+
}
7086
+
for _, v := range t.SubjectTypes {
7087
+
if v == nil {
7088
+
if _, err := cw.Write(cbg.CborNull); err != nil {
7089
+
return err
7090
+
}
7091
+
} else {
7092
+
if len(*v) > 1000000 {
7093
+
return xerrors.Errorf("Value in field v was too long")
7094
+
}
7095
+
7096
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*v))); err != nil {
7097
+
return err
7098
+
}
7099
+
if _, err := cw.WriteString(string(*v)); err != nil {
7100
+
return err
7101
+
}
7102
+
}
7103
+
7104
+
}
7105
+
}
7106
+
7107
+
// t.SubjectCollections ([]string) (slice)
7108
+
if t.SubjectCollections != nil {
7109
+
7110
+
if len("subjectCollections") > 1000000 {
7111
+
return xerrors.Errorf("Value in field \"subjectCollections\" was too long")
7112
+
}
7113
+
7114
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("subjectCollections"))); err != nil {
7115
+
return err
7116
+
}
7117
+
if _, err := cw.WriteString(string("subjectCollections")); err != nil {
7118
+
return err
7119
+
}
7120
+
7121
+
if len(t.SubjectCollections) > 8192 {
7122
+
return xerrors.Errorf("Slice value in field t.SubjectCollections was too long")
7123
+
}
7124
+
7125
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.SubjectCollections))); err != nil {
7126
+
return err
7127
+
}
7128
+
for _, v := range t.SubjectCollections {
7129
+
if len(v) > 1000000 {
7130
+
return xerrors.Errorf("Value in field v was too long")
7131
+
}
7132
+
7133
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
7134
+
return err
7135
+
}
7136
+
if _, err := cw.WriteString(string(v)); err != nil {
7137
+
return err
7138
+
}
7139
+
7140
+
}
7141
+
}
7010
7142
return nil
7011
7143
}
7012
7144
···
7035
7167
7036
7168
n := extra
7037
7169
7038
-
nameBuf := make([]byte, 9)
7170
+
nameBuf := make([]byte, 18)
7039
7171
for i := uint64(0); i < n; i++ {
7040
7172
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
7041
7173
if err != nil {
···
7112
7244
}
7113
7245
7114
7246
t.CreatedAt = string(sval)
7247
+
}
7248
+
// t.ReasonTypes ([]*string) (slice)
7249
+
case "reasonTypes":
7250
+
7251
+
maj, extra, err = cr.ReadHeader()
7252
+
if err != nil {
7253
+
return err
7254
+
}
7255
+
7256
+
if extra > 8192 {
7257
+
return fmt.Errorf("t.ReasonTypes: array too large (%d)", extra)
7258
+
}
7259
+
7260
+
if maj != cbg.MajArray {
7261
+
return fmt.Errorf("expected cbor array")
7262
+
}
7263
+
7264
+
if extra > 0 {
7265
+
t.ReasonTypes = make([]*string, extra)
7266
+
}
7267
+
7268
+
for i := 0; i < int(extra); i++ {
7269
+
{
7270
+
var maj byte
7271
+
var extra uint64
7272
+
var err error
7273
+
_ = maj
7274
+
_ = extra
7275
+
_ = err
7276
+
7277
+
{
7278
+
b, err := cr.ReadByte()
7279
+
if err != nil {
7280
+
return err
7281
+
}
7282
+
if b != cbg.CborNull[0] {
7283
+
if err := cr.UnreadByte(); err != nil {
7284
+
return err
7285
+
}
7286
+
7287
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7288
+
if err != nil {
7289
+
return err
7290
+
}
7291
+
7292
+
t.ReasonTypes[i] = (*string)(&sval)
7293
+
}
7294
+
}
7295
+
7296
+
}
7297
+
}
7298
+
// t.SubjectTypes ([]*string) (slice)
7299
+
case "subjectTypes":
7300
+
7301
+
maj, extra, err = cr.ReadHeader()
7302
+
if err != nil {
7303
+
return err
7304
+
}
7305
+
7306
+
if extra > 8192 {
7307
+
return fmt.Errorf("t.SubjectTypes: array too large (%d)", extra)
7308
+
}
7309
+
7310
+
if maj != cbg.MajArray {
7311
+
return fmt.Errorf("expected cbor array")
7312
+
}
7313
+
7314
+
if extra > 0 {
7315
+
t.SubjectTypes = make([]*string, extra)
7316
+
}
7317
+
7318
+
for i := 0; i < int(extra); i++ {
7319
+
{
7320
+
var maj byte
7321
+
var extra uint64
7322
+
var err error
7323
+
_ = maj
7324
+
_ = extra
7325
+
_ = err
7326
+
7327
+
{
7328
+
b, err := cr.ReadByte()
7329
+
if err != nil {
7330
+
return err
7331
+
}
7332
+
if b != cbg.CborNull[0] {
7333
+
if err := cr.UnreadByte(); err != nil {
7334
+
return err
7335
+
}
7336
+
7337
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7338
+
if err != nil {
7339
+
return err
7340
+
}
7341
+
7342
+
t.SubjectTypes[i] = (*string)(&sval)
7343
+
}
7344
+
}
7345
+
7346
+
}
7347
+
}
7348
+
// t.SubjectCollections ([]string) (slice)
7349
+
case "subjectCollections":
7350
+
7351
+
maj, extra, err = cr.ReadHeader()
7352
+
if err != nil {
7353
+
return err
7354
+
}
7355
+
7356
+
if extra > 8192 {
7357
+
return fmt.Errorf("t.SubjectCollections: array too large (%d)", extra)
7358
+
}
7359
+
7360
+
if maj != cbg.MajArray {
7361
+
return fmt.Errorf("expected cbor array")
7362
+
}
7363
+
7364
+
if extra > 0 {
7365
+
t.SubjectCollections = make([]string, extra)
7366
+
}
7367
+
7368
+
for i := 0; i < int(extra); i++ {
7369
+
{
7370
+
var maj byte
7371
+
var extra uint64
7372
+
var err error
7373
+
_ = maj
7374
+
_ = extra
7375
+
_ = err
7376
+
7377
+
{
7378
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7379
+
if err != nil {
7380
+
return err
7381
+
}
7382
+
7383
+
t.SubjectCollections[i] = string(sval)
7384
+
}
7385
+
7386
+
}
7115
7387
}
7116
7388
7117
7389
default:
+2
-1
api/bsky/embedvideo.go
+2
-1
api/bsky/embedvideo.go
···
18
18
Alt *string `json:"alt,omitempty" cborgen:"alt,omitempty"`
19
19
AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"`
20
20
Captions []*EmbedVideo_Caption `json:"captions,omitempty" cborgen:"captions,omitempty"`
21
-
Video *util.LexBlob `json:"video" cborgen:"video"`
21
+
// video: The mp4 video file. May be up to 100mb, formerly limited to 50mb.
22
+
Video *util.LexBlob `json:"video" cborgen:"video"`
22
23
}
23
24
24
25
// EmbedVideo_Caption is a "caption" in the app.bsky.embed.video schema.
+8
-2
api/bsky/labelerdefs.go
+8
-2
api/bsky/labelerdefs.go
···
41
41
Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
42
42
LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"`
43
43
Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"`
44
-
Uri string `json:"uri" cborgen:"uri"`
45
-
Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
44
+
// reasonTypes: The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.
45
+
ReasonTypes []*string `json:"reasonTypes,omitempty" cborgen:"reasonTypes,omitempty"`
46
+
// subjectCollections: Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.
47
+
SubjectCollections []string `json:"subjectCollections,omitempty" cborgen:"subjectCollections,omitempty"`
48
+
// subjectTypes: The set of subject types (account, record, etc) this service accepts reports on.
49
+
SubjectTypes []*string `json:"subjectTypes,omitempty" cborgen:"subjectTypes,omitempty"`
50
+
Uri string `json:"uri" cborgen:"uri"`
51
+
Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
46
52
}
47
53
48
54
// LabelerDefs_LabelerViewerState is a "labelerViewerState" in the app.bsky.labeler.defs schema.
+6
api/bsky/labelerservice.go
+6
api/bsky/labelerservice.go
···
24
24
CreatedAt string `json:"createdAt" cborgen:"createdAt"`
25
25
Labels *LabelerService_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"`
26
26
Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"`
27
+
// reasonTypes: The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.
28
+
ReasonTypes []*string `json:"reasonTypes,omitempty" cborgen:"reasonTypes,omitempty"`
29
+
// subjectCollections: Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.
30
+
SubjectCollections []string `json:"subjectCollections,omitempty" cborgen:"subjectCollections,omitempty"`
31
+
// subjectTypes: The set of subject types (account, record, etc) this service accepts reports on.
32
+
SubjectTypes []*string `json:"subjectTypes,omitempty" cborgen:"subjectTypes,omitempty"`
27
33
}
28
34
29
35
type LabelerService_Labels struct {
+24
api/bsky/unspecceddefs.go
+24
api/bsky/unspecceddefs.go
···
19
19
Uri string `json:"uri" cborgen:"uri"`
20
20
}
21
21
22
+
// UnspeccedDefs_SkeletonTrend is a "skeletonTrend" in the app.bsky.unspecced.defs schema.
23
+
type UnspeccedDefs_SkeletonTrend struct {
24
+
Category *string `json:"category,omitempty" cborgen:"category,omitempty"`
25
+
Dids []string `json:"dids" cborgen:"dids"`
26
+
DisplayName string `json:"displayName" cborgen:"displayName"`
27
+
Link string `json:"link" cborgen:"link"`
28
+
PostCount int64 `json:"postCount" cborgen:"postCount"`
29
+
StartedAt string `json:"startedAt" cborgen:"startedAt"`
30
+
Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
31
+
Topic string `json:"topic" cborgen:"topic"`
32
+
}
33
+
34
+
// UnspeccedDefs_TrendView is a "trendView" in the app.bsky.unspecced.defs schema.
35
+
type UnspeccedDefs_TrendView struct {
36
+
Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"`
37
+
Category *string `json:"category,omitempty" cborgen:"category,omitempty"`
38
+
DisplayName string `json:"displayName" cborgen:"displayName"`
39
+
Link string `json:"link" cborgen:"link"`
40
+
PostCount int64 `json:"postCount" cborgen:"postCount"`
41
+
StartedAt string `json:"startedAt" cborgen:"startedAt"`
42
+
Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
43
+
Topic string `json:"topic" cborgen:"topic"`
44
+
}
45
+
22
46
// UnspeccedDefs_TrendingTopic is a "trendingTopic" in the app.bsky.unspecced.defs schema.
23
47
type UnspeccedDefs_TrendingTopic struct {
24
48
Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
+30
api/bsky/unspeccedgetSuggestedFeeds.go
+30
api/bsky/unspeccedgetSuggestedFeeds.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getSuggestedFeeds
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetSuggestedFeeds_Output is the output of a app.bsky.unspecced.getSuggestedFeeds call.
14
+
type UnspeccedGetSuggestedFeeds_Output struct {
15
+
Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"`
16
+
}
17
+
18
+
// UnspeccedGetSuggestedFeeds calls the XRPC method "app.bsky.unspecced.getSuggestedFeeds".
19
+
func UnspeccedGetSuggestedFeeds(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetSuggestedFeeds_Output, error) {
20
+
var out UnspeccedGetSuggestedFeeds_Output
21
+
22
+
params := map[string]interface{}{
23
+
"limit": limit,
24
+
}
25
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedFeeds", params, nil, &out); err != nil {
26
+
return nil, err
27
+
}
28
+
29
+
return &out, nil
30
+
}
+33
api/bsky/unspeccedgetSuggestedFeedsSkeleton.go
+33
api/bsky/unspeccedgetSuggestedFeedsSkeleton.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getSuggestedFeedsSkeleton
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetSuggestedFeedsSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedFeedsSkeleton call.
14
+
type UnspeccedGetSuggestedFeedsSkeleton_Output struct {
15
+
Feeds []string `json:"feeds" cborgen:"feeds"`
16
+
}
17
+
18
+
// UnspeccedGetSuggestedFeedsSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedFeedsSkeleton".
19
+
//
20
+
// viewer: DID of the account making the request (not included for public/unauthenticated queries).
21
+
func UnspeccedGetSuggestedFeedsSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetSuggestedFeedsSkeleton_Output, error) {
22
+
var out UnspeccedGetSuggestedFeedsSkeleton_Output
23
+
24
+
params := map[string]interface{}{
25
+
"limit": limit,
26
+
"viewer": viewer,
27
+
}
28
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedFeedsSkeleton", params, nil, &out); err != nil {
29
+
return nil, err
30
+
}
31
+
32
+
return &out, nil
33
+
}
+30
api/bsky/unspeccedgetSuggestedStarterPacks.go
+30
api/bsky/unspeccedgetSuggestedStarterPacks.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getSuggestedStarterPacks
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetSuggestedStarterPacks_Output is the output of a app.bsky.unspecced.getSuggestedStarterPacks call.
14
+
type UnspeccedGetSuggestedStarterPacks_Output struct {
15
+
StarterPacks []*GraphDefs_StarterPackView `json:"starterPacks" cborgen:"starterPacks"`
16
+
}
17
+
18
+
// UnspeccedGetSuggestedStarterPacks calls the XRPC method "app.bsky.unspecced.getSuggestedStarterPacks".
19
+
func UnspeccedGetSuggestedStarterPacks(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetSuggestedStarterPacks_Output, error) {
20
+
var out UnspeccedGetSuggestedStarterPacks_Output
21
+
22
+
params := map[string]interface{}{
23
+
"limit": limit,
24
+
}
25
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedStarterPacks", params, nil, &out); err != nil {
26
+
return nil, err
27
+
}
28
+
29
+
return &out, nil
30
+
}
+33
api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go
+33
api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getSuggestedStarterPacksSkeleton
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetSuggestedStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedStarterPacksSkeleton call.
14
+
type UnspeccedGetSuggestedStarterPacksSkeleton_Output struct {
15
+
StarterPacks []string `json:"starterPacks" cborgen:"starterPacks"`
16
+
}
17
+
18
+
// UnspeccedGetSuggestedStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedStarterPacksSkeleton".
19
+
//
20
+
// viewer: DID of the account making the request (not included for public/unauthenticated queries).
21
+
func UnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetSuggestedStarterPacksSkeleton_Output, error) {
22
+
var out UnspeccedGetSuggestedStarterPacksSkeleton_Output
23
+
24
+
params := map[string]interface{}{
25
+
"limit": limit,
26
+
"viewer": viewer,
27
+
}
28
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", params, nil, &out); err != nil {
29
+
return nil, err
30
+
}
31
+
32
+
return &out, nil
33
+
}
+33
api/bsky/unspeccedgetSuggestedUsers.go
+33
api/bsky/unspeccedgetSuggestedUsers.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getSuggestedUsers
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetSuggestedUsers_Output is the output of a app.bsky.unspecced.getSuggestedUsers call.
14
+
type UnspeccedGetSuggestedUsers_Output struct {
15
+
Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"`
16
+
}
17
+
18
+
// UnspeccedGetSuggestedUsers calls the XRPC method "app.bsky.unspecced.getSuggestedUsers".
19
+
//
20
+
// category: Category of users to get suggestions for.
21
+
func UnspeccedGetSuggestedUsers(ctx context.Context, c *xrpc.Client, category string, limit int64) (*UnspeccedGetSuggestedUsers_Output, error) {
22
+
var out UnspeccedGetSuggestedUsers_Output
23
+
24
+
params := map[string]interface{}{
25
+
"category": category,
26
+
"limit": limit,
27
+
}
28
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedUsers", params, nil, &out); err != nil {
29
+
return nil, err
30
+
}
31
+
32
+
return &out, nil
33
+
}
+35
api/bsky/unspeccedgetSuggestedUsersSkeleton.go
+35
api/bsky/unspeccedgetSuggestedUsersSkeleton.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getSuggestedUsersSkeleton
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetSuggestedUsersSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedUsersSkeleton call.
14
+
type UnspeccedGetSuggestedUsersSkeleton_Output struct {
15
+
Dids []string `json:"dids" cborgen:"dids"`
16
+
}
17
+
18
+
// UnspeccedGetSuggestedUsersSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedUsersSkeleton".
19
+
//
20
+
// category: Category of users to get suggestions for.
21
+
// viewer: DID of the account making the request (not included for public/unauthenticated queries).
22
+
func UnspeccedGetSuggestedUsersSkeleton(ctx context.Context, c *xrpc.Client, category string, limit int64, viewer string) (*UnspeccedGetSuggestedUsersSkeleton_Output, error) {
23
+
var out UnspeccedGetSuggestedUsersSkeleton_Output
24
+
25
+
params := map[string]interface{}{
26
+
"category": category,
27
+
"limit": limit,
28
+
"viewer": viewer,
29
+
}
30
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedUsersSkeleton", params, nil, &out); err != nil {
31
+
return nil, err
32
+
}
33
+
34
+
return &out, nil
35
+
}
+30
api/bsky/unspeccedgetTrends.go
+30
api/bsky/unspeccedgetTrends.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getTrends
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetTrends_Output is the output of a app.bsky.unspecced.getTrends call.
14
+
type UnspeccedGetTrends_Output struct {
15
+
Trends []*UnspeccedDefs_TrendView `json:"trends" cborgen:"trends"`
16
+
}
17
+
18
+
// UnspeccedGetTrends calls the XRPC method "app.bsky.unspecced.getTrends".
19
+
func UnspeccedGetTrends(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetTrends_Output, error) {
20
+
var out UnspeccedGetTrends_Output
21
+
22
+
params := map[string]interface{}{
23
+
"limit": limit,
24
+
}
25
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrends", params, nil, &out); err != nil {
26
+
return nil, err
27
+
}
28
+
29
+
return &out, nil
30
+
}
+33
api/bsky/unspeccedgetTrendsSkeleton.go
+33
api/bsky/unspeccedgetTrendsSkeleton.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package bsky
4
+
5
+
// schema: app.bsky.unspecced.getTrendsSkeleton
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/xrpc"
11
+
)
12
+
13
+
// UnspeccedGetTrendsSkeleton_Output is the output of a app.bsky.unspecced.getTrendsSkeleton call.
14
+
type UnspeccedGetTrendsSkeleton_Output struct {
15
+
Trends []*UnspeccedDefs_SkeletonTrend `json:"trends" cborgen:"trends"`
16
+
}
17
+
18
+
// UnspeccedGetTrendsSkeleton calls the XRPC method "app.bsky.unspecced.getTrendsSkeleton".
19
+
//
20
+
// viewer: DID of the account making the request (not included for public/unauthenticated queries).
21
+
func UnspeccedGetTrendsSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetTrendsSkeleton_Output, error) {
22
+
var out UnspeccedGetTrendsSkeleton_Output
23
+
24
+
params := map[string]interface{}{
25
+
"limit": limit,
26
+
"viewer": viewer,
27
+
}
28
+
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrendsSkeleton", params, nil, &out); err != nil {
29
+
return nil, err
30
+
}
31
+
32
+
return &out, nil
33
+
}