···11+---
22+title: place.stream.live.teleport
33+description: Reference for the place.stream.live.teleport lexicon
44+---
55+66+**Lexicon Version:** 1
77+88+## Definitions
99+1010+<a name="main"></a>
1111+1212+### `main`
1313+1414+**Type:** `record`
1515+1616+Record defining a 'teleport', that is active during a certain time.
1717+1818+**Record Key:** `tid`
1919+2020+**Record Properties:**
2121+2222+| Name | Type | Req'd | Description | Constraints |
2323+| ----------------- | --------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
2424+| `streamer` | `string` | ✅ | The DID of the streamer to teleport to. | Format: `did` |
2525+| `startsAt` | `string` | ✅ | The time the teleport becomes active. | Format: `datetime` |
2626+| `durationSeconds` | `integer` | ❌ | The time limit in seconds for the teleport. If not set, the teleport is permanent. Must be at least 60 seconds, and no more than 32,400 seconds (9 hours). | Min: 60<br/>Max: 32400 |
2727+2828+---
2929+3030+## Lexicon Source
3131+3232+```json
3333+{
3434+ "lexicon": 1,
3535+ "id": "place.stream.live.teleport",
3636+ "defs": {
3737+ "main": {
3838+ "type": "record",
3939+ "key": "tid",
4040+ "description": "Record defining a 'teleport', that is active during a certain time.",
4141+ "record": {
4242+ "type": "object",
4343+ "required": ["streamer", "startsAt"],
4444+ "properties": {
4545+ "streamer": {
4646+ "type": "string",
4747+ "format": "did",
4848+ "description": "The DID of the streamer to teleport to."
4949+ },
5050+ "startsAt": {
5151+ "type": "string",
5252+ "format": "datetime",
5353+ "description": "The time the teleport becomes active."
5454+ },
5555+ "durationSeconds": {
5656+ "type": "integer",
5757+ "description": "The time limit in seconds for the teleport. If not set, the teleport is permanent. Must be at least 60 seconds, and no more than 32,400 seconds (9 hours).",
5858+ "minimum": 60,
5959+ "maximum": 32400
6060+ }
6161+ }
6262+ }
6363+ }
6464+ }
6565+}
6666+```
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+// Lexicon schema: place.stream.live.denyTeleport
44+55+package streamplace
66+77+import (
88+ "context"
99+1010+ lexutil "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+// LiveDenyTeleport_Input is the input argument to a place.stream.live.denyTeleport call.
1414+type LiveDenyTeleport_Input struct {
1515+ // uri: The URI of the teleport record to deny.
1616+ Uri string `json:"uri" cborgen:"uri"`
1717+}
1818+1919+// LiveDenyTeleport_Output is the output of a place.stream.live.denyTeleport call.
2020+type LiveDenyTeleport_Output struct {
2121+ // success: Whether the teleport was successfully denied.
2222+ Success bool `json:"success" cborgen:"success"`
2323+}
2424+2525+// LiveDenyTeleport calls the XRPC method "place.stream.live.denyTeleport".
2626+func LiveDenyTeleport(ctx context.Context, c lexutil.LexClient, input *LiveDenyTeleport_Input) (*LiveDenyTeleport_Output, error) {
2727+ var out LiveDenyTeleport_Output
2828+ if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "place.stream.live.denyTeleport", nil, input, &out); err != nil {
2929+ return nil, err
3030+ }
3131+3232+ return &out, nil
3333+}
+7-7
pkg/streamplace/liveteleport.go
···11// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2233-package streamplace
33+// Lexicon schema: place.stream.live.teleport
4455-// schema: place.stream.live.teleport
55+package streamplace
6677import (
88- "github.com/bluesky-social/indigo/lex/util"
88+ lexutil "github.com/bluesky-social/indigo/lex/util"
99)
10101111func init() {
1212- util.RegisterType("place.stream.live.teleport", &LiveTeleport{})
1313-} //
1414-// RECORDTYPE: LiveTeleport
1212+ lexutil.RegisterType("place.stream.live.teleport", &LiveTeleport{})
1313+}
1414+1515type LiveTeleport struct {
1616- LexiconTypeID string `json:"$type,const=place.stream.live.teleport" cborgen:"$type,const=place.stream.live.teleport"`
1616+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.stream.live.teleport"`
1717 // durationSeconds: The time limit in seconds for the teleport. If not set, the teleport is permanent. Must be at least 60 seconds, and no more than 32,400 seconds (9 hours).
1818 DurationSeconds *int64 `json:"durationSeconds,omitempty" cborgen:"durationSeconds,omitempty"`
1919 // startsAt: The time the teleport becomes active.
+44-6
pkg/streamplace/streamlivestream.go
···5959}
60606161type Livestream_StreamplaceAnything_Livestream struct {
6262- Livestream_LivestreamView *Livestream_LivestreamView
6363- Livestream_ViewerCount *Livestream_ViewerCount
6464- Defs_BlockView *Defs_BlockView
6565- Defs_Renditions *Defs_Renditions
6666- Defs_Rendition *Defs_Rendition
6767- ChatDefs_MessageView *ChatDefs_MessageView
6262+ Livestream_LivestreamView *Livestream_LivestreamView
6363+ Livestream_ViewerCount *Livestream_ViewerCount
6464+ Livestream_TeleportArrival *Livestream_TeleportArrival
6565+ Livestream_TeleportCanceled *Livestream_TeleportCanceled
6666+ Defs_BlockView *Defs_BlockView
6767+ Defs_Renditions *Defs_Renditions
6868+ Defs_Rendition *Defs_Rendition
6969+ ChatDefs_MessageView *ChatDefs_MessageView
6870}
69717072func (t *Livestream_StreamplaceAnything_Livestream) MarshalJSON() ([]byte, error) {
···7577 if t.Livestream_ViewerCount != nil {
7678 t.Livestream_ViewerCount.LexiconTypeID = "place.stream.livestream#viewerCount"
7779 return json.Marshal(t.Livestream_ViewerCount)
8080+ }
8181+ if t.Livestream_TeleportArrival != nil {
8282+ t.Livestream_TeleportArrival.LexiconTypeID = "place.stream.livestream#teleportArrival"
8383+ return json.Marshal(t.Livestream_TeleportArrival)
8484+ }
8585+ if t.Livestream_TeleportCanceled != nil {
8686+ t.Livestream_TeleportCanceled.LexiconTypeID = "place.stream.livestream#teleportCanceled"
8787+ return json.Marshal(t.Livestream_TeleportCanceled)
7888 }
7989 if t.Defs_BlockView != nil {
8090 t.Defs_BlockView.LexiconTypeID = "place.stream.defs#blockView"
···108118 case "place.stream.livestream#viewerCount":
109119 t.Livestream_ViewerCount = new(Livestream_ViewerCount)
110120 return json.Unmarshal(b, t.Livestream_ViewerCount)
121121+ case "place.stream.livestream#teleportArrival":
122122+ t.Livestream_TeleportArrival = new(Livestream_TeleportArrival)
123123+ return json.Unmarshal(b, t.Livestream_TeleportArrival)
124124+ case "place.stream.livestream#teleportCanceled":
125125+ t.Livestream_TeleportCanceled = new(Livestream_TeleportCanceled)
126126+ return json.Unmarshal(b, t.Livestream_TeleportCanceled)
111127 case "place.stream.defs#blockView":
112128 t.Defs_BlockView = new(Defs_BlockView)
113129 return json.Unmarshal(b, t.Defs_BlockView)
···123139 default:
124140 return nil
125141 }
142142+}
143143+144144+// Livestream_TeleportArrival is a "teleportArrival" in the place.stream.livestream schema.
145145+type Livestream_TeleportArrival struct {
146146+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.stream.livestream#teleportArrival"`
147147+ // source: The streamer who is teleporting their viewers here
148148+ Source *appbsky.ActorDefs_ProfileViewBasic `json:"source" cborgen:"source"`
149149+ // startsAt: When this teleport started
150150+ StartsAt string `json:"startsAt" cborgen:"startsAt"`
151151+ // teleportUri: The URI of the teleport record
152152+ TeleportUri string `json:"teleportUri" cborgen:"teleportUri"`
153153+ // viewerCount: How many viewers are arriving from this teleport
154154+ ViewerCount int64 `json:"viewerCount" cborgen:"viewerCount"`
155155+}
156156+157157+// Livestream_TeleportCanceled is a "teleportCanceled" in the place.stream.livestream schema.
158158+type Livestream_TeleportCanceled struct {
159159+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.stream.livestream#teleportCanceled"`
160160+ // reason: Why this teleport was canceled
161161+ Reason string `json:"reason" cborgen:"reason"`
162162+ // teleportUri: The URI of the teleport record that was canceled
163163+ TeleportUri string `json:"teleportUri" cborgen:"teleportUri"`
126164}
127165128166// Livestream_ViewerCount is a "viewerCount" in the place.stream.livestream schema.