Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.4 kB · 53 lines
Go
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.vod.getDraft
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type VodGetDraft_Output struct { LexiconTypeID string `json:"$type,omitempty"` Draft VodDraftDefs_DraftView `json:"draft"`}
// RecordTypeID implements glex.Record.func (t *VodGetDraft_Output) RecordTypeID() string { return "place.stream.vod.getDraft" }
func (t *VodGetDraft_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.vod.getDraft" return glex.MarshalCBOR(w, &cp)}
func (t *VodGetDraft_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// VodGetDraft calls the XRPC method "place.stream.vod.getDraft".//// Get a single draft VOD by its ats:// URI. Only accessible by the draft's author.//// uri: The ats:// URI of the draft record.func VodGetDraft(ctx context.Context, c glex.LexClient, uri string) (*VodGetDraft_Output, error) { var out VodGetDraft_Output
params := map[string]interface{}{} params["uri"] = uri
if err := c.LexDo(ctx, glex.Query, "", "place.stream.vod.getDraft", params, nil, &out); err != nil { return nil, err } return &out, nil}