// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.graph.getFollowingUser package placestream import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" comatproto "stream.place/streamplace/pkg/comatproto" ) type GraphGetFollowingUser_Output struct { LexiconTypeID string `json:"$type,omitempty"` Follow *comatproto.RepoStrongRef `json:"follow,omitempty"` } // RecordTypeID implements glex.Record. func (t *GraphGetFollowingUser_Output) RecordTypeID() string { return "place.stream.graph.getFollowingUser" } func (t *GraphGetFollowingUser_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.graph.getFollowingUser" return glex.MarshalCBOR(w, &cp) } func (t *GraphGetFollowingUser_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphGetFollowingUser calls the XRPC method "place.stream.graph.getFollowingUser". // // Get whether or not user A is following user B. // // subjectDID: The DID of the user potentially being followed // userDID: The DID of the potentially-following user func GraphGetFollowingUser(ctx context.Context, c glex.LexClient, subjectDID string, userDID string) (*GraphGetFollowingUser_Output, error) { var out GraphGetFollowingUser_Output params := map[string]interface{}{} params["subjectDID"] = subjectDID params["userDID"] = userDID if err := c.LexDo(ctx, glex.Query, "", "place.stream.graph.getFollowingUser", params, nil, &out); err != nil { return nil, err } return &out, nil }