Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.3 kB · 75 lines
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.moderation.deletePin
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type ModerationDeletePin_Input struct { LexiconTypeID string `json:"$type,omitempty"` // pinUri: The AT-URI of the pinned record to delete. PinUri string `json:"pinUri"` // streamer: The DID of the streamer. Streamer string `json:"streamer"`}
// RecordTypeID implements glex.Record.func (t *ModerationDeletePin_Input) RecordTypeID() string { return "place.stream.moderation.deletePin" }
func (t *ModerationDeletePin_Input) 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.moderation.deletePin" return glex.MarshalCBOR(w, &cp)}
func (t *ModerationDeletePin_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type ModerationDeletePin_Output struct { LexiconTypeID string `json:"$type,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ModerationDeletePin_Output) RecordTypeID() string { return "place.stream.moderation.deletePin"}
func (t *ModerationDeletePin_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.moderation.deletePin" return glex.MarshalCBOR(w, &cp)}
func (t *ModerationDeletePin_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ModerationDeletePin calls the XRPC method "place.stream.moderation.deletePin".//// Unpin a pinned chat message on behalf of a streamer. Requires 'message.pin' permission. Deletes the place.stream.chat.pinnedRecord from the streamer's repo.func ModerationDeletePin(ctx context.Context, c glex.LexClient, input *ModerationDeletePin_Input) (*ModerationDeletePin_Output, error) { var out ModerationDeletePin_Output
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.moderation.deletePin", nil, input, &out); err != nil { return nil, err } return &out, nil}