@@ -59,43 +59,32 @@ or with the more ergonomic static factory methods.
59
59
An API key is scoped to a single workspace and should only be used on the server.
60
60
Obtain one from the Seam Console.
61
61
62
- ##### Set the ` SEAM_API_KEY ` environment variable
63
-
62
+ #####
64
63
``` ts
64
+ // Set the `SEAM_API_KEY` environment variable
65
65
const seam = new SeamHttp ()
66
- ```
67
-
68
- ##### Pass as the first argument to the constructor
69
66
70
- ``` ts
67
+ // Pass as the first argument to the constructor
71
68
const seam = new SeamHttp (' your-api-key' )
72
- ```
73
-
74
- ##### Pass as an option the constructor
75
69
76
- ``` ts
70
+ // Pass as an option the constructor
77
71
const seam = new SeamHttp ({ apiKey: ' your-api-key' })
78
- ```
79
-
80
- ##### Use the factory method
81
72
82
- ``` ts
73
+ // Use the factory method
83
74
const seam = SeamHttp .fromApiKey (' your-api-key' )
84
75
```
85
76
86
77
#### Client Session Token
87
78
88
79
A Client Session Token is scoped to a client session and should only be used on the client.
89
80
90
- ##### Pass as an option the constructor
81
+ #####
91
82
92
83
``` ts
84
+ // Pass as an option the constructor
93
85
const seam = new SeamHttp ({ clientSessionToken: ' some-client-session-token' })
94
- ```
95
86
96
- ##### Use the factory method
97
-
98
- ``` ts
87
+ // Use the factory method
99
88
const seam = SeamHttp .fromClientSessionToken (' some-client-session-token' )
100
89
```
101
90
@@ -123,18 +112,15 @@ Obtain one from the Seam Console.
123
112
A workspace id must be provided when using this method
124
113
and all requests will be scoped to that workspace.
125
114
126
- ##### Pass as an option the constructor
127
-
128
115
``` ts
116
+ // Pass as an option the constructor
117
+
129
118
const seam = new SeamHttp ({
130
119
personalAccessToken: ' your-personal-access-token' ,
131
120
workspaceId: ' your-workspace-id' ,
132
121
})
133
- ```
134
-
135
- ##### Use the factory method
136
122
137
- ``` ts
123
+ // Use the factory method
138
124
const seam = SeamHttp .fromPersonalAccessToken (
139
125
' some-console-session-token' ,
140
126
' your-workspace-id' ,
@@ -148,18 +134,14 @@ This authentication method is only used by internal Seam applications.
148
134
A workspace id must be provided when using this method
149
135
and all requests will be scoped to that workspace.
150
136
151
- ##### Pass as an option the constructor
152
-
153
137
``` ts
138
+ // Pass as an option the constructor
154
139
const seam = new SeamHttp ({
155
140
consoleSessionToken: ' some-console-session-token' ,
156
141
workspaceId: ' your-workspace-id' ,
157
142
})
158
- ```
159
143
160
- ##### Use the factory method
161
-
162
- ``` ts
144
+ // Use the factory method
163
145
const seam = SeamHttp .fromConsoleSessionToken (
164
146
' some-console-session-token' ,
165
147
' your-workspace-id' ,
0 commit comments