// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.live.getLiveUsers package placestream import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type LiveGetLiveUsers_Output struct { LexiconTypeID string `json:"$type,omitempty"` Streams []Livestream_LivestreamView `json:"streams,omitempty"` } // RecordTypeID implements glex.Record. func (t *LiveGetLiveUsers_Output) RecordTypeID() string { return "place.stream.live.getLiveUsers" } func (t *LiveGetLiveUsers_Output) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "place.stream.live.getLiveUsers" return glex.MarshalCBOR(w, &cp) } func (t *LiveGetLiveUsers_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // LiveGetLiveUsers calls the XRPC method "place.stream.live.getLiveUsers". // // Get a list of livestream segments for a user func LiveGetLiveUsers(ctx context.Context, c glex.LexClient, before string, limit *int64) (*LiveGetLiveUsers_Output, error) { var out LiveGetLiveUsers_Output params := map[string]interface{}{} if before != "" { params["before"] = before } if limit != nil { params["limit"] = *limit } if err := c.LexDo(ctx, glex.Query, "", "place.stream.live.getLiveUsers", params, nil, &out); err != nil { return nil, err } return &out, nil }