~james/core

core/api/org_tangled/stringgetString.go -rw-r--r-- 1.0 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 14 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package org_tangled

// schema: org.tangled.string.getString

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	StringGetStringNSID = "org.tangled.string.getString"
)

// StringGetString_Output is the output of a org.tangled.string.getString call.
type StringGetString_Output struct {
	Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
	Uri string  `json:"uri" cborgen:"uri"`
	// value: Embedded sh.tangled.string record.
	Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
}

// StringGetString calls the XRPC method "org.tangled.string.getString".
//
// uri: AT-URI of the sh.tangled.string record to fetch.
func StringGetString(ctx context.Context, c util.LexClient, uri string) (*StringGetString_Output, error) {
	var out StringGetString_Output

	params := map[string]interface{}{}
	params["uri"] = uri
	if err := c.LexDo(ctx, util.Query, "", "org.tangled.string.getString", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}