Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.3 kB · 77 lines
Go
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.moderation.deleteBlock
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type ModerationDeleteBlock_Input struct { LexiconTypeID string `json:"$type,omitempty"` // blockUri: The AT-URI of the block record to delete. BlockUri string `json:"blockUri"` // streamer: The DID of the streamer. Streamer string `json:"streamer"`}
// RecordTypeID implements glex.Record.func (t *ModerationDeleteBlock_Input) RecordTypeID() string { return "place.stream.moderation.deleteBlock"}
func (t *ModerationDeleteBlock_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.deleteBlock" return glex.MarshalCBOR(w, &cp)}
func (t *ModerationDeleteBlock_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type ModerationDeleteBlock_Output struct { LexiconTypeID string `json:"$type,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ModerationDeleteBlock_Output) RecordTypeID() string { return "place.stream.moderation.deleteBlock"}
func (t *ModerationDeleteBlock_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.deleteBlock" return glex.MarshalCBOR(w, &cp)}
func (t *ModerationDeleteBlock_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ModerationDeleteBlock calls the XRPC method "place.stream.moderation.deleteBlock".//// Delete a block (unban) on behalf of a streamer. Requires 'ban' permission. Deletes an app.bsky.graph.block record from the streamer's repository.func ModerationDeleteBlock(ctx context.Context, c glex.LexClient, input *ModerationDeleteBlock_Input) (*ModerationDeleteBlock_Output, error) { var out ModerationDeleteBlock_Output
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.moderation.deleteBlock", nil, input, &out); err != nil { return nil, err } return &out, nil}