-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodeSamples.yaml
More file actions
479 lines (479 loc) · 55.2 KB
/
codeSamples.yaml
File metadata and controls
479 lines (479 loc) · 55.2 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
overlay: 1.0.0
info:
title: CodeSamples overlay for unity target
version: 0.0.0
actions:
- target: $["paths"]["/apps/v2/apps"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetApps"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetAppsRequest req = new GetAppsRequest() {};\n\n\nusing(var res = await sdk.AppsV2.GetAppsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/apps/v2/apps"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateApp"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateAppRequest req = new CreateAppRequest() {\n CreateAppConfig = new CreateAppConfig() {\n AuthConfiguration = new AuthConfiguration() {},\n AppName = \"minecraft\",\n },\n};\n\n\nusing(var res = await sdk.AppsV2.CreateAppAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/apps/v2/apps/{appId}"]["delete"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "DeleteApp"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nDeleteAppRequest req = new DeleteAppRequest() {};\n\n\nusing(var res = await sdk.AppsV2.DeleteAppAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/apps/v2/apps/{appId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetApp"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetAppRequest req = new GetAppRequest() {};\n\n\nusing(var res = await sdk.AppsV2.GetAppAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/apps/v2/apps/{appId}"]["patch"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "PatchApp"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nPatchAppRequest req = new PatchAppRequest() {\n PartialAppConfigWithServiceConfig = new PartialAppConfigWithServiceConfig() {\n ServiceConfig = new ServiceConfigWrite() {\n StaticProcessAllocation = new List<StaticProcessAllocationConfigWrite>() {\n new StaticProcessAllocationConfigWrite() {\n MaxProcesses = 3,\n TargetProcesses = 2,\n MinProcesses = 1,\n Region = Region.Tokyo,\n },\n },\n },\n },\n};\n\n\nusing(var res = await sdk.AppsV2.PatchAppAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/apps/v2/apps/{appId}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateApp"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateAppRequest req = new UpdateAppRequest() {\n AppConfigWithServiceConfig = new AppConfigWithServiceConfig() {\n ServiceConfig = new ServiceConfigWrite() {\n StaticProcessAllocation = new List<StaticProcessAllocationConfigWrite>() {\n new StaticProcessAllocationConfigWrite() {\n MaxProcesses = 3,\n TargetProcesses = 2,\n MinProcesses = 1,\n Region = Region.SaoPaulo,\n },\n },\n },\n AuthConfiguration = new AuthConfiguration() {},\n AppName = \"minecraft\",\n },\n};\n\n\nusing(var res = await sdk.AppsV2.UpdateAppAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/auth/v1/{appId}/login/anonymous"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "LoginAnonymous"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nLoginAnonymousRequest req = new LoginAnonymousRequest() {};\n\n\nusing(var res = await sdk.AuthV1.LoginAnonymousAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/auth/v1/{appId}/login/google"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "LoginGoogle"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nLoginGoogleRequest req = new LoginGoogleRequest() {\n GoogleIdTokenObject = new GoogleIdTokenObject() {\n IdToken = \"eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR\",\n },\n};\n\n\nusing(var res = await sdk.AuthV1.LoginGoogleAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/auth/v1/{appId}/login/nickname"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "LoginNickname"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nLoginNicknameRequest req = new LoginNicknameRequest() {\n NicknameObject = new NicknameObject() {\n Nickname = \"squiddytwoshoes\",\n },\n};\n\n\nusing(var res = await sdk.AuthV1.LoginNicknameAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/billing/v1/customerportalurl"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "InitStripeCustomerPortalUrl"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nInitStripeCustomerPortalUrlRequest req = new InitStripeCustomerPortalUrlRequest() {\n CustomerPortalUrl = new CustomerPortalUrl() {\n ReturnUrl = \"https://sunny-majority.com/\",\n },\n};\n\n\nusing(var res = await sdk.BillingV1.InitStripeCustomerPortalUrlAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/billing/v1/invoices"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetInvoices"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetInvoicesRequest req = new GetInvoicesRequest() {};\n\n\nusing(var res = await sdk.BillingV1.GetInvoicesAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/billing/v1/paymentmethod"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetPaymentMethod"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetPaymentMethodRequest req = new GetPaymentMethodRequest() {};\n\n\nusing(var res = await sdk.BillingV1.GetPaymentMethodAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/billing/v1/upcoming/items"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetUpcomingInvoiceItems"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetUpcomingInvoiceItemsRequest req = new GetUpcomingInvoiceItemsRequest() {};\n\n\nusing(var res = await sdk.BillingV1.GetUpcomingInvoiceItemsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/billing/v1/upcoming/total"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetUpcomingInvoiceTotal"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetUpcomingInvoiceTotalRequest req = new GetUpcomingInvoiceTotalRequest() {};\n\n\nusing(var res = await sdk.BillingV1.GetUpcomingInvoiceTotalAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetBuilds"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetBuildsRequest req = new GetBuildsRequest() {};\n\n\nusing(var res = await sdk.BuildsV3.GetBuildsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateBuild"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateBuildRequest req = new CreateBuildRequest() {\n CreateMultipartBuildParams = new CreateMultipartBuildParams() {\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n BuildTag = \"0.1.14-14c793\",\n BuildSizeInBytes = 2645.24D,\n },\n};\n\n\nusing(var res = await sdk.BuildsV3.CreateBuildAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds/registry"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateBuildRegistry"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateBuildRegistryRequest req = new CreateBuildRegistryRequest() {\n CreateBuildV3Params = new CreateBuildV3Params() {\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n BuildTag = \"0.1.14-14c793\",\n },\n};\n\n\nusing(var res = await sdk.BuildsV3.CreateBuildRegistryAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds/{buildId}"]["delete"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "DeleteBuild"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nDeleteBuildRequest req = new DeleteBuildRequest() {\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n};\n\n\nusing(var res = await sdk.BuildsV3.DeleteBuildAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds/{buildId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetBuild"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetBuildRequest req = new GetBuildRequest() {\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n};\n\n\nusing(var res = await sdk.BuildsV3.GetBuildAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds/{buildId}/run"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "RunBuild"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nRunBuildRequest req = new RunBuildRequest() {\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n};\n\n\nusing(var res = await sdk.BuildsV3.RunBuildAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/builds/v3/builds/{buildId}/runRegistry"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "RunBuildRegistry"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nRunBuildRegistryRequest req = new RunBuildRegistryRequest() {\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n RegistryConfig = new RegistryConfig() {\n Image = \"https://picsum.photos/seed/3gDPgtj/723/1525\",\n },\n};\n\n\nusing(var res = await sdk.BuildsV3.RunBuildRegistryAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/deployments/v3/apps/{appId}/deployments"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetDeployments"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetDeploymentsRequest req = new GetDeploymentsRequest() {\n DeploymentTag = \"alpha\",\n BuildTag = \"0.1.14-14c793\",\n};\n\n\nusing(var res = await sdk.DeploymentsV3.GetDeploymentsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/deployments/v3/apps/{appId}/deployments"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateDeployment"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateDeploymentRequest req = new CreateDeploymentRequest() {\n DeploymentConfigV3 = new DeploymentConfigV3() {\n DeploymentTag = \"alpha\",\n IdleTimeoutEnabled = true,\n Env = new List<DeploymentConfigV3Env>() {\n new DeploymentConfigV3Env() {\n Value = \"TRUE\",\n Name = \"EULA\",\n },\n },\n RoomsPerProcess = 3,\n AdditionalContainerPorts = new List<ContainerPort>() {\n new ContainerPort() {\n TransportType = TransportType.Udp,\n Port = 8000,\n Name = \"default\",\n },\n },\n TransportType = TransportType.Udp,\n ContainerPort = 4000,\n RequestedGPU = 1D,\n ExperimentalRequestedGPU = 1D,\n RequestedMemoryMB = 1024D,\n RequestedCPU = 0.5D,\n BuildId = \"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n },\n};\n\n\nusing(var res = await sdk.DeploymentsV3.CreateDeploymentAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/deployments/v3/apps/{appId}/deployments/latest"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetLatestDeployment"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetLatestDeploymentRequest req = new GetLatestDeploymentRequest() {};\n\n\nusing(var res = await sdk.DeploymentsV3.GetLatestDeploymentAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/deployments/v3/apps/{appId}/deployments/{deploymentId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetDeployment"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetDeploymentRequest req = new GetDeploymentRequest() {\n DeploymentId = \"dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n};\n\n\nusing(var res = await sdk.DeploymentsV3.GetDeploymentAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/discovery/v2/ping"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetPingServiceEndpoints"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\n\nvar sdk = new HathoraCloudSDK();\n\n\nusing(var res = await sdk.DiscoveryV2.GetPingServiceEndpointsAsync())\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetsDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetsDeprecatedRequest req = new GetFleetsDeprecatedRequest() {};\n\n\nusing(var res = await sdk.FleetsV1.GetFleetsDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateFleetDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateFleetDeprecatedRequest req = new CreateFleetDeprecatedRequest() {\n CreateFleet = new CreateFleet() {\n NodeShape = NodeShape.Cpu1632,\n AutoscalerConfig = new AutoscalerConfig() {\n ScaleUpThreshold = 557407,\n },\n Name = \"production\",\n },\n};\n\n\nusing(var res = await sdk.FleetsV1.CreateFleetDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets/{fleetId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetDeprecatedRequest req = new GetFleetDeprecatedRequest() {\n FleetId = \"<id>\",\n};\n\n\nusing(var res = await sdk.FleetsV1.GetFleetDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets/{fleetId}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateFleetDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateFleetDeprecatedRequest req = new UpdateFleetDeprecatedRequest() {\n FleetId = \"<id>\",\n UpdateFleet = new UpdateFleet() {\n AutoscalerConfig = new AutoscalerConfig() {\n ScaleUpThreshold = 638855,\n },\n Name = \"production\",\n },\n};\n\n\nusing(var res = await sdk.FleetsV1.UpdateFleetDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets/{fleetId}/metrics"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetMetricsDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetMetricsDeprecatedRequest req = new GetFleetMetricsDeprecatedRequest() {\n FleetId = \"<id>\",\n};\n\n\nusing(var res = await sdk.FleetsV1.GetFleetMetricsDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets/{fleetId}/regions/{region}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetRegionDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetRegionDeprecatedRequest req = new GetFleetRegionDeprecatedRequest() {\n FleetId = \"<id>\",\n Region = Region.SaoPaulo,\n};\n\n\nusing(var res = await sdk.FleetsV1.GetFleetRegionDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets/{fleetId}/regions/{region}"]["put"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateFleetRegionDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateFleetRegionDeprecatedRequest req = new UpdateFleetRegionDeprecatedRequest() {\n FleetId = \"<id>\",\n Region = Region.Johannesburg,\n FleetRegionConfig = new FleetRegionConfig() {\n CloudMinVcpus = 122781,\n },\n};\n\n\nusing(var res = await sdk.FleetsV1.UpdateFleetRegionDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v1/fleets/{fleetId}/regions/{region}/metrics"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetRegionMetricsDeprecated"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetRegionMetricsDeprecatedRequest req = new GetFleetRegionMetricsDeprecatedRequest() {\n FleetId = \"<id>\",\n Region = Region.Dubai,\n};\n\n\nusing(var res = await sdk.FleetsV1.GetFleetRegionMetricsDeprecatedAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleets"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetsRequest req = new GetFleetsRequest() {};\n\n\nusing(var res = await sdk.FleetsV2.GetFleetsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateFleet"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateFleetRequest req = new CreateFleetRequest() {\n CreateFleetV2 = new CreateFleetV2() {\n NodeShapeId = NodeShapeId.ShapeL48,\n AutoscalerConfig = new AutoscalerConfig() {\n ScaleUpThreshold = 400145,\n },\n Name = \"production\",\n },\n};\n\n\nusing(var res = await sdk.FleetsV2.CreateFleetAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets/{fleetId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleet"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetRequest req = new GetFleetRequest() {\n FleetId = \"<id>\",\n};\n\n\nusing(var res = await sdk.FleetsV2.GetFleetAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets/{fleetId}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateFleet"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateFleetRequest req = new UpdateFleetRequest() {\n FleetId = \"<id>\",\n UpdateFleetV2 = new UpdateFleetV2() {\n AutoscalerConfig = new AutoscalerConfig() {\n ScaleUpThreshold = 979840,\n },\n Name = \"production\",\n },\n};\n\n\nusing(var res = await sdk.FleetsV2.UpdateFleetAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets/{fleetId}/metrics"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetMetrics"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetMetricsRequest req = new GetFleetMetricsRequest() {\n FleetId = \"<id>\",\n};\n\n\nusing(var res = await sdk.FleetsV2.GetFleetMetricsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets/{fleetId}/regions/{region}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetRegion"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetRegionRequest req = new GetFleetRegionRequest() {\n FleetId = \"<id>\",\n Region = Region.Singapore,\n};\n\n\nusing(var res = await sdk.FleetsV2.GetFleetRegionAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets/{fleetId}/regions/{region}"]["put"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateFleetRegion"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateFleetRegionRequest req = new UpdateFleetRegionRequest() {\n FleetId = \"<id>\",\n Region = Region.Chicago,\n FleetRegionConfig = new FleetRegionConfig() {\n CloudMinVcpus = 503995,\n },\n};\n\n\nusing(var res = await sdk.FleetsV2.UpdateFleetRegionAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/fleets/{fleetId}/regions/{region}/metrics"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetFleetRegionMetrics"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetFleetRegionMetricsRequest req = new GetFleetRegionMetricsRequest() {\n FleetId = \"<id>\",\n Region = Region.Chicago,\n};\n\n\nusing(var res = await sdk.FleetsV2.GetFleetRegionMetricsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/fleets/v2/nodeShapes"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetNodeShapes"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetNodeShapesRequest req = new GetNodeShapesRequest() {};\n\n\nusing(var res = await sdk.FleetsV2.GetNodeShapesAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/lobby/v3/{appId}/create"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateLobby"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Operations;\nusing HathoraCloud.Models.Shared;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nCreateLobbyRequest req = new CreateLobbyRequest() {\n ShortCode = \"LFG4\",\n RoomId = \"2swovpy1fnunu\",\n CreateLobbyV3Params = new CreateLobbyV3Params() {\n Visibility = LobbyVisibility.Private,\n RoomConfig = \"{\\\"name\\\":\\\"my-room\\\"}\",\n Region = Region.Dubai,\n },\n};\n\n\nusing(var res = await sdk.LobbiesV3.CreateLobbyAsync(\n security: new CreateLobbySecurity() {\n PlayerAuth = \"<YOUR_BEARER_TOKEN_HERE>\",\n },\n req))\n{\n // handle response\n}"
- target: $["paths"]["/lobby/v3/{appId}/info/roomid/{roomId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetLobbyInfoByRoomId"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nGetLobbyInfoByRoomIdRequest req = new GetLobbyInfoByRoomIdRequest() {\n RoomId = \"2swovpy1fnunu\",\n};\n\n\nusing(var res = await sdk.LobbiesV3.GetLobbyInfoByRoomIdAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/lobby/v3/{appId}/info/shortcode/{shortCode}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetLobbyInfoByShortCode"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nGetLobbyInfoByShortCodeRequest req = new GetLobbyInfoByShortCodeRequest() {\n ShortCode = \"LFG4\",\n};\n\n\nusing(var res = await sdk.LobbiesV3.GetLobbyInfoByShortCodeAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/lobby/v3/{appId}/list/public"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "ListActivePublicLobbies"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nListActivePublicLobbiesRequest req = new ListActivePublicLobbiesRequest() {};\n\n\nusing(var res = await sdk.LobbiesV3.ListActivePublicLobbiesAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/logs/v1/{appId}/process/{processId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetLogsForProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetLogsForProcessRequest req = new GetLogsForProcessRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n TailLines = 100,\n};\n\n\nusing(var res = await sdk.LogsV1.GetLogsForProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/logs/v1/{appId}/process/{processId}/download"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "DownloadLogForProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nDownloadLogForProcessRequest req = new DownloadLogForProcessRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n};\n\n\nusing(var res = await sdk.LogsV1.DownloadLogForProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/management/v1/sendverificationemail"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "SendVerificationEmail"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\n\nvar sdk = new HathoraCloudSDK();\n\nVerificationEmailRequest req = new VerificationEmailRequest() {\n UserId = \"<id>\",\n};\n\n\nusing(var res = await sdk.ManagementV1.SendVerificationEmailAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/nodes/v1/fleet/{fleetId}/listProvisioned"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "ListProvisionedNodes"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nListProvisionedNodesRequest req = new ListProvisionedNodesRequest() {\n FleetId = \"<id>\",\n};\n\n\nusing(var res = await sdk.NodesV1.ListProvisionedNodesAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/nodes/v1/{nodeId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetNode"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetNodeRequest req = new GetNodeRequest() {\n NodeId = \"<id>\",\n};\n\n\nusing(var res = await sdk.NodesV1.GetNodeAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetOrgs"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\n\nusing(var res = await sdk.OrganizationsV1.GetOrgsAsync())\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/metadata/usageLimits"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetUsageLimits"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n orgId: \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetUsageLimitsRequest req = new GetUsageLimitsRequest() {};\n\n\nusing(var res = await sdk.OrganizationsV1.GetUsageLimitsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/user/invites/pending"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetUserPendingInvites"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\n\nusing(var res = await sdk.OrganizationsV1.GetUserPendingInvitesAsync())\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/invites"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateUserInvite"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateUserInviteRequest req = new UpdateUserInviteRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n UpdateUserInvite = new UpdateUserInvite() {\n Scopes = UpdateUserInviteScopes.CreateUserRole(\n UserRole.Viewer,\n ),\n UserEmail = \"noreply@hathora.dev\",\n },\n};\n\n\nusing(var res = await sdk.OrganizationsV1.UpdateUserInviteAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/invites"]["put"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "InviteUser"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nInviteUserRequest req = new InviteUserRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n CreateUserInvite = new CreateUserInvite() {\n UserEmail = \"noreply@hathora.dev\",\n },\n};\n\n\nusing(var res = await sdk.OrganizationsV1.InviteUserAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/invites/accept"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "AcceptInvite"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nAcceptInviteRequest req = new AcceptInviteRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n};\n\n\nusing(var res = await sdk.OrganizationsV1.AcceptInviteAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/invites/pending"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetOrgPendingInvites"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetOrgPendingInvitesRequest req = new GetOrgPendingInvitesRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n};\n\n\nusing(var res = await sdk.OrganizationsV1.GetOrgPendingInvitesAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/invites/reject"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "RejectInvite"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nRejectInviteRequest req = new RejectInviteRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n};\n\n\nusing(var res = await sdk.OrganizationsV1.RejectInviteAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/invites/rescind"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "RescindInvite"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nRescindInviteRequest req = new RescindInviteRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n RescindUserInvite = new RescindUserInvite() {\n UserEmail = \"noreply@hathora.dev\",\n },\n};\n\n\nusing(var res = await sdk.OrganizationsV1.RescindInviteAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/orgs/v1/{orgId}/members"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetOrgMembers"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetOrgMembersRequest req = new GetOrgMembersRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n};\n\n\nusing(var res = await sdk.OrganizationsV1.GetOrgMembersAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/processes/v3/apps/{appId}/processes/count"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetProcessesCountExperimental"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetProcessesCountExperimentalRequest req = new GetProcessesCountExperimentalRequest() {};\n\n\nusing(var res = await sdk.ProcessesV3.GetProcessesCountExperimentalAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/processes/v3/apps/{appId}/processes/latest"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetLatestProcesses"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetLatestProcessesRequest req = new GetLatestProcessesRequest() {};\n\n\nusing(var res = await sdk.ProcessesV3.GetLatestProcessesAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/processes/v3/apps/{appId}/processes/process/{processId}/metrics"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetProcessMetrics"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetProcessMetricsRequest req = new GetProcessMetricsRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n};\n\n\nusing(var res = await sdk.ProcessesV3.GetProcessMetricsAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/processes/v3/apps/{appId}/processes/regions/{region}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateProcessRequest req = new CreateProcessRequest() {\n Region = Region.Mumbai,\n};\n\n\nusing(var res = await sdk.ProcessesV3.CreateProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/processes/v3/apps/{appId}/processes/{processId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetProcessRequest req = new GetProcessRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n};\n\n\nusing(var res = await sdk.ProcessesV3.GetProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/processes/v3/apps/{appId}/processes/{processId}/stop"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "StopProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nStopProcessRequest req = new StopProcessRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n};\n\n\nusing(var res = await sdk.ProcessesV3.StopProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/connectioninfo/{roomId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetConnectionInfo"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\nGetConnectionInfoRequest req = new GetConnectionInfoRequest() {\n RoomId = \"2swovpy1fnunu\",\n};\n\n\nusing(var res = await sdk.RoomsV2.GetConnectionInfoAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/create"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateRoom"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\nusing System.Collections.Generic;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateRoomRequest req = new CreateRoomRequest() {\n RoomId = \"2swovpy1fnunu\",\n CreateRoomParams = new CreateRoomParams() {\n DeploymentId = \"dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\",\n ClientIPs = new List<string>() {\n \"123.123.123.123\",\n },\n RoomConfig = \"{\\\"name\\\":\\\"my-room\\\"}\",\n Region = Region.Dallas,\n },\n};\n\n\nusing(var res = await sdk.RoomsV2.CreateRoomAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/destroy/{roomId}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "DestroyRoom"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nDestroyRoomRequest req = new DestroyRoomRequest() {\n RoomId = \"2swovpy1fnunu\",\n};\n\n\nusing(var res = await sdk.RoomsV2.DestroyRoomAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/info/{roomId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetRoomInfo"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetRoomInfoRequest req = new GetRoomInfoRequest() {\n RoomId = \"2swovpy1fnunu\",\n};\n\n\nusing(var res = await sdk.RoomsV2.GetRoomInfoAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/list/{processId}/active"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetActiveRoomsForProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetActiveRoomsForProcessRequest req = new GetActiveRoomsForProcessRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n};\n\n\nusing(var res = await sdk.RoomsV2.GetActiveRoomsForProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/list/{processId}/inactive"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetInactiveRoomsForProcess"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetInactiveRoomsForProcessRequest req = new GetInactiveRoomsForProcessRequest() {\n ProcessId = \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n};\n\n\nusing(var res = await sdk.RoomsV2.GetInactiveRoomsForProcessAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/resume/{roomId}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "ResumeRoom"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nResumeRoomRequest req = new ResumeRoomRequest() {\n RoomId = \"2swovpy1fnunu\",\n};\n\n\nusing(var res = await sdk.RoomsV2.ResumeRoomAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/rooms/v2/{appId}/update/{roomId}"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "UpdateRoomConfig"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nUpdateRoomConfigRequest req = new UpdateRoomConfigRequest() {\n RoomId = \"2swovpy1fnunu\",\n UpdateRoomConfigParams = new UpdateRoomConfigParams() {\n RoomConfig = \"{\\\"name\\\":\\\"my-room\\\"}\",\n },\n};\n\n\nusing(var res = await sdk.RoomsV2.UpdateRoomConfigAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/tokens/v1/orgs/{orgId}"]["get"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "GetOrgTokens"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nGetOrgTokensRequest req = new GetOrgTokensRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n};\n\n\nusing(var res = await sdk.TokensV1.GetOrgTokensAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/tokens/v1/orgs/{orgId}/create"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "CreateOrgToken"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nCreateOrgTokenRequest req = new CreateOrgTokenRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n CreateOrgToken = new CreateOrgToken() {\n Name = \"ci-token\",\n },\n};\n\n\nusing(var res = await sdk.TokensV1.CreateOrgTokenAsync(req))\n{\n // handle response\n}"
- target: $["paths"]["/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke"]["post"]
update:
"x-codeSamples":
- "lang": "unity"
"label": "RevokeOrgToken"
"source": "using HathoraCloud;\nusing HathoraCloud.Models.Shared;\nusing HathoraCloud.Models.Operations;\n\nvar sdk = new HathoraCloudSDK(security: new Security() {\n HathoraDevToken = \"<YOUR_BEARER_TOKEN_HERE>\",\n });\n\nRevokeOrgTokenRequest req = new RevokeOrgTokenRequest() {\n OrgId = \"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\",\n OrgTokenId = \"org-token-af469a92-5b45-4565-b3c4-b79878de67d2\",\n};\n\n\nusing(var res = await sdk.TokensV1.RevokeOrgTokenAsync(req))\n{\n // handle response\n}"