@cjavdev/believe-mcp 0.20.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,10 @@ const EMBEDDED_METHODS = [
19
19
  method: '$client get_welcome',
20
20
  example: "believe get-welcome \\\n --api-key 'My API Key'",
21
21
  },
22
+ csharp: {
23
+ method: 'GetWelcome',
24
+ example: 'ClientGetWelcomeParams parameters = new();\n\nvar response = await client.GetWelcome(parameters);\n\nConsole.WriteLine(response);',
25
+ },
22
26
  go: {
23
27
  method: 'client.GetWelcome',
24
28
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.GetWelcome(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -34,6 +38,10 @@ const EMBEDDED_METHODS = [
34
38
  method: 'getWelcome',
35
39
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.ClientGetWelcomeParams\nimport com.believe.api.models.ClientGetWelcomeResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: ClientGetWelcomeResponse = client.getWelcome()\n}',
36
40
  },
41
+ php: {
42
+ method: 'getWelcome',
43
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->getWelcome();\n\nvar_dump($response);",
44
+ },
37
45
  python: {
38
46
  method: 'get_welcome',
39
47
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.get_welcome()\nprint(response)',
@@ -70,6 +78,10 @@ const EMBEDDED_METHODS = [
70
78
  method: 'characters list',
71
79
  example: "believe characters list \\\n --api-key 'My API Key'",
72
80
  },
81
+ csharp: {
82
+ method: 'Characters.List',
83
+ example: 'CharacterListParams parameters = new();\n\nvar page = await client.Characters.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
84
+ },
73
85
  go: {
74
86
  method: 'client.Characters.List',
75
87
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -85,6 +97,10 @@ const EMBEDDED_METHODS = [
85
97
  method: 'characters().list',
86
98
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterListPage\nimport com.believe.api.models.characters.CharacterListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: CharacterListPage = client.characters().list()\n}',
87
99
  },
100
+ php: {
101
+ method: 'characters->list',
102
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->characters->list(\n limit: 10,\n minOptimism: 0,\n role: CharacterRole::COACH,\n skip: 0,\n teamID: 'team_id',\n);\n\nvar_dump($page);",
103
+ },
88
104
  python: {
89
105
  method: 'characters.list',
90
106
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.characters.list()\npage = page.data[0]\nprint(page.id)',
@@ -129,6 +145,10 @@ const EMBEDDED_METHODS = [
129
145
  method: 'characters create',
130
146
  example: "believe characters create \\\n --api-key 'My API Key' \\\n --background 'Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.' \\\n --emotional-stats '{curiosity: 40, empathy: 85, optimism: 45, resilience: 95, vulnerability: 60}' \\\n --name 'Roy Kent' \\\n --personality-trait intense \\\n --personality-trait loyal \\\n --personality-trait 'secretly caring' \\\n --personality-trait profane \\\n --role coach",
131
147
  },
148
+ csharp: {
149
+ method: 'Characters.Create',
150
+ example: 'CharacterCreateParams parameters = new()\n{\n Background = "Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.",\n EmotionalStats = new()\n {\n Curiosity = 40,\n Empathy = 85,\n Optimism = 45,\n Resilience = 95,\n Vulnerability = 60,\n },\n Name = "Roy Kent",\n PersonalityTraits =\n [\n "intense", "loyal", "secretly caring", "profane"\n ],\n Role = CharacterRole.Coach,\n};\n\nvar character = await client.Characters.Create(parameters);\n\nConsole.WriteLine(character);',
151
+ },
132
152
  go: {
133
153
  method: 'client.Characters.New',
134
154
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcharacter, err := client.Characters.New(context.TODO(), believe.CharacterNewParams{\n\t\tBackground: "Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.",\n\t\tEmotionalStats: believe.EmotionalStatsParam{\n\t\t\tCuriosity: 40,\n\t\t\tEmpathy: 85,\n\t\t\tOptimism: 45,\n\t\t\tResilience: 95,\n\t\t\tVulnerability: 60,\n\t\t},\n\t\tName: "Roy Kent",\n\t\tPersonalityTraits: []string{"intense", "loyal", "secretly caring", "profane"},\n\t\tRole: believe.CharacterRoleCoach,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", character.ID)\n}\n',
@@ -144,6 +164,10 @@ const EMBEDDED_METHODS = [
144
164
  method: 'characters().create',
145
165
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.Character\nimport com.believe.api.models.characters.CharacterCreateParams\nimport com.believe.api.models.characters.CharacterRole\nimport com.believe.api.models.characters.EmotionalStats\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: CharacterCreateParams = CharacterCreateParams.builder()\n .background("Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.")\n .emotionalStats(EmotionalStats.builder()\n .curiosity(40L)\n .empathy(85L)\n .optimism(45L)\n .resilience(95L)\n .vulnerability(60L)\n .build())\n .name("Roy Kent")\n .personalityTraits(listOf(\n "intense",\n "loyal",\n "secretly caring",\n "profane",\n ))\n .role(CharacterRole.COACH)\n .build()\n val character: Character = client.characters().create(params)\n}',
146
166
  },
167
+ php: {
168
+ method: 'characters->create',
169
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$character = $client->characters->create(\n background: 'Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.',\n emotionalStats: [\n 'curiosity' => 40,\n 'empathy' => 85,\n 'optimism' => 45,\n 'resilience' => 95,\n 'vulnerability' => 60,\n ],\n name: 'Roy Kent',\n personalityTraits: ['intense', 'loyal', 'secretly caring', 'profane'],\n role: CharacterRole::COACH,\n dateOfBirth: '1977-03-15',\n email: 'roy.kent@afcrichmond.com',\n growthArcs: [\n [\n 'breakthrough' => 'Finding purpose beyond playing',\n 'challenge' => 'Accepting his body\\'s limitations',\n 'endingPoint' => 'Retired but lost',\n 'season' => 1,\n 'startingPoint' => 'Aging footballer facing retirement',\n ],\n ],\n heightMeters: 1.78,\n profileImageURL: 'https://afcrichmond.com/images/roy-kent.jpg',\n salaryGbp: '175000.00',\n signatureQuotes: [\n 'He\\'s here, he\\'s there, he\\'s every-f***ing-where, Roy Kent!', 'Whistle!'\n ],\n teamID: 'afc-richmond',\n);\n\nvar_dump($character);",
170
+ },
147
171
  python: {
148
172
  method: 'characters.create',
149
173
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\ncharacter = client.characters.create(\n background="Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.",\n emotional_stats={\n "curiosity": 40,\n "empathy": 85,\n "optimism": 45,\n "resilience": 95,\n "vulnerability": 60,\n },\n name="Roy Kent",\n personality_traits=["intense", "loyal", "secretly caring", "profane"],\n role="coach",\n)\nprint(character.id)',
@@ -174,6 +198,10 @@ const EMBEDDED_METHODS = [
174
198
  method: 'characters retrieve',
175
199
  example: "believe characters retrieve \\\n --api-key 'My API Key' \\\n --character-id character_id",
176
200
  },
201
+ csharp: {
202
+ method: 'Characters.Retrieve',
203
+ example: 'CharacterRetrieveParams parameters = new() { CharacterID = "character_id" };\n\nvar character = await client.Characters.Retrieve(parameters);\n\nConsole.WriteLine(character);',
204
+ },
177
205
  go: {
178
206
  method: 'client.Characters.Get',
179
207
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcharacter, err := client.Characters.Get(context.TODO(), "character_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", character.ID)\n}\n',
@@ -189,6 +217,10 @@ const EMBEDDED_METHODS = [
189
217
  method: 'characters().retrieve',
190
218
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.Character\nimport com.believe.api.models.characters.CharacterRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val character: Character = client.characters().retrieve("character_id")\n}',
191
219
  },
220
+ php: {
221
+ method: 'characters->retrieve',
222
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$character = $client->characters->retrieve('character_id');\n\nvar_dump($character);",
223
+ },
192
224
  python: {
193
225
  method: 'characters.retrieve',
194
226
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\ncharacter = client.characters.retrieve(\n "character_id",\n)\nprint(character.id)',
@@ -234,6 +266,10 @@ const EMBEDDED_METHODS = [
234
266
  method: 'characters update',
235
267
  example: "believe characters update \\\n --api-key 'My API Key' \\\n --character-id character_id",
236
268
  },
269
+ csharp: {
270
+ method: 'Characters.Update',
271
+ example: 'CharacterUpdateParams parameters = new() { CharacterID = "character_id" };\n\nvar character = await client.Characters.Update(parameters);\n\nConsole.WriteLine(character);',
272
+ },
237
273
  go: {
238
274
  method: 'client.Characters.Update',
239
275
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcharacter, err := client.Characters.Update(\n\t\tcontext.TODO(),\n\t\t"character_id",\n\t\tbelieve.CharacterUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", character.ID)\n}\n',
@@ -249,6 +285,10 @@ const EMBEDDED_METHODS = [
249
285
  method: 'characters().update',
250
286
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.Character\nimport com.believe.api.models.characters.CharacterUpdateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val character: Character = client.characters().update("character_id")\n}',
251
287
  },
288
+ php: {
289
+ method: 'characters->update',
290
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$character = $client->characters->update(\n 'character_id',\n background: 'background',\n dateOfBirth: '2019-12-27',\n email: 'dev@stainless.com',\n emotionalStats: [\n 'curiosity' => 99,\n 'empathy' => 100,\n 'optimism' => 95,\n 'resilience' => 90,\n 'vulnerability' => 80,\n ],\n growthArcs: [\n [\n 'breakthrough' => 'breakthrough',\n 'challenge' => 'challenge',\n 'endingPoint' => 'ending_point',\n 'season' => 1,\n 'startingPoint' => 'starting_point',\n ],\n ],\n heightMeters: 1,\n name: 'x',\n personalityTraits: ['string'],\n profileImageURL: 'https://example.com',\n role: CharacterRole::COACH,\n salaryGbp: 0,\n signatureQuotes: ['string'],\n teamID: 'team_id',\n);\n\nvar_dump($character);",
291
+ },
252
292
  python: {
253
293
  method: 'characters.update',
254
294
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\ncharacter = client.characters.update(\n character_id="character_id",\n)\nprint(character.id)',
@@ -278,6 +318,10 @@ const EMBEDDED_METHODS = [
278
318
  method: 'characters delete',
279
319
  example: "believe characters delete \\\n --api-key 'My API Key' \\\n --character-id character_id",
280
320
  },
321
+ csharp: {
322
+ method: 'Characters.Delete',
323
+ example: 'CharacterDeleteParams parameters = new() { CharacterID = "character_id" };\n\nawait client.Characters.Delete(parameters);',
324
+ },
281
325
  go: {
282
326
  method: 'client.Characters.Delete',
283
327
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Characters.Delete(context.TODO(), "character_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -293,6 +337,10 @@ const EMBEDDED_METHODS = [
293
337
  method: 'characters().delete',
294
338
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.characters().delete("character_id")\n}',
295
339
  },
340
+ php: {
341
+ method: 'characters->delete',
342
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->characters->delete('character_id');\n\nvar_dump($result);",
343
+ },
296
344
  python: {
297
345
  method: 'characters.delete',
298
346
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.characters.delete(\n "character_id",\n)',
@@ -323,6 +371,10 @@ const EMBEDDED_METHODS = [
323
371
  method: 'characters get_quotes',
324
372
  example: "believe characters get-quotes \\\n --api-key 'My API Key' \\\n --character-id character_id",
325
373
  },
374
+ csharp: {
375
+ method: 'Characters.GetQuotes',
376
+ example: 'CharacterGetQuotesParams parameters = new() { CharacterID = "character_id" };\n\nvar response = await client.Characters.GetQuotes(parameters);\n\nConsole.WriteLine(response);',
377
+ },
326
378
  go: {
327
379
  method: 'client.Characters.GetQuotes',
328
380
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Characters.GetQuotes(context.TODO(), "character_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -338,6 +390,10 @@ const EMBEDDED_METHODS = [
338
390
  method: 'characters().getQuotes',
339
391
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterGetQuotesParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: List<String> = client.characters().getQuotes("character_id")\n}',
340
392
  },
393
+ php: {
394
+ method: 'characters->getQuotes',
395
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->characters->getQuotes('character_id');\n\nvar_dump($response);",
396
+ },
341
397
  python: {
342
398
  method: 'characters.get_quotes',
343
399
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.characters.get_quotes(\n "character_id",\n)\nprint(response)',
@@ -368,6 +424,10 @@ const EMBEDDED_METHODS = [
368
424
  method: 'teams list',
369
425
  example: "believe teams list \\\n --api-key 'My API Key'",
370
426
  },
427
+ csharp: {
428
+ method: 'Teams.List',
429
+ example: 'TeamListParams parameters = new();\n\nvar page = await client.Teams.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
430
+ },
371
431
  go: {
372
432
  method: 'client.Teams.List',
373
433
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Teams.List(context.TODO(), believe.TeamListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -383,6 +443,10 @@ const EMBEDDED_METHODS = [
383
443
  method: 'teams().list',
384
444
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.TeamListPage\nimport com.believe.api.models.teams.TeamListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: TeamListPage = client.teams().list()\n}',
385
445
  },
446
+ php: {
447
+ method: 'teams->list',
448
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->teams->list(\n league: League::PREMIER_LEAGUE, limit: 10, minCultureScore: 0, skip: 0\n);\n\nvar_dump($page);",
449
+ },
386
450
  python: {
387
451
  method: 'teams.list',
388
452
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.teams.list()\npage = page.data[0]\nprint(page.id)',
@@ -431,6 +495,10 @@ const EMBEDDED_METHODS = [
431
495
  method: 'teams create',
432
496
  example: "believe teams create \\\n --api-key 'My API Key' \\\n --culture-score 70 \\\n --founded-year 1895 \\\n --league 'Premier League' \\\n --name 'West Ham United' \\\n --stadium 'London Stadium' \\\n --values '{primary_value: Pride, secondary_values: [History, Community, Passion], team_motto: Forever Blowing Bubbles}'",
433
497
  },
498
+ csharp: {
499
+ method: 'Teams.Create',
500
+ example: 'TeamCreateParams parameters = new()\n{\n CultureScore = 70,\n FoundedYear = 1895,\n League = League.PremierLeague,\n Name = "West Ham United",\n Stadium = "London Stadium",\n Values = new()\n {\n PrimaryValue = "Pride",\n SecondaryValues =\n [\n "History", "Community", "Passion"\n ],\n TeamMotto = "Forever Blowing Bubbles",\n },\n};\n\nvar team = await client.Teams.Create(parameters);\n\nConsole.WriteLine(team);',
501
+ },
434
502
  go: {
435
503
  method: 'client.Teams.New',
436
504
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteam, err := client.Teams.New(context.TODO(), believe.TeamNewParams{\n\t\tCultureScore: 70,\n\t\tFoundedYear: 1895,\n\t\tLeague: believe.LeaguePremierLeague,\n\t\tName: "West Ham United",\n\t\tStadium: "London Stadium",\n\t\tValues: believe.TeamValuesParam{\n\t\t\tPrimaryValue: "Pride",\n\t\t\tSecondaryValues: []string{"History", "Community", "Passion"},\n\t\t\tTeamMotto: "Forever Blowing Bubbles",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", team.ID)\n}\n',
@@ -446,6 +514,10 @@ const EMBEDDED_METHODS = [
446
514
  method: 'teams().create',
447
515
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.League\nimport com.believe.api.models.teams.Team\nimport com.believe.api.models.teams.TeamCreateParams\nimport com.believe.api.models.teams.TeamValues\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: TeamCreateParams = TeamCreateParams.builder()\n .cultureScore(70L)\n .foundedYear(1895L)\n .league(League.PREMIER_LEAGUE)\n .name("West Ham United")\n .stadium("London Stadium")\n .values(TeamValues.builder()\n .primaryValue("Pride")\n .secondaryValues(listOf(\n "History",\n "Community",\n "Passion",\n ))\n .teamMotto("Forever Blowing Bubbles")\n .build())\n .build()\n val team: Team = client.teams().create(params)\n}',
448
516
  },
517
+ php: {
518
+ method: 'teams->create',
519
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$team = $client->teams->create(\n cultureScore: 70,\n foundedYear: 1895,\n league: League::PREMIER_LEAGUE,\n name: 'West Ham United',\n stadium: 'London Stadium',\n values: [\n 'primaryValue' => 'Pride',\n 'secondaryValues' => ['History', 'Community', 'Passion'],\n 'teamMotto' => 'Forever Blowing Bubbles',\n ],\n annualBudgetGbp: '150000000.00',\n averageAttendance: 59988,\n contactEmail: 'info@westhamunited.co.uk',\n isActive: true,\n nickname: 'The Hammers',\n primaryColor: '#7A263A',\n rivalTeams: ['afc-richmond', 'tottenham'],\n secondaryColor: '#1BB1E7',\n stadiumLocation: ['latitude' => 51.5387, 'longitude' => -0.0166],\n website: 'https://www.whufc.com',\n winPercentage: 52.3,\n);\n\nvar_dump($team);",
520
+ },
449
521
  python: {
450
522
  method: 'teams.create',
451
523
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteam = client.teams.create(\n culture_score=70,\n founded_year=1895,\n league="Premier League",\n name="West Ham United",\n stadium="London Stadium",\n values={\n "primary_value": "Pride",\n "secondary_values": ["History", "Community", "Passion"],\n "team_motto": "Forever Blowing Bubbles",\n },\n)\nprint(team.id)',
@@ -476,6 +548,10 @@ const EMBEDDED_METHODS = [
476
548
  method: 'teams retrieve',
477
549
  example: "believe teams retrieve \\\n --api-key 'My API Key' \\\n --team-id team_id",
478
550
  },
551
+ csharp: {
552
+ method: 'Teams.Retrieve',
553
+ example: 'TeamRetrieveParams parameters = new() { TeamID = "team_id" };\n\nvar team = await client.Teams.Retrieve(parameters);\n\nConsole.WriteLine(team);',
554
+ },
479
555
  go: {
480
556
  method: 'client.Teams.Get',
481
557
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteam, err := client.Teams.Get(context.TODO(), "team_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", team.ID)\n}\n',
@@ -491,6 +567,10 @@ const EMBEDDED_METHODS = [
491
567
  method: 'teams().retrieve',
492
568
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.Team\nimport com.believe.api.models.teams.TeamRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val team: Team = client.teams().retrieve("team_id")\n}',
493
569
  },
570
+ php: {
571
+ method: 'teams->retrieve',
572
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$team = $client->teams->retrieve('team_id');\n\nvar_dump($team);",
573
+ },
494
574
  python: {
495
575
  method: 'teams.retrieve',
496
576
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteam = client.teams.retrieve(\n "team_id",\n)\nprint(team.id)',
@@ -540,6 +620,10 @@ const EMBEDDED_METHODS = [
540
620
  method: 'teams update',
541
621
  example: "believe teams update \\\n --api-key 'My API Key' \\\n --team-id team_id",
542
622
  },
623
+ csharp: {
624
+ method: 'Teams.Update',
625
+ example: 'TeamUpdateParams parameters = new() { TeamID = "team_id" };\n\nvar team = await client.Teams.Update(parameters);\n\nConsole.WriteLine(team);',
626
+ },
543
627
  go: {
544
628
  method: 'client.Teams.Update',
545
629
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteam, err := client.Teams.Update(\n\t\tcontext.TODO(),\n\t\t"team_id",\n\t\tbelieve.TeamUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", team.ID)\n}\n',
@@ -555,6 +639,10 @@ const EMBEDDED_METHODS = [
555
639
  method: 'teams().update',
556
640
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.Team\nimport com.believe.api.models.teams.TeamUpdateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val team: Team = client.teams().update("team_id")\n}',
557
641
  },
642
+ php: {
643
+ method: 'teams->update',
644
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$team = $client->teams->update(\n 'team_id',\n annualBudgetGbp: 0,\n averageAttendance: 0,\n contactEmail: 'dev@stainless.com',\n cultureScore: 0,\n foundedYear: 1800,\n isActive: true,\n league: League::PREMIER_LEAGUE,\n name: 'x',\n nickname: 'nickname',\n primaryColor: 'primary_color',\n rivalTeams: ['string'],\n secondaryColor: 'secondary_color',\n stadium: 'stadium',\n stadiumLocation: ['latitude' => 51.4816, 'longitude' => -0.191],\n values: [\n 'primaryValue' => 'Believe',\n 'secondaryValues' => ['Family', 'Resilience', 'Joy'],\n 'teamMotto' => 'Football is life!',\n ],\n website: 'https://example.com',\n winPercentage: 0,\n);\n\nvar_dump($team);",
645
+ },
558
646
  python: {
559
647
  method: 'teams.update',
560
648
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteam = client.teams.update(\n team_id="team_id",\n)\nprint(team.id)',
@@ -584,6 +672,10 @@ const EMBEDDED_METHODS = [
584
672
  method: 'teams delete',
585
673
  example: "believe teams delete \\\n --api-key 'My API Key' \\\n --team-id team_id",
586
674
  },
675
+ csharp: {
676
+ method: 'Teams.Delete',
677
+ example: 'TeamDeleteParams parameters = new() { TeamID = "team_id" };\n\nawait client.Teams.Delete(parameters);',
678
+ },
587
679
  go: {
588
680
  method: 'client.Teams.Delete',
589
681
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Teams.Delete(context.TODO(), "team_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -599,6 +691,10 @@ const EMBEDDED_METHODS = [
599
691
  method: 'teams().delete',
600
692
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.TeamDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.teams().delete("team_id")\n}',
601
693
  },
694
+ php: {
695
+ method: 'teams->delete',
696
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->teams->delete('team_id');\n\nvar_dump($result);",
697
+ },
602
698
  python: {
603
699
  method: 'teams.delete',
604
700
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.teams.delete(\n "team_id",\n)',
@@ -629,6 +725,10 @@ const EMBEDDED_METHODS = [
629
725
  method: 'teams get_rivals',
630
726
  example: "believe teams get-rivals \\\n --api-key 'My API Key' \\\n --team-id team_id",
631
727
  },
728
+ csharp: {
729
+ method: 'Teams.GetRivals',
730
+ example: 'TeamGetRivalsParams parameters = new() { TeamID = "team_id" };\n\nvar teams = await client.Teams.GetRivals(parameters);\n\nConsole.WriteLine(teams);',
731
+ },
632
732
  go: {
633
733
  method: 'client.Teams.GetRivals',
634
734
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteams, err := client.Teams.GetRivals(context.TODO(), "team_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", teams)\n}\n',
@@ -644,6 +744,10 @@ const EMBEDDED_METHODS = [
644
744
  method: 'teams().getRivals',
645
745
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.Team\nimport com.believe.api.models.teams.TeamGetRivalsParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val teams: List<Team> = client.teams().getRivals("team_id")\n}',
646
746
  },
747
+ php: {
748
+ method: 'teams->getRivals',
749
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$teams = $client->teams->getRivals('team_id');\n\nvar_dump($teams);",
750
+ },
647
751
  python: {
648
752
  method: 'teams.get_rivals',
649
753
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteams = client.teams.get_rivals(\n "team_id",\n)\nprint(teams)',
@@ -674,6 +778,10 @@ const EMBEDDED_METHODS = [
674
778
  method: 'teams get_culture',
675
779
  example: "believe teams get-culture \\\n --api-key 'My API Key' \\\n --team-id team_id",
676
780
  },
781
+ csharp: {
782
+ method: 'Teams.GetCulture',
783
+ example: 'TeamGetCultureParams parameters = new() { TeamID = "team_id" };\n\nvar response = await client.Teams.GetCulture(parameters);\n\nConsole.WriteLine(response);',
784
+ },
677
785
  go: {
678
786
  method: 'client.Teams.GetCulture',
679
787
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Teams.GetCulture(context.TODO(), "team_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -689,6 +797,10 @@ const EMBEDDED_METHODS = [
689
797
  method: 'teams().getCulture',
690
798
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.TeamGetCultureParams\nimport com.believe.api.models.teams.TeamGetCultureResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: TeamGetCultureResponse = client.teams().getCulture("team_id")\n}',
691
799
  },
800
+ php: {
801
+ method: 'teams->getCulture',
802
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->teams->getCulture('team_id');\n\nvar_dump($response);",
803
+ },
692
804
  python: {
693
805
  method: 'teams.get_culture',
694
806
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.teams.get_culture(\n "team_id",\n)\nprint(response)',
@@ -719,6 +831,10 @@ const EMBEDDED_METHODS = [
719
831
  method: 'teams list_logos',
720
832
  example: "believe teams list-logos \\\n --api-key 'My API Key' \\\n --team-id team_id",
721
833
  },
834
+ csharp: {
835
+ method: 'Teams.ListLogos',
836
+ example: 'TeamListLogosParams parameters = new() { TeamID = "team_id" };\n\nvar fileUploads = await client.Teams.ListLogos(parameters);\n\nConsole.WriteLine(fileUploads);',
837
+ },
722
838
  go: {
723
839
  method: 'client.Teams.ListLogos',
724
840
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfileUploads, err := client.Teams.ListLogos(context.TODO(), "team_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", fileUploads)\n}\n',
@@ -734,6 +850,10 @@ const EMBEDDED_METHODS = [
734
850
  method: 'teams().listLogos',
735
851
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.TeamListLogosParams\nimport com.believe.api.models.teams.logo.FileUpload\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val fileUploads: List<FileUpload> = client.teams().listLogos("team_id")\n}',
736
852
  },
853
+ php: {
854
+ method: 'teams->listLogos',
855
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$fileUploads = $client->teams->listLogos('team_id');\n\nvar_dump($fileUploads);",
856
+ },
737
857
  python: {
738
858
  method: 'teams.list_logos',
739
859
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nfile_uploads = client.teams.list_logos(\n "team_id",\n)\nprint(file_uploads)',
@@ -764,6 +884,10 @@ const EMBEDDED_METHODS = [
764
884
  method: 'logo upload',
765
885
  example: "believe teams:logo upload \\\n --api-key 'My API Key' \\\n --team-id team_id \\\n --file 'Example data'",
766
886
  },
887
+ csharp: {
888
+ method: 'Teams.Logo.Upload',
889
+ example: 'LogoUploadParams parameters = new()\n{\n TeamID = "team_id",\n File = Encoding.UTF8.GetBytes("Example data"),\n};\n\nvar fileUpload = await client.Teams.Logo.Upload(parameters);\n\nConsole.WriteLine(fileUpload);',
890
+ },
767
891
  go: {
768
892
  method: 'client.Teams.Logo.Upload',
769
893
  example: 'package main\n\nimport (\n\t"bytes"\n\t"context"\n\t"fmt"\n\t"io"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfileUpload, err := client.Teams.Logo.Upload(\n\t\tcontext.TODO(),\n\t\t"team_id",\n\t\tbelieve.TeamLogoUploadParams{\n\t\t\tFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", fileUpload.FileID)\n}\n',
@@ -779,6 +903,10 @@ const EMBEDDED_METHODS = [
779
903
  method: 'teams().logo().upload',
780
904
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.io.ByteArrayInputStream\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file("Example data".byteInputStream())\n .build()\n val fileUpload: FileUpload = client.teams().logo().upload(params)\n}',
781
905
  },
906
+ php: {
907
+ method: 'teams->logo->upload',
908
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$fileUpload = $client->teams->logo->upload('team_id', file: 'file');\n\nvar_dump($fileUpload);",
909
+ },
782
910
  python: {
783
911
  method: 'teams.logo.upload',
784
912
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nfile_upload = client.teams.logo.upload(\n team_id="team_id",\n file=b"Example data",\n)\nprint(file_upload.file_id)',
@@ -809,6 +937,10 @@ const EMBEDDED_METHODS = [
809
937
  method: 'logo download',
810
938
  example: "believe teams:logo download \\\n --api-key 'My API Key' \\\n --team-id team_id \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
811
939
  },
940
+ csharp: {
941
+ method: 'Teams.Logo.Download',
942
+ example: 'LogoDownloadParams parameters = new()\n{\n TeamID = "team_id",\n FileID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n};\n\nvar response = await client.Teams.Logo.Download(parameters);\n\nConsole.WriteLine(response);',
943
+ },
812
944
  go: {
813
945
  method: 'client.Teams.Logo.Download',
814
946
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Teams.Logo.Download(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tbelieve.TeamLogoDownloadParams{\n\t\t\tTeamID: "team_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -824,6 +956,10 @@ const EMBEDDED_METHODS = [
824
956
  method: 'teams().logo().download',
825
957
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.logo.LogoDownloadParams\nimport com.believe.api.models.teams.logo.LogoDownloadResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: LogoDownloadParams = LogoDownloadParams.builder()\n .teamId("team_id")\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val response: LogoDownloadResponse = client.teams().logo().download(params)\n}',
826
958
  },
959
+ php: {
960
+ method: 'teams->logo->download',
961
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->teams->logo->download(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', teamID: 'team_id'\n);\n\nvar_dump($response);",
962
+ },
827
963
  python: {
828
964
  method: 'teams.logo.download',
829
965
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.teams.logo.download(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n team_id="team_id",\n)\nprint(response)',
@@ -853,6 +989,10 @@ const EMBEDDED_METHODS = [
853
989
  method: 'logo delete',
854
990
  example: "believe teams:logo delete \\\n --api-key 'My API Key' \\\n --team-id team_id \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
855
991
  },
992
+ csharp: {
993
+ method: 'Teams.Logo.Delete',
994
+ example: 'LogoDeleteParams parameters = new()\n{\n TeamID = "team_id",\n FileID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n};\n\nawait client.Teams.Logo.Delete(parameters);',
995
+ },
856
996
  go: {
857
997
  method: 'client.Teams.Logo.Delete',
858
998
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Teams.Logo.Delete(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tbelieve.TeamLogoDeleteParams{\n\t\t\tTeamID: "team_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -868,6 +1008,10 @@ const EMBEDDED_METHODS = [
868
1008
  method: 'teams().logo().delete',
869
1009
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teams.logo.LogoDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: LogoDeleteParams = LogoDeleteParams.builder()\n .teamId("team_id")\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n client.teams().logo().delete(params)\n}',
870
1010
  },
1011
+ php: {
1012
+ method: 'teams->logo->delete',
1013
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->teams->logo->delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', teamID: 'team_id'\n);\n\nvar_dump($result);",
1014
+ },
871
1015
  python: {
872
1016
  method: 'teams.logo.delete',
873
1017
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.teams.logo.delete(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n team_id="team_id",\n)',
@@ -904,6 +1048,10 @@ const EMBEDDED_METHODS = [
904
1048
  method: 'matches list',
905
1049
  example: "believe matches list \\\n --api-key 'My API Key'",
906
1050
  },
1051
+ csharp: {
1052
+ method: 'Matches.List',
1053
+ example: 'MatchListParams parameters = new();\n\nvar page = await client.Matches.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
1054
+ },
907
1055
  go: {
908
1056
  method: 'client.Matches.List',
909
1057
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Matches.List(context.TODO(), believe.MatchListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -919,6 +1067,10 @@ const EMBEDDED_METHODS = [
919
1067
  method: 'matches().list',
920
1068
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.MatchListPage\nimport com.believe.api.models.matches.MatchListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: MatchListPage = client.matches().list()\n}',
921
1069
  },
1070
+ php: {
1071
+ method: 'matches->list',
1072
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->matches->list(\n limit: 10,\n matchType: MatchType::LEAGUE,\n result: MatchResult::WIN,\n skip: 0,\n teamID: 'team_id',\n);\n\nvar_dump($page);",
1073
+ },
922
1074
  python: {
923
1075
  method: 'matches.list',
924
1076
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.matches.list()\npage = page.data[0]\nprint(page.id)',
@@ -965,6 +1117,10 @@ const EMBEDDED_METHODS = [
965
1117
  method: 'matches create',
966
1118
  example: "believe matches create \\\n --api-key 'My API Key' \\\n --away-team-id tottenham \\\n --date \"'2024-02-20T19:45:00Z'\" \\\n --home-team-id afc-richmond \\\n --match-type cup",
967
1119
  },
1120
+ csharp: {
1121
+ method: 'Matches.Create',
1122
+ example: 'MatchCreateParams parameters = new()\n{\n AwayTeamID = "tottenham",\n Date = DateTimeOffset.Parse("2024-02-20T19:45:00Z"),\n HomeTeamID = "afc-richmond",\n MatchType = MatchType.Cup,\n};\n\nvar match = await client.Matches.Create(parameters);\n\nConsole.WriteLine(match);',
1123
+ },
968
1124
  go: {
969
1125
  method: 'client.Matches.New',
970
1126
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmatch, err := client.Matches.New(context.TODO(), believe.MatchNewParams{\n\t\tAwayTeamID: "tottenham",\n\t\tDate: time.Now(),\n\t\tHomeTeamID: "afc-richmond",\n\t\tMatchType: believe.MatchTypeCup,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", match.ID)\n}\n',
@@ -980,6 +1136,10 @@ const EMBEDDED_METHODS = [
980
1136
  method: 'matches().create',
981
1137
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.Match\nimport com.believe.api.models.matches.MatchCreateParams\nimport com.believe.api.models.matches.MatchType\nimport java.time.OffsetDateTime\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: MatchCreateParams = MatchCreateParams.builder()\n .awayTeamId("tottenham")\n .date(OffsetDateTime.parse("2024-02-20T19:45:00Z"))\n .homeTeamId("afc-richmond")\n .matchType(MatchType.CUP)\n .build()\n val match: Match = client.matches().create(params)\n}',
982
1138
  },
1139
+ php: {
1140
+ method: 'matches->create',
1141
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$match = $client->matches->create(\n awayTeamID: 'tottenham',\n date: new \\DateTimeImmutable('2024-02-20T19:45:00Z'),\n homeTeamID: 'afc-richmond',\n matchType: MatchType::CUP,\n attendance: 24500,\n awayScore: 0,\n episodeID: 's02e05',\n homeScore: 0,\n lessonLearned: 'It\\'s not about the wins and losses, it\\'s about helping these young fellas be the best versions of themselves.',\n possessionPercentage: 50,\n result: MatchResult::PENDING,\n tedHalftimeSpeech: 'You know what the happiest animal on Earth is? It\\'s a goldfish. You know why? It\\'s got a 10-second memory.',\n ticketRevenueGbp: '735000.00',\n turningPoints: [\n [\n 'description' => 'description',\n 'emotionalImpact' => 'Galvanized the team\\'s fighting spirit',\n 'minute' => 0,\n 'characterInvolved' => 'jamie-tartt',\n ],\n ],\n weatherTempCelsius: 8.5,\n);\n\nvar_dump($match);",
1142
+ },
983
1143
  python: {
984
1144
  method: 'matches.create',
985
1145
  example: 'import os\nfrom datetime import datetime\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nmatch = client.matches.create(\n away_team_id="tottenham",\n date=datetime.fromisoformat("2024-02-20T19:45:00"),\n home_team_id="afc-richmond",\n match_type="cup",\n)\nprint(match.id)',
@@ -1010,6 +1170,10 @@ const EMBEDDED_METHODS = [
1010
1170
  method: 'matches retrieve',
1011
1171
  example: "believe matches retrieve \\\n --api-key 'My API Key' \\\n --match-id match_id",
1012
1172
  },
1173
+ csharp: {
1174
+ method: 'Matches.Retrieve',
1175
+ example: 'MatchRetrieveParams parameters = new() { MatchID = "match_id" };\n\nvar match = await client.Matches.Retrieve(parameters);\n\nConsole.WriteLine(match);',
1176
+ },
1013
1177
  go: {
1014
1178
  method: 'client.Matches.Get',
1015
1179
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmatch, err := client.Matches.Get(context.TODO(), "match_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", match.ID)\n}\n',
@@ -1025,6 +1189,10 @@ const EMBEDDED_METHODS = [
1025
1189
  method: 'matches().retrieve',
1026
1190
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.Match\nimport com.believe.api.models.matches.MatchRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val match: Match = client.matches().retrieve("match_id")\n}',
1027
1191
  },
1192
+ php: {
1193
+ method: 'matches->retrieve',
1194
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$match = $client->matches->retrieve('match_id');\n\nvar_dump($match);",
1195
+ },
1028
1196
  python: {
1029
1197
  method: 'matches.retrieve',
1030
1198
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nmatch = client.matches.retrieve(\n "match_id",\n)\nprint(match.id)',
@@ -1072,6 +1240,10 @@ const EMBEDDED_METHODS = [
1072
1240
  method: 'matches update',
1073
1241
  example: "believe matches update \\\n --api-key 'My API Key' \\\n --match-id match_id",
1074
1242
  },
1243
+ csharp: {
1244
+ method: 'Matches.Update',
1245
+ example: 'MatchUpdateParams parameters = new() { MatchID = "match_id" };\n\nvar match = await client.Matches.Update(parameters);\n\nConsole.WriteLine(match);',
1246
+ },
1075
1247
  go: {
1076
1248
  method: 'client.Matches.Update',
1077
1249
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmatch, err := client.Matches.Update(\n\t\tcontext.TODO(),\n\t\t"match_id",\n\t\tbelieve.MatchUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", match.ID)\n}\n',
@@ -1087,6 +1259,10 @@ const EMBEDDED_METHODS = [
1087
1259
  method: 'matches().update',
1088
1260
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.Match\nimport com.believe.api.models.matches.MatchUpdateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val match: Match = client.matches().update("match_id")\n}',
1089
1261
  },
1262
+ php: {
1263
+ method: 'matches->update',
1264
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$match = $client->matches->update(\n 'match_id',\n attendance: 0,\n awayScore: 0,\n awayTeamID: 'away_team_id',\n date: new \\DateTimeImmutable('2019-12-27T18:11:19.117Z'),\n episodeID: 'episode_id',\n homeScore: 0,\n homeTeamID: 'home_team_id',\n lessonLearned: 'lesson_learned',\n matchType: MatchType::LEAGUE,\n possessionPercentage: 0,\n result: MatchResult::WIN,\n tedHalftimeSpeech: 'ted_halftime_speech',\n ticketRevenueGbp: 0,\n turningPoints: [\n [\n 'description' => 'description',\n 'emotionalImpact' => 'Galvanized the team\\'s fighting spirit',\n 'minute' => 0,\n 'characterInvolved' => 'jamie-tartt',\n ],\n ],\n weatherTempCelsius: -30,\n);\n\nvar_dump($match);",
1265
+ },
1090
1266
  python: {
1091
1267
  method: 'matches.update',
1092
1268
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nmatch = client.matches.update(\n match_id="match_id",\n)\nprint(match.id)',
@@ -1116,6 +1292,10 @@ const EMBEDDED_METHODS = [
1116
1292
  method: 'matches delete',
1117
1293
  example: "believe matches delete \\\n --api-key 'My API Key' \\\n --match-id match_id",
1118
1294
  },
1295
+ csharp: {
1296
+ method: 'Matches.Delete',
1297
+ example: 'MatchDeleteParams parameters = new() { MatchID = "match_id" };\n\nawait client.Matches.Delete(parameters);',
1298
+ },
1119
1299
  go: {
1120
1300
  method: 'client.Matches.Delete',
1121
1301
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Matches.Delete(context.TODO(), "match_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -1131,6 +1311,10 @@ const EMBEDDED_METHODS = [
1131
1311
  method: 'matches().delete',
1132
1312
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.MatchDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.matches().delete("match_id")\n}',
1133
1313
  },
1314
+ php: {
1315
+ method: 'matches->delete',
1316
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->matches->delete('match_id');\n\nvar_dump($result);",
1317
+ },
1134
1318
  python: {
1135
1319
  method: 'matches.delete',
1136
1320
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.matches.delete(\n "match_id",\n)',
@@ -1161,6 +1345,10 @@ const EMBEDDED_METHODS = [
1161
1345
  method: 'matches get_turning_points',
1162
1346
  example: "believe matches get-turning-points \\\n --api-key 'My API Key' \\\n --match-id match_id",
1163
1347
  },
1348
+ csharp: {
1349
+ method: 'Matches.GetTurningPoints',
1350
+ example: 'MatchGetTurningPointsParams parameters = new() { MatchID = "match_id" };\n\nvar response = await client.Matches.GetTurningPoints(parameters);\n\nConsole.WriteLine(response);',
1351
+ },
1164
1352
  go: {
1165
1353
  method: 'client.Matches.GetTurningPoints',
1166
1354
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Matches.GetTurningPoints(context.TODO(), "match_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -1176,6 +1364,10 @@ const EMBEDDED_METHODS = [
1176
1364
  method: 'matches().getTurningPoints',
1177
1365
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.MatchGetTurningPointsParams\nimport com.believe.api.models.matches.MatchGetTurningPointsResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: List<MatchGetTurningPointsResponse> = client.matches().getTurningPoints("match_id")\n}',
1178
1366
  },
1367
+ php: {
1368
+ method: 'matches->getTurningPoints',
1369
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->matches->getTurningPoints('match_id');\n\nvar_dump($response);",
1370
+ },
1179
1371
  python: {
1180
1372
  method: 'matches.get_turning_points',
1181
1373
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.matches.get_turning_points(\n "match_id",\n)\nprint(response)',
@@ -1206,6 +1398,10 @@ const EMBEDDED_METHODS = [
1206
1398
  method: 'matches get_lesson',
1207
1399
  example: "believe matches get-lesson \\\n --api-key 'My API Key' \\\n --match-id match_id",
1208
1400
  },
1401
+ csharp: {
1402
+ method: 'Matches.GetLesson',
1403
+ example: 'MatchGetLessonParams parameters = new() { MatchID = "match_id" };\n\nvar response = await client.Matches.GetLesson(parameters);\n\nConsole.WriteLine(response);',
1404
+ },
1209
1405
  go: {
1210
1406
  method: 'client.Matches.GetLesson',
1211
1407
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Matches.GetLesson(context.TODO(), "match_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -1221,6 +1417,10 @@ const EMBEDDED_METHODS = [
1221
1417
  method: 'matches().getLesson',
1222
1418
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.MatchGetLessonParams\nimport com.believe.api.models.matches.MatchGetLessonResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: MatchGetLessonResponse = client.matches().getLesson("match_id")\n}',
1223
1419
  },
1420
+ php: {
1421
+ method: 'matches->getLesson',
1422
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->matches->getLesson('match_id');\n\nvar_dump($response);",
1423
+ },
1224
1424
  python: {
1225
1425
  method: 'matches.get_lesson',
1226
1426
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.matches.get_lesson(\n "match_id",\n)\nprint(response)',
@@ -1250,6 +1450,10 @@ const EMBEDDED_METHODS = [
1250
1450
  method: 'matches stream_live',
1251
1451
  example: "believe matches stream-live \\\n --api-key 'My API Key'",
1252
1452
  },
1453
+ csharp: {
1454
+ method: 'Matches.StreamLive',
1455
+ example: 'MatchStreamLiveParams parameters = new();\n\nawait client.Matches.StreamLive(parameters);',
1456
+ },
1253
1457
  go: {
1254
1458
  method: 'client.Matches.StreamLive',
1255
1459
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Matches.StreamLive(context.TODO(), believe.MatchStreamLiveParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -1265,6 +1469,10 @@ const EMBEDDED_METHODS = [
1265
1469
  method: 'matches().streamLive',
1266
1470
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.MatchStreamLiveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.matches().streamLive()\n}',
1267
1471
  },
1472
+ php: {
1473
+ method: 'matches->streamLive',
1474
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->matches->streamLive(\n awayTeam: 'away_team', excitementLevel: 1, homeTeam: 'home_team', speed: 0.1\n);\n\nvar_dump($result);",
1475
+ },
1268
1476
  python: {
1269
1477
  method: 'matches.stream_live',
1270
1478
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.matches.stream_live()',
@@ -1295,6 +1503,10 @@ const EMBEDDED_METHODS = [
1295
1503
  method: 'commentary stream',
1296
1504
  example: "believe matches:commentary stream \\\n --api-key 'My API Key' \\\n --match-id match_id",
1297
1505
  },
1506
+ csharp: {
1507
+ method: 'Matches.Commentary.Stream',
1508
+ example: 'CommentaryStreamParams parameters = new() { MatchID = "match_id" };\n\nvar response = await client.Matches.Commentary.Stream(parameters);\n\nConsole.WriteLine(response);',
1509
+ },
1298
1510
  go: {
1299
1511
  method: 'client.Matches.Commentary.Stream',
1300
1512
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Matches.Commentary.Stream(context.TODO(), "match_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -1310,6 +1522,10 @@ const EMBEDDED_METHODS = [
1310
1522
  method: 'matches().commentary().stream',
1311
1523
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.matches.commentary.CommentaryStreamParams\nimport com.believe.api.models.matches.commentary.CommentaryStreamResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: CommentaryStreamResponse = client.matches().commentary().stream("match_id")\n}',
1312
1524
  },
1525
+ php: {
1526
+ method: 'matches->commentary->stream',
1527
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->matches->commentary->stream('match_id');\n\nvar_dump($response);",
1528
+ },
1313
1529
  python: {
1314
1530
  method: 'matches.commentary.stream',
1315
1531
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.matches.commentary.stream(\n "match_id",\n)\nprint(response)',
@@ -1340,6 +1556,10 @@ const EMBEDDED_METHODS = [
1340
1556
  method: 'episodes list',
1341
1557
  example: "believe episodes list \\\n --api-key 'My API Key'",
1342
1558
  },
1559
+ csharp: {
1560
+ method: 'Episodes.List',
1561
+ example: 'EpisodeListParams parameters = new();\n\nvar page = await client.Episodes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
1562
+ },
1343
1563
  go: {
1344
1564
  method: 'client.Episodes.List',
1345
1565
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Episodes.List(context.TODO(), believe.EpisodeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -1355,6 +1575,10 @@ const EMBEDDED_METHODS = [
1355
1575
  method: 'episodes().list',
1356
1576
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.episodes.EpisodeListPage\nimport com.believe.api.models.episodes.EpisodeListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: EpisodeListPage = client.episodes().list()\n}',
1357
1577
  },
1578
+ php: {
1579
+ method: 'episodes->list',
1580
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->episodes->list(\n characterFocus: 'character_focus', limit: 10, season: 1, skip: 0\n);\n\nvar_dump($page);",
1581
+ },
1358
1582
  python: {
1359
1583
  method: 'episodes.list',
1360
1584
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.episodes.list()\npage = page.data[0]\nprint(page.id)',
@@ -1401,6 +1625,10 @@ const EMBEDDED_METHODS = [
1401
1625
  method: 'episodes create',
1402
1626
  example: "believe episodes create \\\n --api-key 'My API Key' \\\n --air-date \"'2020-10-02'\" \\\n --character-focus ted-lasso \\\n --character-focus coach-beard \\\n --character-focus higgins \\\n --character-focus nate \\\n --director 'MJ Delaney' \\\n --episode-number 8 \\\n --main-theme 'The power of vulnerability and male friendship' \\\n --runtime-minutes 29 \\\n --season 1 \\\n --synopsis 'Ted creates a support group for the coaching staff while Rebecca faces a difficult decision about her future.' \\\n --ted-wisdom \"There's two buttons I never like to hit: that's panic and snooze.\" \\\n --title 'The Diamond Dogs' \\\n --writer 'Jason Sudeikis, Brendan Hunt, Joe Kelly'",
1403
1627
  },
1628
+ csharp: {
1629
+ method: 'Episodes.Create',
1630
+ example: 'EpisodeCreateParams parameters = new()\n{\n AirDate = "2020-10-02",\n CharacterFocus =\n [\n "ted-lasso", "coach-beard", "higgins", "nate"\n ],\n Director = "MJ Delaney",\n EpisodeNumber = 8,\n MainTheme = "The power of vulnerability and male friendship",\n RuntimeMinutes = 29,\n Season = 1,\n Synopsis = "Ted creates a support group for the coaching staff while Rebecca faces a difficult decision about her future.",\n TedWisdom = "There\'s two buttons I never like to hit: that\'s panic and snooze.",\n Title = "The Diamond Dogs",\n Writer = "Jason Sudeikis, Brendan Hunt, Joe Kelly",\n};\n\nvar episode = await client.Episodes.Create(parameters);\n\nConsole.WriteLine(episode);',
1631
+ },
1404
1632
  go: {
1405
1633
  method: 'client.Episodes.New',
1406
1634
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tepisode, err := client.Episodes.New(context.TODO(), believe.EpisodeNewParams{\n\t\tAirDate: time.Now(),\n\t\tCharacterFocus: []string{"ted-lasso", "coach-beard", "higgins", "nate"},\n\t\tDirector: "MJ Delaney",\n\t\tEpisodeNumber: 8,\n\t\tMainTheme: "The power of vulnerability and male friendship",\n\t\tRuntimeMinutes: 29,\n\t\tSeason: 1,\n\t\tSynopsis: "Ted creates a support group for the coaching staff while Rebecca faces a difficult decision about her future.",\n\t\tTedWisdom: "There\'s two buttons I never like to hit: that\'s panic and snooze.",\n\t\tTitle: "The Diamond Dogs",\n\t\tWriter: "Jason Sudeikis, Brendan Hunt, Joe Kelly",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", episode.ID)\n}\n',
@@ -1416,6 +1644,10 @@ const EMBEDDED_METHODS = [
1416
1644
  method: 'episodes().create',
1417
1645
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.episodes.Episode\nimport com.believe.api.models.episodes.EpisodeCreateParams\nimport java.time.LocalDate\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: EpisodeCreateParams = EpisodeCreateParams.builder()\n .airDate(LocalDate.parse("2020-10-02"))\n .characterFocus(listOf(\n "ted-lasso",\n "coach-beard",\n "higgins",\n "nate",\n ))\n .director("MJ Delaney")\n .episodeNumber(8L)\n .mainTheme("The power of vulnerability and male friendship")\n .runtimeMinutes(29L)\n .season(1L)\n .synopsis("Ted creates a support group for the coaching staff while Rebecca faces a difficult decision about her future.")\n .tedWisdom("There\'s two buttons I never like to hit: that\'s panic and snooze.")\n .title("The Diamond Dogs")\n .writer("Jason Sudeikis, Brendan Hunt, Joe Kelly")\n .build()\n val episode: Episode = client.episodes().create(params)\n}',
1418
1646
  },
1647
+ php: {
1648
+ method: 'episodes->create',
1649
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$episode = $client->episodes->create(\n airDate: '2020-10-02',\n characterFocus: ['ted-lasso', 'coach-beard', 'higgins', 'nate'],\n director: 'MJ Delaney',\n episodeNumber: 8,\n mainTheme: 'The power of vulnerability and male friendship',\n runtimeMinutes: 29,\n season: 1,\n synopsis: 'Ted creates a support group for the coaching staff while Rebecca faces a difficult decision about her future.',\n tedWisdom: 'There\\'s two buttons I never like to hit: that\\'s panic and snooze.',\n title: 'The Diamond Dogs',\n writer: 'Jason Sudeikis, Brendan Hunt, Joe Kelly',\n biscuitsWithBossMoment: 'Ted and Rebecca have an honest conversation about trust.',\n memorableMoments: [\n 'First Diamond Dogs meeting',\n 'The famous dart scene with Rupert',\n 'Be curious, not judgmental speech',\n ],\n usViewersMillions: 1.42,\n viewerRating: 9.1,\n);\n\nvar_dump($episode);",
1650
+ },
1419
1651
  python: {
1420
1652
  method: 'episodes.create',
1421
1653
  example: 'import os\nfrom datetime import date\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nepisode = client.episodes.create(\n air_date=date.fromisoformat("2020-10-02"),\n character_focus=["ted-lasso", "coach-beard", "higgins", "nate"],\n director="MJ Delaney",\n episode_number=8,\n main_theme="The power of vulnerability and male friendship",\n runtime_minutes=29,\n season=1,\n synopsis="Ted creates a support group for the coaching staff while Rebecca faces a difficult decision about her future.",\n ted_wisdom="There\'s two buttons I never like to hit: that\'s panic and snooze.",\n title="The Diamond Dogs",\n writer="Jason Sudeikis, Brendan Hunt, Joe Kelly",\n)\nprint(episode.id)',
@@ -1446,6 +1678,10 @@ const EMBEDDED_METHODS = [
1446
1678
  method: 'episodes retrieve',
1447
1679
  example: "believe episodes retrieve \\\n --api-key 'My API Key' \\\n --episode-id episode_id",
1448
1680
  },
1681
+ csharp: {
1682
+ method: 'Episodes.Retrieve',
1683
+ example: 'EpisodeRetrieveParams parameters = new() { EpisodeID = "episode_id" };\n\nvar episode = await client.Episodes.Retrieve(parameters);\n\nConsole.WriteLine(episode);',
1684
+ },
1449
1685
  go: {
1450
1686
  method: 'client.Episodes.Get',
1451
1687
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tepisode, err := client.Episodes.Get(context.TODO(), "episode_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", episode.ID)\n}\n',
@@ -1461,6 +1697,10 @@ const EMBEDDED_METHODS = [
1461
1697
  method: 'episodes().retrieve',
1462
1698
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.episodes.Episode\nimport com.believe.api.models.episodes.EpisodeRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val episode: Episode = client.episodes().retrieve("episode_id")\n}',
1463
1699
  },
1700
+ php: {
1701
+ method: 'episodes->retrieve',
1702
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$episode = $client->episodes->retrieve('episode_id');\n\nvar_dump($episode);",
1703
+ },
1464
1704
  python: {
1465
1705
  method: 'episodes.retrieve',
1466
1706
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nepisode = client.episodes.retrieve(\n "episode_id",\n)\nprint(episode.id)',
@@ -1508,6 +1748,10 @@ const EMBEDDED_METHODS = [
1508
1748
  method: 'episodes update',
1509
1749
  example: "believe episodes update \\\n --api-key 'My API Key' \\\n --episode-id episode_id",
1510
1750
  },
1751
+ csharp: {
1752
+ method: 'Episodes.Update',
1753
+ example: 'EpisodeUpdateParams parameters = new() { EpisodeID = "episode_id" };\n\nvar episode = await client.Episodes.Update(parameters);\n\nConsole.WriteLine(episode);',
1754
+ },
1511
1755
  go: {
1512
1756
  method: 'client.Episodes.Update',
1513
1757
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tepisode, err := client.Episodes.Update(\n\t\tcontext.TODO(),\n\t\t"episode_id",\n\t\tbelieve.EpisodeUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", episode.ID)\n}\n',
@@ -1523,6 +1767,10 @@ const EMBEDDED_METHODS = [
1523
1767
  method: 'episodes().update',
1524
1768
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.episodes.Episode\nimport com.believe.api.models.episodes.EpisodeUpdateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val episode: Episode = client.episodes().update("episode_id")\n}',
1525
1769
  },
1770
+ php: {
1771
+ method: 'episodes->update',
1772
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$episode = $client->episodes->update(\n 'episode_id',\n airDate: '2019-12-27',\n biscuitsWithBossMoment: 'biscuits_with_boss_moment',\n characterFocus: ['string'],\n director: 'director',\n episodeNumber: 1,\n mainTheme: 'main_theme',\n memorableMoments: ['string'],\n runtimeMinutes: 20,\n season: 1,\n synopsis: 'synopsis',\n tedWisdom: 'ted_wisdom',\n title: 'x',\n usViewersMillions: 0,\n viewerRating: 0,\n writer: 'writer',\n);\n\nvar_dump($episode);",
1773
+ },
1526
1774
  python: {
1527
1775
  method: 'episodes.update',
1528
1776
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nepisode = client.episodes.update(\n episode_id="episode_id",\n)\nprint(episode.id)',
@@ -1552,6 +1800,10 @@ const EMBEDDED_METHODS = [
1552
1800
  method: 'episodes delete',
1553
1801
  example: "believe episodes delete \\\n --api-key 'My API Key' \\\n --episode-id episode_id",
1554
1802
  },
1803
+ csharp: {
1804
+ method: 'Episodes.Delete',
1805
+ example: 'EpisodeDeleteParams parameters = new() { EpisodeID = "episode_id" };\n\nawait client.Episodes.Delete(parameters);',
1806
+ },
1555
1807
  go: {
1556
1808
  method: 'client.Episodes.Delete',
1557
1809
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Episodes.Delete(context.TODO(), "episode_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -1567,6 +1819,10 @@ const EMBEDDED_METHODS = [
1567
1819
  method: 'episodes().delete',
1568
1820
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.episodes.EpisodeDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.episodes().delete("episode_id")\n}',
1569
1821
  },
1822
+ php: {
1823
+ method: 'episodes->delete',
1824
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->episodes->delete('episode_id');\n\nvar_dump($result);",
1825
+ },
1570
1826
  python: {
1571
1827
  method: 'episodes.delete',
1572
1828
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.episodes.delete(\n "episode_id",\n)',
@@ -1597,6 +1853,10 @@ const EMBEDDED_METHODS = [
1597
1853
  method: 'episodes get_wisdom',
1598
1854
  example: "believe episodes get-wisdom \\\n --api-key 'My API Key' \\\n --episode-id episode_id",
1599
1855
  },
1856
+ csharp: {
1857
+ method: 'Episodes.GetWisdom',
1858
+ example: 'EpisodeGetWisdomParams parameters = new() { EpisodeID = "episode_id" };\n\nvar response = await client.Episodes.GetWisdom(parameters);\n\nConsole.WriteLine(response);',
1859
+ },
1600
1860
  go: {
1601
1861
  method: 'client.Episodes.GetWisdom',
1602
1862
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Episodes.GetWisdom(context.TODO(), "episode_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -1612,6 +1872,10 @@ const EMBEDDED_METHODS = [
1612
1872
  method: 'episodes().getWisdom',
1613
1873
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.episodes.EpisodeGetWisdomParams\nimport com.believe.api.models.episodes.EpisodeGetWisdomResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: EpisodeGetWisdomResponse = client.episodes().getWisdom("episode_id")\n}',
1614
1874
  },
1875
+ php: {
1876
+ method: 'episodes->getWisdom',
1877
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->episodes->getWisdom('episode_id');\n\nvar_dump($response);",
1878
+ },
1615
1879
  python: {
1616
1880
  method: 'episodes.get_wisdom',
1617
1881
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.episodes.get_wisdom(\n "episode_id",\n)\nprint(response)',
@@ -1650,6 +1914,10 @@ const EMBEDDED_METHODS = [
1650
1914
  method: 'quotes list',
1651
1915
  example: "believe quotes list \\\n --api-key 'My API Key'",
1652
1916
  },
1917
+ csharp: {
1918
+ method: 'Quotes.List',
1919
+ example: 'QuoteListParams parameters = new();\n\nvar page = await client.Quotes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
1920
+ },
1653
1921
  go: {
1654
1922
  method: 'client.Quotes.List',
1655
1923
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Quotes.List(context.TODO(), believe.QuoteListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -1665,6 +1933,10 @@ const EMBEDDED_METHODS = [
1665
1933
  method: 'quotes().list',
1666
1934
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.QuoteListPage\nimport com.believe.api.models.quotes.QuoteListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: QuoteListPage = client.quotes().list()\n}',
1667
1935
  },
1936
+ php: {
1937
+ method: 'quotes->list',
1938
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->quotes->list(\n characterID: 'character_id',\n funny: true,\n inspirational: true,\n limit: 10,\n momentType: QuoteMoment::HALFTIME_SPEECH,\n skip: 0,\n theme: QuoteTheme::BELIEF,\n);\n\nvar_dump($page);",
1939
+ },
1668
1940
  python: {
1669
1941
  method: 'quotes.list',
1670
1942
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.quotes.list()\npage = page.data[0]\nprint(page.id)',
@@ -1707,6 +1979,10 @@ const EMBEDDED_METHODS = [
1707
1979
  method: 'quotes create',
1708
1980
  example: "believe quotes create \\\n --api-key 'My API Key' \\\n --character-id ted-lasso \\\n --context \"Ted's first team meeting, revealing his coaching philosophy\" \\\n --moment-type locker_room \\\n --text 'I believe in believe.' \\\n --theme belief",
1709
1981
  },
1982
+ csharp: {
1983
+ method: 'Quotes.Create',
1984
+ example: 'QuoteCreateParams parameters = new()\n{\n CharacterID = "ted-lasso",\n Context = "Ted\'s first team meeting, revealing his coaching philosophy",\n MomentType = QuoteMoment.LockerRoom,\n Text = "I believe in believe.",\n Theme = QuoteTheme.Belief,\n};\n\nvar quote = await client.Quotes.Create(parameters);\n\nConsole.WriteLine(quote);',
1985
+ },
1710
1986
  go: {
1711
1987
  method: 'client.Quotes.New',
1712
1988
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tquote, err := client.Quotes.New(context.TODO(), believe.QuoteNewParams{\n\t\tCharacterID: "ted-lasso",\n\t\tContext: "Ted\'s first team meeting, revealing his coaching philosophy",\n\t\tMomentType: believe.QuoteMomentLockerRoom,\n\t\tText: "I believe in believe.",\n\t\tTheme: believe.QuoteThemeBelief,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", quote.ID)\n}\n',
@@ -1722,6 +1998,10 @@ const EMBEDDED_METHODS = [
1722
1998
  method: 'quotes().create',
1723
1999
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.Quote\nimport com.believe.api.models.quotes.QuoteCreateParams\nimport com.believe.api.models.quotes.QuoteMoment\nimport com.believe.api.models.quotes.QuoteTheme\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: QuoteCreateParams = QuoteCreateParams.builder()\n .characterId("ted-lasso")\n .context("Ted\'s first team meeting, revealing his coaching philosophy")\n .momentType(QuoteMoment.LOCKER_ROOM)\n .text("I believe in believe.")\n .theme(QuoteTheme.BELIEF)\n .build()\n val quote: Quote = client.quotes().create(params)\n}',
1724
2000
  },
2001
+ php: {
2002
+ method: 'quotes->create',
2003
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$quote = $client->quotes->create(\n characterID: 'ted-lasso',\n context: 'Ted\\'s first team meeting, revealing his coaching philosophy',\n momentType: QuoteMoment::LOCKER_ROOM,\n text: 'I believe in believe.',\n theme: QuoteTheme::BELIEF,\n episodeID: 's01e01',\n isFunny: false,\n isInspirational: true,\n popularityScore: 98.5,\n secondaryThemes: [QuoteTheme::LEADERSHIP, QuoteTheme::TEAMWORK],\n timesShared: 250000,\n);\n\nvar_dump($quote);",
2004
+ },
1725
2005
  python: {
1726
2006
  method: 'quotes.create',
1727
2007
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nquote = client.quotes.create(\n character_id="ted-lasso",\n context="Ted\'s first team meeting, revealing his coaching philosophy",\n moment_type="locker_room",\n text="I believe in believe.",\n theme="belief",\n)\nprint(quote.id)',
@@ -1752,6 +2032,10 @@ const EMBEDDED_METHODS = [
1752
2032
  method: 'quotes get_random',
1753
2033
  example: "believe quotes get-random \\\n --api-key 'My API Key'",
1754
2034
  },
2035
+ csharp: {
2036
+ method: 'Quotes.GetRandom',
2037
+ example: 'QuoteGetRandomParams parameters = new();\n\nvar quote = await client.Quotes.GetRandom(parameters);\n\nConsole.WriteLine(quote);',
2038
+ },
1755
2039
  go: {
1756
2040
  method: 'client.Quotes.GetRandom',
1757
2041
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tquote, err := client.Quotes.GetRandom(context.TODO(), believe.QuoteGetRandomParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", quote.ID)\n}\n',
@@ -1767,6 +2051,10 @@ const EMBEDDED_METHODS = [
1767
2051
  method: 'quotes().getRandom',
1768
2052
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.Quote\nimport com.believe.api.models.quotes.QuoteGetRandomParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val quote: Quote = client.quotes().getRandom()\n}',
1769
2053
  },
2054
+ php: {
2055
+ method: 'quotes->getRandom',
2056
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$quote = $client->quotes->getRandom(\n characterID: 'character_id', inspirational: true, theme: QuoteTheme::BELIEF\n);\n\nvar_dump($quote);",
2057
+ },
1770
2058
  python: {
1771
2059
  method: 'quotes.get_random',
1772
2060
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nquote = client.quotes.get_random()\nprint(quote.id)',
@@ -1797,6 +2085,10 @@ const EMBEDDED_METHODS = [
1797
2085
  method: 'quotes retrieve',
1798
2086
  example: "believe quotes retrieve \\\n --api-key 'My API Key' \\\n --quote-id quote_id",
1799
2087
  },
2088
+ csharp: {
2089
+ method: 'Quotes.Retrieve',
2090
+ example: 'QuoteRetrieveParams parameters = new() { QuoteID = "quote_id" };\n\nvar quote = await client.Quotes.Retrieve(parameters);\n\nConsole.WriteLine(quote);',
2091
+ },
1800
2092
  go: {
1801
2093
  method: 'client.Quotes.Get',
1802
2094
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tquote, err := client.Quotes.Get(context.TODO(), "quote_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", quote.ID)\n}\n',
@@ -1812,6 +2104,10 @@ const EMBEDDED_METHODS = [
1812
2104
  method: 'quotes().retrieve',
1813
2105
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.Quote\nimport com.believe.api.models.quotes.QuoteRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val quote: Quote = client.quotes().retrieve("quote_id")\n}',
1814
2106
  },
2107
+ php: {
2108
+ method: 'quotes->retrieve',
2109
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$quote = $client->quotes->retrieve('quote_id');\n\nvar_dump($quote);",
2110
+ },
1815
2111
  python: {
1816
2112
  method: 'quotes.retrieve',
1817
2113
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nquote = client.quotes.retrieve(\n "quote_id",\n)\nprint(quote.id)',
@@ -1855,6 +2151,10 @@ const EMBEDDED_METHODS = [
1855
2151
  method: 'quotes update',
1856
2152
  example: "believe quotes update \\\n --api-key 'My API Key' \\\n --quote-id quote_id",
1857
2153
  },
2154
+ csharp: {
2155
+ method: 'Quotes.Update',
2156
+ example: 'QuoteUpdateParams parameters = new() { QuoteID = "quote_id" };\n\nvar quote = await client.Quotes.Update(parameters);\n\nConsole.WriteLine(quote);',
2157
+ },
1858
2158
  go: {
1859
2159
  method: 'client.Quotes.Update',
1860
2160
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tquote, err := client.Quotes.Update(\n\t\tcontext.TODO(),\n\t\t"quote_id",\n\t\tbelieve.QuoteUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", quote.ID)\n}\n',
@@ -1870,6 +2170,10 @@ const EMBEDDED_METHODS = [
1870
2170
  method: 'quotes().update',
1871
2171
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.Quote\nimport com.believe.api.models.quotes.QuoteUpdateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val quote: Quote = client.quotes().update("quote_id")\n}',
1872
2172
  },
2173
+ php: {
2174
+ method: 'quotes->update',
2175
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$quote = $client->quotes->update(\n 'quote_id',\n characterID: 'character_id',\n context: 'context',\n episodeID: 'episode_id',\n isFunny: true,\n isInspirational: true,\n momentType: QuoteMoment::HALFTIME_SPEECH,\n popularityScore: 0,\n secondaryThemes: [QuoteTheme::BELIEF],\n text: 'x',\n theme: QuoteTheme::BELIEF,\n timesShared: 0,\n);\n\nvar_dump($quote);",
2176
+ },
1873
2177
  python: {
1874
2178
  method: 'quotes.update',
1875
2179
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nquote = client.quotes.update(\n quote_id="quote_id",\n)\nprint(quote.id)',
@@ -1899,6 +2203,10 @@ const EMBEDDED_METHODS = [
1899
2203
  method: 'quotes delete',
1900
2204
  example: "believe quotes delete \\\n --api-key 'My API Key' \\\n --quote-id quote_id",
1901
2205
  },
2206
+ csharp: {
2207
+ method: 'Quotes.Delete',
2208
+ example: 'QuoteDeleteParams parameters = new() { QuoteID = "quote_id" };\n\nawait client.Quotes.Delete(parameters);',
2209
+ },
1902
2210
  go: {
1903
2211
  method: 'client.Quotes.Delete',
1904
2212
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Quotes.Delete(context.TODO(), "quote_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -1914,6 +2222,10 @@ const EMBEDDED_METHODS = [
1914
2222
  method: 'quotes().delete',
1915
2223
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.QuoteDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.quotes().delete("quote_id")\n}',
1916
2224
  },
2225
+ php: {
2226
+ method: 'quotes->delete',
2227
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->quotes->delete('quote_id');\n\nvar_dump($result);",
2228
+ },
1917
2229
  python: {
1918
2230
  method: 'quotes.delete',
1919
2231
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.quotes.delete(\n "quote_id",\n)',
@@ -1944,6 +2256,10 @@ const EMBEDDED_METHODS = [
1944
2256
  method: 'quotes list_by_theme',
1945
2257
  example: "believe quotes list-by-theme \\\n --api-key 'My API Key' \\\n --theme belief",
1946
2258
  },
2259
+ csharp: {
2260
+ method: 'Quotes.ListByTheme',
2261
+ example: 'QuoteListByThemeParams parameters = new() { Theme = QuoteTheme.Belief };\n\nvar page = await client.Quotes.ListByTheme(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2262
+ },
1947
2263
  go: {
1948
2264
  method: 'client.Quotes.ListByTheme',
1949
2265
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Quotes.ListByTheme(\n\t\tcontext.TODO(),\n\t\tbelieve.QuoteThemeBelief,\n\t\tbelieve.QuoteListByThemeParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -1959,6 +2275,10 @@ const EMBEDDED_METHODS = [
1959
2275
  method: 'quotes().listByTheme',
1960
2276
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.QuoteListByThemePage\nimport com.believe.api.models.quotes.QuoteListByThemeParams\nimport com.believe.api.models.quotes.QuoteTheme\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: QuoteListByThemePage = client.quotes().listByTheme(QuoteTheme.BELIEF)\n}',
1961
2277
  },
2278
+ php: {
2279
+ method: 'quotes->listByTheme',
2280
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->quotes->listByTheme(QuoteTheme::BELIEF, limit: 10, skip: 0);\n\nvar_dump($page);",
2281
+ },
1962
2282
  python: {
1963
2283
  method: 'quotes.list_by_theme',
1964
2284
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.quotes.list_by_theme(\n theme="belief",\n)\npage = page.data[0]\nprint(page.id)',
@@ -1989,6 +2309,10 @@ const EMBEDDED_METHODS = [
1989
2309
  method: 'quotes list_by_character',
1990
2310
  example: "believe quotes list-by-character \\\n --api-key 'My API Key' \\\n --character-id character_id",
1991
2311
  },
2312
+ csharp: {
2313
+ method: 'Quotes.ListByCharacter',
2314
+ example: 'QuoteListByCharacterParams parameters = new() { CharacterID = "character_id" };\n\nvar page = await client.Quotes.ListByCharacter(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2315
+ },
1992
2316
  go: {
1993
2317
  method: 'client.Quotes.ListByCharacter',
1994
2318
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Quotes.ListByCharacter(\n\t\tcontext.TODO(),\n\t\t"character_id",\n\t\tbelieve.QuoteListByCharacterParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2004,6 +2328,10 @@ const EMBEDDED_METHODS = [
2004
2328
  method: 'quotes().listByCharacter',
2005
2329
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.quotes.QuoteListByCharacterPage\nimport com.believe.api.models.quotes.QuoteListByCharacterParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: QuoteListByCharacterPage = client.quotes().listByCharacter("character_id")\n}',
2006
2330
  },
2331
+ php: {
2332
+ method: 'quotes->listByCharacter',
2333
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->quotes->listByCharacter('character_id', limit: 10, skip: 0);\n\nvar_dump($page);",
2334
+ },
2007
2335
  python: {
2008
2336
  method: 'quotes.list_by_character',
2009
2337
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.quotes.list_by_character(\n character_id="character_id",\n)\npage = page.data[0]\nprint(page.id)',
@@ -2034,6 +2362,10 @@ const EMBEDDED_METHODS = [
2034
2362
  method: 'believe submit',
2035
2363
  example: "believe believe submit \\\n --api-key 'My API Key' \\\n --situation \"I just got passed over for a promotion I've been working toward for two years.\" \\\n --situation-type work_challenge",
2036
2364
  },
2365
+ csharp: {
2366
+ method: 'Believe.Submit',
2367
+ example: 'BelieveSubmitParams parameters = new()\n{\n Situation = "I just got passed over for a promotion I\'ve been working toward for two years.",\n SituationType = SituationType.WorkChallenge,\n};\n\nvar response = await client.Believe.Submit(parameters);\n\nConsole.WriteLine(response);',
2368
+ },
2037
2369
  go: {
2038
2370
  method: 'client.Believe.Submit',
2039
2371
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Believe.Submit(context.TODO(), believe.BelieveSubmitParams{\n\t\tSituation: "I just got passed over for a promotion I\'ve been working toward for two years.",\n\t\tSituationType: believe.BelieveSubmitParamsSituationTypeWorkChallenge,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ActionSuggestion)\n}\n',
@@ -2049,6 +2381,10 @@ const EMBEDDED_METHODS = [
2049
2381
  method: 'believe().submit',
2050
2382
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.believe.BelieveSubmitParams\nimport com.believe.api.models.believe.BelieveSubmitResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: BelieveSubmitParams = BelieveSubmitParams.builder()\n .situation("I just got passed over for a promotion I\'ve been working toward for two years.")\n .situationType(BelieveSubmitParams.SituationType.WORK_CHALLENGE)\n .build()\n val response: BelieveSubmitResponse = client.believe().submit(params)\n}',
2051
2383
  },
2384
+ php: {
2385
+ method: 'believe->submit',
2386
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->believe->submit(\n situation: 'I just got passed over for a promotion I\\'ve been working toward for two years.',\n situationType: 'work_challenge',\n context: 'I\\'ve always tried to be a team player and support my colleagues.',\n intensity: 7,\n);\n\nvar_dump($response);",
2387
+ },
2052
2388
  python: {
2053
2389
  method: 'believe.submit',
2054
2390
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.believe.submit(\n situation="I just got passed over for a promotion I\'ve been working toward for two years.",\n situation_type="work_challenge",\n)\nprint(response.action_suggestion)',
@@ -2084,6 +2420,10 @@ const EMBEDDED_METHODS = [
2084
2420
  method: 'conflicts resolve',
2085
2421
  example: "believe conflicts resolve \\\n --api-key 'My API Key' \\\n --conflict-type interpersonal \\\n --description \"Alex keeps taking credit for my ideas in meetings and I'm getting resentful.\" \\\n --parties-involved Me \\\n --parties-involved 'My teammate Alex'",
2086
2422
  },
2423
+ csharp: {
2424
+ method: 'Conflicts.Resolve',
2425
+ example: 'ConflictResolveParams parameters = new()\n{\n ConflictType = ConflictType.Interpersonal,\n Description = "Alex keeps taking credit for my ideas in meetings and I\'m getting resentful.",\n PartiesInvolved =\n [\n "Me", "My teammate Alex"\n ],\n};\n\nvar response = await client.Conflicts.Resolve(parameters);\n\nConsole.WriteLine(response);',
2426
+ },
2087
2427
  go: {
2088
2428
  method: 'client.Conflicts.Resolve',
2089
2429
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Conflicts.Resolve(context.TODO(), believe.ConflictResolveParams{\n\t\tConflictType: believe.ConflictResolveParamsConflictTypeInterpersonal,\n\t\tDescription: "Alex keeps taking credit for my ideas in meetings and I\'m getting resentful.",\n\t\tPartiesInvolved: []string{"Me", "My teammate Alex"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.BarbecueSauceWisdom)\n}\n',
@@ -2099,6 +2439,10 @@ const EMBEDDED_METHODS = [
2099
2439
  method: 'conflicts().resolve',
2100
2440
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.conflicts.ConflictResolveParams\nimport com.believe.api.models.conflicts.ConflictResolveResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: ConflictResolveParams = ConflictResolveParams.builder()\n .conflictType(ConflictResolveParams.ConflictType.INTERPERSONAL)\n .description("Alex keeps taking credit for my ideas in meetings and I\'m getting resentful.")\n .addPartiesInvolved("Me")\n .addPartiesInvolved("My teammate Alex")\n .build()\n val response: ConflictResolveResponse = client.conflicts().resolve(params)\n}',
2101
2441
  },
2442
+ php: {
2443
+ method: 'conflicts->resolve',
2444
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->conflicts->resolve(\n conflictType: 'interpersonal',\n description: 'Alex keeps taking credit for my ideas in meetings and I\\'m getting resentful.',\n partiesInvolved: ['Me', 'My teammate Alex'],\n attemptsMade: ['Mentioned it casually', 'Avoided them'],\n);\n\nvar_dump($response);",
2445
+ },
2102
2446
  python: {
2103
2447
  method: 'conflicts.resolve',
2104
2448
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.conflicts.resolve(\n conflict_type="interpersonal",\n description="Alex keeps taking credit for my ideas in meetings and I\'m getting resentful.",\n parties_involved=["Me", "My teammate Alex"],\n)\nprint(response.barbecue_sauce_wisdom)',
@@ -2129,6 +2473,10 @@ const EMBEDDED_METHODS = [
2129
2473
  method: 'reframe transform_negative_thoughts',
2130
2474
  example: "believe reframe transform-negative-thoughts \\\n --api-key 'My API Key' \\\n --negative-thought \"I'm not good enough for this job.\"",
2131
2475
  },
2476
+ csharp: {
2477
+ method: 'Reframe.TransformNegativeThoughts',
2478
+ example: 'ReframeTransformNegativeThoughtsParams parameters = new()\n{\n NegativeThought = "I\'m not good enough for this job."\n};\n\nvar response = await client.Reframe.TransformNegativeThoughts(parameters);\n\nConsole.WriteLine(response);',
2479
+ },
2132
2480
  go: {
2133
2481
  method: 'client.Reframe.TransformNegativeThoughts',
2134
2482
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Reframe.TransformNegativeThoughts(context.TODO(), believe.ReframeTransformNegativeThoughtsParams{\n\t\tNegativeThought: "I\'m not good enough for this job.",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DailyAffirmation)\n}\n',
@@ -2144,6 +2492,10 @@ const EMBEDDED_METHODS = [
2144
2492
  method: 'reframe().transformNegativeThoughts',
2145
2493
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.reframe.ReframeTransformNegativeThoughtsParams\nimport com.believe.api.models.reframe.ReframeTransformNegativeThoughtsResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: ReframeTransformNegativeThoughtsParams = ReframeTransformNegativeThoughtsParams.builder()\n .negativeThought("I\'m not good enough for this job.")\n .build()\n val response: ReframeTransformNegativeThoughtsResponse = client.reframe().transformNegativeThoughts(params)\n}',
2146
2494
  },
2495
+ php: {
2496
+ method: 'reframe->transformNegativeThoughts',
2497
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->reframe->transformNegativeThoughts(\n negativeThought: 'I\\'m not good enough for this job.', recurring: true\n);\n\nvar_dump($response);",
2498
+ },
2147
2499
  python: {
2148
2500
  method: 'reframe.transform_negative_thoughts',
2149
2501
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.reframe.transform_negative_thoughts(\n negative_thought="I\'m not good enough for this job.",\n)\nprint(response.daily_affirmation)',
@@ -2174,6 +2526,10 @@ const EMBEDDED_METHODS = [
2174
2526
  method: 'press simulate',
2175
2527
  example: "believe press simulate \\\n --api-key 'My API Key' \\\n --question 'Ted, your team just lost 5-0. How do you explain this embarrassing defeat?'",
2176
2528
  },
2529
+ csharp: {
2530
+ method: 'Press.Simulate',
2531
+ example: 'PressSimulateParams parameters = new()\n{\n Question = "Ted, your team just lost 5-0. How do you explain this embarrassing defeat?",\n};\n\nvar response = await client.Press.Simulate(parameters);\n\nConsole.WriteLine(response);',
2532
+ },
2177
2533
  go: {
2178
2534
  method: 'client.Press.Simulate',
2179
2535
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Press.Simulate(context.TODO(), believe.PressSimulateParams{\n\t\tQuestion: "Ted, your team just lost 5-0. How do you explain this embarrassing defeat?",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ActualWisdom)\n}\n',
@@ -2189,6 +2545,10 @@ const EMBEDDED_METHODS = [
2189
2545
  method: 'press().simulate',
2190
2546
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.press.PressSimulateParams\nimport com.believe.api.models.press.PressSimulateResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: PressSimulateParams = PressSimulateParams.builder()\n .question("Ted, your team just lost 5-0. How do you explain this embarrassing defeat?")\n .build()\n val response: PressSimulateResponse = client.press().simulate(params)\n}',
2191
2547
  },
2548
+ php: {
2549
+ method: 'press->simulate',
2550
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->press->simulate(\n question: 'Ted, your team just lost 5-0. How do you explain this embarrassing defeat?',\n hostile: true,\n topic: 'match_result',\n);\n\nvar_dump($response);",
2551
+ },
2192
2552
  python: {
2193
2553
  method: 'press.simulate',
2194
2554
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.press.simulate(\n question="Ted, your team just lost 5-0. How do you explain this embarrassing defeat?",\n)\nprint(response.actual_wisdom)',
@@ -2219,6 +2579,10 @@ const EMBEDDED_METHODS = [
2219
2579
  method: 'principles list',
2220
2580
  example: "believe coaching:principles list \\\n --api-key 'My API Key'",
2221
2581
  },
2582
+ csharp: {
2583
+ method: 'Coaching.Principles.List',
2584
+ example: 'PrincipleListParams parameters = new();\n\nvar page = await client.Coaching.Principles.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2585
+ },
2222
2586
  go: {
2223
2587
  method: 'client.Coaching.Principles.List',
2224
2588
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Coaching.Principles.List(context.TODO(), believe.CoachingPrincipleListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2234,6 +2598,10 @@ const EMBEDDED_METHODS = [
2234
2598
  method: 'coaching().principles().list',
2235
2599
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.coaching.principles.PrincipleListPage\nimport com.believe.api.models.coaching.principles.PrincipleListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: PrincipleListPage = client.coaching().principles().list()\n}',
2236
2600
  },
2601
+ php: {
2602
+ method: 'coaching->principles->list',
2603
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->coaching->principles->list(limit: 10, skip: 0);\n\nvar_dump($page);",
2604
+ },
2237
2605
  python: {
2238
2606
  method: 'coaching.principles.list',
2239
2607
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.coaching.principles.list()\npage = page.data[0]\nprint(page.id)',
@@ -2264,6 +2632,10 @@ const EMBEDDED_METHODS = [
2264
2632
  method: 'principles retrieve',
2265
2633
  example: "believe coaching:principles retrieve \\\n --api-key 'My API Key' \\\n --principle-id principle_id",
2266
2634
  },
2635
+ csharp: {
2636
+ method: 'Coaching.Principles.Retrieve',
2637
+ example: 'PrincipleRetrieveParams parameters = new() { PrincipleID = "principle_id" };\n\nvar coachingPrinciple = await client.Coaching.Principles.Retrieve(parameters);\n\nConsole.WriteLine(coachingPrinciple);',
2638
+ },
2267
2639
  go: {
2268
2640
  method: 'client.Coaching.Principles.Get',
2269
2641
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcoachingPrinciple, err := client.Coaching.Principles.Get(context.TODO(), "principle_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", coachingPrinciple.ID)\n}\n',
@@ -2279,6 +2651,10 @@ const EMBEDDED_METHODS = [
2279
2651
  method: 'coaching().principles().retrieve',
2280
2652
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.coaching.principles.CoachingPrinciple\nimport com.believe.api.models.coaching.principles.PrincipleRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val coachingPrinciple: CoachingPrinciple = client.coaching().principles().retrieve("principle_id")\n}',
2281
2653
  },
2654
+ php: {
2655
+ method: 'coaching->principles->retrieve',
2656
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$coachingPrinciple = $client->coaching->principles->retrieve('principle_id');\n\nvar_dump($coachingPrinciple);",
2657
+ },
2282
2658
  python: {
2283
2659
  method: 'coaching.principles.retrieve',
2284
2660
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\ncoaching_principle = client.coaching.principles.retrieve(\n "principle_id",\n)\nprint(coaching_principle.id)',
@@ -2308,6 +2684,10 @@ const EMBEDDED_METHODS = [
2308
2684
  method: 'principles get_random',
2309
2685
  example: "believe coaching:principles get-random \\\n --api-key 'My API Key'",
2310
2686
  },
2687
+ csharp: {
2688
+ method: 'Coaching.Principles.GetRandom',
2689
+ example: 'PrincipleGetRandomParams parameters = new();\n\nvar coachingPrinciple = await client.Coaching.Principles.GetRandom(parameters);\n\nConsole.WriteLine(coachingPrinciple);',
2690
+ },
2311
2691
  go: {
2312
2692
  method: 'client.Coaching.Principles.GetRandom',
2313
2693
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcoachingPrinciple, err := client.Coaching.Principles.GetRandom(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", coachingPrinciple.ID)\n}\n',
@@ -2323,6 +2703,10 @@ const EMBEDDED_METHODS = [
2323
2703
  method: 'coaching().principles().getRandom',
2324
2704
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.coaching.principles.CoachingPrinciple\nimport com.believe.api.models.coaching.principles.PrincipleGetRandomParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val coachingPrinciple: CoachingPrinciple = client.coaching().principles().getRandom()\n}',
2325
2705
  },
2706
+ php: {
2707
+ method: 'coaching->principles->getRandom',
2708
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$coachingPrinciple = $client->coaching->principles->getRandom();\n\nvar_dump($coachingPrinciple);",
2709
+ },
2326
2710
  python: {
2327
2711
  method: 'coaching.principles.get_random',
2328
2712
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\ncoaching_principle = client.coaching.principles.get_random()\nprint(coaching_principle.id)',
@@ -2353,6 +2737,10 @@ const EMBEDDED_METHODS = [
2353
2737
  method: 'biscuits list',
2354
2738
  example: "believe biscuits list \\\n --api-key 'My API Key'",
2355
2739
  },
2740
+ csharp: {
2741
+ method: 'Biscuits.List',
2742
+ example: 'BiscuitListParams parameters = new();\n\nvar page = await client.Biscuits.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2743
+ },
2356
2744
  go: {
2357
2745
  method: 'client.Biscuits.List',
2358
2746
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Biscuits.List(context.TODO(), believe.BiscuitListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2368,6 +2756,10 @@ const EMBEDDED_METHODS = [
2368
2756
  method: 'biscuits().list',
2369
2757
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.biscuits.BiscuitListPage\nimport com.believe.api.models.biscuits.BiscuitListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: BiscuitListPage = client.biscuits().list()\n}',
2370
2758
  },
2759
+ php: {
2760
+ method: 'biscuits->list',
2761
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->biscuits->list(limit: 10, skip: 0);\n\nvar_dump($page);",
2762
+ },
2371
2763
  python: {
2372
2764
  method: 'biscuits.list',
2373
2765
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.biscuits.list()\npage = page.data[0]\nprint(page.id)',
@@ -2397,6 +2789,10 @@ const EMBEDDED_METHODS = [
2397
2789
  method: 'biscuits get_fresh',
2398
2790
  example: "believe biscuits get-fresh \\\n --api-key 'My API Key'",
2399
2791
  },
2792
+ csharp: {
2793
+ method: 'Biscuits.GetFresh',
2794
+ example: 'BiscuitGetFreshParams parameters = new();\n\nvar biscuit = await client.Biscuits.GetFresh(parameters);\n\nConsole.WriteLine(biscuit);',
2795
+ },
2400
2796
  go: {
2401
2797
  method: 'client.Biscuits.GetFresh',
2402
2798
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tbiscuit, err := client.Biscuits.GetFresh(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", biscuit.ID)\n}\n',
@@ -2412,6 +2808,10 @@ const EMBEDDED_METHODS = [
2412
2808
  method: 'biscuits().getFresh',
2413
2809
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.biscuits.Biscuit\nimport com.believe.api.models.biscuits.BiscuitGetFreshParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val biscuit: Biscuit = client.biscuits().getFresh()\n}',
2414
2810
  },
2811
+ php: {
2812
+ method: 'biscuits->getFresh',
2813
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$biscuit = $client->biscuits->getFresh();\n\nvar_dump($biscuit);",
2814
+ },
2415
2815
  python: {
2416
2816
  method: 'biscuits.get_fresh',
2417
2817
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nbiscuit = client.biscuits.get_fresh()\nprint(biscuit.id)',
@@ -2442,6 +2842,10 @@ const EMBEDDED_METHODS = [
2442
2842
  method: 'biscuits retrieve',
2443
2843
  example: "believe biscuits retrieve \\\n --api-key 'My API Key' \\\n --biscuit-id biscuit_id",
2444
2844
  },
2845
+ csharp: {
2846
+ method: 'Biscuits.Retrieve',
2847
+ example: 'BiscuitRetrieveParams parameters = new() { BiscuitID = "biscuit_id" };\n\nvar biscuit = await client.Biscuits.Retrieve(parameters);\n\nConsole.WriteLine(biscuit);',
2848
+ },
2445
2849
  go: {
2446
2850
  method: 'client.Biscuits.Get',
2447
2851
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tbiscuit, err := client.Biscuits.Get(context.TODO(), "biscuit_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", biscuit.ID)\n}\n',
@@ -2457,6 +2861,10 @@ const EMBEDDED_METHODS = [
2457
2861
  method: 'biscuits().retrieve',
2458
2862
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.biscuits.Biscuit\nimport com.believe.api.models.biscuits.BiscuitRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val biscuit: Biscuit = client.biscuits().retrieve("biscuit_id")\n}',
2459
2863
  },
2864
+ php: {
2865
+ method: 'biscuits->retrieve',
2866
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$biscuit = $client->biscuits->retrieve('biscuit_id');\n\nvar_dump($biscuit);",
2867
+ },
2460
2868
  python: {
2461
2869
  method: 'biscuits.retrieve',
2462
2870
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nbiscuit = client.biscuits.retrieve(\n "biscuit_id",\n)\nprint(biscuit.id)',
@@ -2487,6 +2895,10 @@ const EMBEDDED_METHODS = [
2487
2895
  method: 'pep_talk retrieve',
2488
2896
  example: "believe pep-talk retrieve \\\n --api-key 'My API Key'",
2489
2897
  },
2898
+ csharp: {
2899
+ method: 'PepTalk.Retrieve',
2900
+ example: 'PepTalkRetrieveParams parameters = new();\n\nvar pepTalk = await client.PepTalk.Retrieve(parameters);\n\nConsole.WriteLine(pepTalk);',
2901
+ },
2490
2902
  go: {
2491
2903
  method: 'client.PepTalk.Get',
2492
2904
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpepTalk, err := client.PepTalk.Get(context.TODO(), believe.PepTalkGetParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pepTalk.Chunks)\n}\n',
@@ -2502,6 +2914,10 @@ const EMBEDDED_METHODS = [
2502
2914
  method: 'pepTalk().retrieve',
2503
2915
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.peptalk.PepTalkRetrieveParams\nimport com.believe.api.models.peptalk.PepTalkRetrieveResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val pepTalk: PepTalkRetrieveResponse = client.pepTalk().retrieve()\n}',
2504
2916
  },
2917
+ php: {
2918
+ method: 'pepTalk->retrieve',
2919
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$pepTalk = $client->pepTalk->retrieve(stream: true);\n\nvar_dump($pepTalk);",
2920
+ },
2505
2921
  python: {
2506
2922
  method: 'pep_talk.retrieve',
2507
2923
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npep_talk = client.pep_talk.retrieve()\nprint(pep_talk.chunks)',
@@ -2531,6 +2947,10 @@ const EMBEDDED_METHODS = [
2531
2947
  method: 'stream test_connection',
2532
2948
  example: "believe stream test-connection \\\n --api-key 'My API Key'",
2533
2949
  },
2950
+ csharp: {
2951
+ method: 'Stream.TestConnection',
2952
+ example: 'StreamTestConnectionParams parameters = new();\n\nvar response = await client.Stream.TestConnection(parameters);\n\nConsole.WriteLine(response);',
2953
+ },
2534
2954
  go: {
2535
2955
  method: 'client.Stream.TestConnection',
2536
2956
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Stream.TestConnection(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -2546,6 +2966,10 @@ const EMBEDDED_METHODS = [
2546
2966
  method: 'stream().testConnection',
2547
2967
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.stream.StreamTestConnectionParams\nimport com.believe.api.models.stream.StreamTestConnectionResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: StreamTestConnectionResponse = client.stream().testConnection()\n}',
2548
2968
  },
2969
+ php: {
2970
+ method: 'stream->testConnection',
2971
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->stream->testConnection();\n\nvar_dump($response);",
2972
+ },
2549
2973
  python: {
2550
2974
  method: 'stream.test_connection',
2551
2975
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.stream.test_connection()\nprint(response)',
@@ -2581,6 +3005,10 @@ const EMBEDDED_METHODS = [
2581
3005
  method: 'team_members list',
2582
3006
  example: "believe team-members list \\\n --api-key 'My API Key'",
2583
3007
  },
3008
+ csharp: {
3009
+ method: 'TeamMembers.List',
3010
+ example: 'TeamMemberListParams parameters = new();\n\nvar page = await client.TeamMembers.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
3011
+ },
2584
3012
  go: {
2585
3013
  method: 'client.TeamMembers.List',
2586
3014
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.TeamMembers.List(context.TODO(), believe.TeamMemberListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2596,6 +3024,10 @@ const EMBEDDED_METHODS = [
2596
3024
  method: 'teamMembers().list',
2597
3025
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberListPage\nimport com.believe.api.models.teammembers.TeamMemberListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: TeamMemberListPage = client.teamMembers().list()\n}',
2598
3026
  },
3027
+ php: {
3028
+ method: 'teamMembers->list',
3029
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->teamMembers->list(\n limit: 10, memberType: 'player', skip: 0, teamID: 'team_id'\n);\n\nvar_dump($page);",
3030
+ },
2599
3031
  python: {
2600
3032
  method: 'team_members.list',
2601
3033
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.team_members.list()\npage = page.data[0]\nprint(page)',
@@ -2628,6 +3060,10 @@ const EMBEDDED_METHODS = [
2628
3060
  method: 'team_members create',
2629
3061
  example: "believe team-members create \\\n --api-key 'My API Key' \\\n --member '{character_id: jamie-tartt, jersey_number: 9, position: forward, team_id: afc-richmond, years_with_team: 3, member_type: player}'",
2630
3062
  },
3063
+ csharp: {
3064
+ method: 'TeamMembers.Create',
3065
+ example: 'TeamMemberCreateParams parameters = new()\n{\n Member = new Player()\n {\n CharacterID = "jamie-tartt",\n JerseyNumber = 9,\n Position = Position.Forward,\n TeamID = "afc-richmond",\n YearsWithTeam = 3,\n Assists = 23,\n GoalsScored = 47,\n IsCaptain = false,\n MemberType = MemberType.Player,\n },\n};\n\nvar teamMember = await client.TeamMembers.Create(parameters);\n\nConsole.WriteLine(teamMember);',
3066
+ },
2631
3067
  go: {
2632
3068
  method: 'client.TeamMembers.New',
2633
3069
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteamMember, err := client.TeamMembers.New(context.TODO(), believe.TeamMemberNewParams{\n\t\tOfPlayer: &believe.TeamMemberNewParamsMemberPlayer{\n\t\t\tCharacterID: "jamie-tartt",\n\t\t\tJerseyNumber: 9,\n\t\t\tPosition: believe.PositionForward,\n\t\t\tTeamID: "afc-richmond",\n\t\t\tYearsWithTeam: 3,\n\t\t\tMemberType: "player",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", teamMember)\n}\n',
@@ -2643,6 +3079,10 @@ const EMBEDDED_METHODS = [
2643
3079
  method: 'teamMembers().create',
2644
3080
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.Position\nimport com.believe.api.models.teammembers.TeamMemberCreateParams\nimport com.believe.api.models.teammembers.TeamMemberCreateResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: TeamMemberCreateParams.Member.Player = TeamMemberCreateParams.Member.Player.builder()\n .characterId("jamie-tartt")\n .jerseyNumber(9L)\n .position(Position.FORWARD)\n .teamId("afc-richmond")\n .yearsWithTeam(3L)\n .memberType(TeamMemberCreateParams.Member.Player.MemberType.PLAYER)\n .build()\n val teamMember: TeamMemberCreateResponse = client.teamMembers().create(params)\n}',
2645
3081
  },
3082
+ php: {
3083
+ method: 'teamMembers->create',
3084
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$teamMember = $client->teamMembers->create(\n member: [\n 'characterID' => 'jamie-tartt',\n 'jerseyNumber' => 9,\n 'position' => Position::FORWARD,\n 'teamID' => 'afc-richmond',\n 'yearsWithTeam' => 3,\n 'assists' => 23,\n 'goalsScored' => 47,\n 'isCaptain' => false,\n 'memberType' => 'player',\n ],\n);\n\nvar_dump($teamMember);",
3085
+ },
2646
3086
  python: {
2647
3087
  method: 'team_members.create',
2648
3088
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteam_member = client.team_members.create(\n member={\n "character_id": "jamie-tartt",\n "jersey_number": 9,\n "position": "forward",\n "team_id": "afc-richmond",\n "years_with_team": 3,\n "member_type": "player",\n },\n)\nprint(team_member)',
@@ -2673,6 +3113,10 @@ const EMBEDDED_METHODS = [
2673
3113
  method: 'team_members retrieve',
2674
3114
  example: "believe team-members retrieve \\\n --api-key 'My API Key' \\\n --member-id member_id",
2675
3115
  },
3116
+ csharp: {
3117
+ method: 'TeamMembers.Retrieve',
3118
+ example: 'TeamMemberRetrieveParams parameters = new() { MemberID = "member_id" };\n\nvar teamMember = await client.TeamMembers.Retrieve(parameters);\n\nConsole.WriteLine(teamMember);',
3119
+ },
2676
3120
  go: {
2677
3121
  method: 'client.TeamMembers.Get',
2678
3122
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteamMember, err := client.TeamMembers.Get(context.TODO(), "member_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", teamMember)\n}\n',
@@ -2688,6 +3132,10 @@ const EMBEDDED_METHODS = [
2688
3132
  method: 'teamMembers().retrieve',
2689
3133
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberRetrieveParams\nimport com.believe.api.models.teammembers.TeamMemberRetrieveResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val teamMember: TeamMemberRetrieveResponse = client.teamMembers().retrieve("member_id")\n}',
2690
3134
  },
3135
+ php: {
3136
+ method: 'teamMembers->retrieve',
3137
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$teamMember = $client->teamMembers->retrieve('member_id');\n\nvar_dump($teamMember);",
3138
+ },
2691
3139
  python: {
2692
3140
  method: 'team_members.retrieve',
2693
3141
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteam_member = client.team_members.retrieve(\n "member_id",\n)\nprint(team_member)',
@@ -2721,6 +3169,10 @@ const EMBEDDED_METHODS = [
2721
3169
  method: 'team_members update',
2722
3170
  example: "believe team-members update \\\n --api-key 'My API Key' \\\n --member-id member_id \\\n --updates '{}'",
2723
3171
  },
3172
+ csharp: {
3173
+ method: 'TeamMembers.Update',
3174
+ example: 'TeamMemberUpdateParams parameters = new()\n{\n MemberID = "member_id",\n Updates = new PlayerUpdate()\n {\n Assists = 0,\n GoalsScored = 0,\n IsCaptain = true,\n JerseyNumber = 1,\n Position = Position.Goalkeeper,\n TeamID = "team_id",\n YearsWithTeam = 0,\n },\n};\n\nvar teamMember = await client.TeamMembers.Update(parameters);\n\nConsole.WriteLine(teamMember);',
3175
+ },
2724
3176
  go: {
2725
3177
  method: 'client.TeamMembers.Update',
2726
3178
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tteamMember, err := client.TeamMembers.Update(\n\t\tcontext.TODO(),\n\t\t"member_id",\n\t\tbelieve.TeamMemberUpdateParams{\n\t\t\tOfPlayerUpdate: &believe.TeamMemberUpdateParamsUpdatesPlayerUpdate{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", teamMember)\n}\n',
@@ -2736,6 +3188,10 @@ const EMBEDDED_METHODS = [
2736
3188
  method: 'teamMembers().update',
2737
3189
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberUpdateParams\nimport com.believe.api.models.teammembers.TeamMemberUpdateResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: TeamMemberUpdateParams = TeamMemberUpdateParams.builder()\n .memberId("member_id")\n .updates(TeamMemberUpdateParams.Updates.PlayerUpdate.builder().build())\n .build()\n val teamMember: TeamMemberUpdateResponse = client.teamMembers().update(params)\n}',
2738
3190
  },
3191
+ php: {
3192
+ method: 'teamMembers->update',
3193
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$teamMember = $client->teamMembers->update(\n 'member_id',\n updates: [\n 'assists' => 0,\n 'goalsScored' => 0,\n 'isCaptain' => true,\n 'jerseyNumber' => 1,\n 'position' => Position::GOALKEEPER,\n 'teamID' => 'team_id',\n 'yearsWithTeam' => 0,\n ],\n);\n\nvar_dump($teamMember);",
3194
+ },
2739
3195
  python: {
2740
3196
  method: 'team_members.update',
2741
3197
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nteam_member = client.team_members.update(\n member_id="member_id",\n updates={},\n)\nprint(team_member)',
@@ -2765,6 +3221,10 @@ const EMBEDDED_METHODS = [
2765
3221
  method: 'team_members delete',
2766
3222
  example: "believe team-members delete \\\n --api-key 'My API Key' \\\n --member-id member_id",
2767
3223
  },
3224
+ csharp: {
3225
+ method: 'TeamMembers.Delete',
3226
+ example: 'TeamMemberDeleteParams parameters = new() { MemberID = "member_id" };\n\nawait client.TeamMembers.Delete(parameters);',
3227
+ },
2768
3228
  go: {
2769
3229
  method: 'client.TeamMembers.Delete',
2770
3230
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.TeamMembers.Delete(context.TODO(), "member_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -2780,6 +3240,10 @@ const EMBEDDED_METHODS = [
2780
3240
  method: 'teamMembers().delete',
2781
3241
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.teamMembers().delete("member_id")\n}',
2782
3242
  },
3243
+ php: {
3244
+ method: 'teamMembers->delete',
3245
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->teamMembers->delete('member_id');\n\nvar_dump($result);",
3246
+ },
2783
3247
  python: {
2784
3248
  method: 'team_members.delete',
2785
3249
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.team_members.delete(\n "member_id",\n)',
@@ -2815,6 +3279,10 @@ const EMBEDDED_METHODS = [
2815
3279
  method: 'team_members list_players',
2816
3280
  example: "believe team-members list-players \\\n --api-key 'My API Key'",
2817
3281
  },
3282
+ csharp: {
3283
+ method: 'TeamMembers.ListPlayers',
3284
+ example: 'TeamMemberListPlayersParams parameters = new();\n\nvar page = await client.TeamMembers.ListPlayers(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
3285
+ },
2818
3286
  go: {
2819
3287
  method: 'client.TeamMembers.ListPlayers',
2820
3288
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.TeamMembers.ListPlayers(context.TODO(), believe.TeamMemberListPlayersParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2830,6 +3298,10 @@ const EMBEDDED_METHODS = [
2830
3298
  method: 'teamMembers().listPlayers',
2831
3299
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberListPlayersPage\nimport com.believe.api.models.teammembers.TeamMemberListPlayersParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: TeamMemberListPlayersPage = client.teamMembers().listPlayers()\n}',
2832
3300
  },
3301
+ php: {
3302
+ method: 'teamMembers->listPlayers',
3303
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->teamMembers->listPlayers(\n limit: 10, position: Position::GOALKEEPER, skip: 0, teamID: 'team_id'\n);\n\nvar_dump($page);",
3304
+ },
2833
3305
  python: {
2834
3306
  method: 'team_members.list_players',
2835
3307
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.team_members.list_players()\npage = page.data[0]\nprint(page.id)',
@@ -2865,6 +3337,10 @@ const EMBEDDED_METHODS = [
2865
3337
  method: 'team_members list_coaches',
2866
3338
  example: "believe team-members list-coaches \\\n --api-key 'My API Key'",
2867
3339
  },
3340
+ csharp: {
3341
+ method: 'TeamMembers.ListCoaches',
3342
+ example: 'TeamMemberListCoachesParams parameters = new();\n\nvar page = await client.TeamMembers.ListCoaches(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
3343
+ },
2868
3344
  go: {
2869
3345
  method: 'client.TeamMembers.ListCoaches',
2870
3346
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.TeamMembers.ListCoaches(context.TODO(), believe.TeamMemberListCoachesParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2880,6 +3356,10 @@ const EMBEDDED_METHODS = [
2880
3356
  method: 'teamMembers().listCoaches',
2881
3357
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberListCoachesPage\nimport com.believe.api.models.teammembers.TeamMemberListCoachesParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: TeamMemberListCoachesPage = client.teamMembers().listCoaches()\n}',
2882
3358
  },
3359
+ php: {
3360
+ method: 'teamMembers->listCoaches',
3361
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->teamMembers->listCoaches(\n limit: 10, skip: 0, specialty: CoachSpecialty::HEAD_COACH, teamID: 'team_id'\n);\n\nvar_dump($page);",
3362
+ },
2883
3363
  python: {
2884
3364
  method: 'team_members.list_coaches',
2885
3365
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.team_members.list_coaches()\npage = page.data[0]\nprint(page.id)',
@@ -2910,6 +3390,10 @@ const EMBEDDED_METHODS = [
2910
3390
  method: 'team_members list_staff',
2911
3391
  example: "believe team-members list-staff \\\n --api-key 'My API Key'",
2912
3392
  },
3393
+ csharp: {
3394
+ method: 'TeamMembers.ListStaff',
3395
+ example: 'TeamMemberListStaffParams parameters = new();\n\nvar page = await client.TeamMembers.ListStaff(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
3396
+ },
2913
3397
  go: {
2914
3398
  method: 'client.TeamMembers.ListStaff',
2915
3399
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.TeamMembers.ListStaff(context.TODO(), believe.TeamMemberListStaffParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -2925,6 +3409,10 @@ const EMBEDDED_METHODS = [
2925
3409
  method: 'teamMembers().listStaff',
2926
3410
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.teammembers.TeamMemberListStaffPage\nimport com.believe.api.models.teammembers.TeamMemberListStaffParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: TeamMemberListStaffPage = client.teamMembers().listStaff()\n}',
2927
3411
  },
3412
+ php: {
3413
+ method: 'teamMembers->listStaff',
3414
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->teamMembers->listStaff(limit: 10, skip: 0, teamID: 'team_id');\n\nvar_dump($page);",
3415
+ },
2928
3416
  python: {
2929
3417
  method: 'team_members.list_staff',
2930
3418
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.team_members.list_staff()\npage = page.data[0]\nprint(page)',
@@ -2954,6 +3442,10 @@ const EMBEDDED_METHODS = [
2954
3442
  method: 'webhooks list',
2955
3443
  example: "believe webhooks list \\\n --api-key 'My API Key'",
2956
3444
  },
3445
+ csharp: {
3446
+ method: 'Webhooks.List',
3447
+ example: 'WebhookListParams parameters = new();\n\nvar registeredWebhooks = await client.Webhooks.List(parameters);\n\nConsole.WriteLine(registeredWebhooks);',
3448
+ },
2957
3449
  go: {
2958
3450
  method: 'client.Webhooks.List',
2959
3451
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tregisteredWebhooks, err := client.Webhooks.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", registeredWebhooks)\n}\n',
@@ -2969,6 +3461,10 @@ const EMBEDDED_METHODS = [
2969
3461
  method: 'webhooks().list',
2970
3462
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.webhooks.RegisteredWebhook\nimport com.believe.api.models.webhooks.WebhookListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val registeredWebhooks: List<RegisteredWebhook> = client.webhooks().list()\n}',
2971
3463
  },
3464
+ php: {
3465
+ method: 'webhooks->list',
3466
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$registeredWebhooks = $client->webhooks->list();\n\nvar_dump($registeredWebhooks);",
3467
+ },
2972
3468
  python: {
2973
3469
  method: 'webhooks.list',
2974
3470
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nregistered_webhooks = client.webhooks.list()\nprint(registered_webhooks)',
@@ -3003,6 +3499,10 @@ const EMBEDDED_METHODS = [
3003
3499
  method: 'webhooks create',
3004
3500
  example: "believe webhooks create \\\n --api-key 'My API Key' \\\n --url https://example.com/webhooks",
3005
3501
  },
3502
+ csharp: {
3503
+ method: 'Webhooks.Create',
3504
+ example: 'WebhookCreateParams parameters = new() { Url = "https://example.com/webhooks" };\n\nvar webhook = await client.Webhooks.Create(parameters);\n\nConsole.WriteLine(webhook);',
3505
+ },
3006
3506
  go: {
3007
3507
  method: 'client.Webhooks.New',
3008
3508
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\twebhook, err := client.Webhooks.New(context.TODO(), believe.WebhookNewParams{\n\t\tURL: "https://example.com/webhooks",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", webhook.Webhook)\n}\n',
@@ -3018,6 +3518,10 @@ const EMBEDDED_METHODS = [
3018
3518
  method: 'webhooks().create',
3019
3519
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.webhooks.WebhookCreateParams\nimport com.believe.api.models.webhooks.WebhookCreateResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: WebhookCreateParams = WebhookCreateParams.builder()\n .url("https://example.com/webhooks")\n .build()\n val webhook: WebhookCreateResponse = client.webhooks().create(params)\n}',
3020
3520
  },
3521
+ php: {
3522
+ method: 'webhooks->create',
3523
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$webhook = $client->webhooks->create(\n url: 'https://example.com/webhooks',\n description: 'Production webhook for match notifications',\n eventTypes: ['match.completed', 'team_member.transferred'],\n);\n\nvar_dump($webhook);",
3524
+ },
3021
3525
  python: {
3022
3526
  method: 'webhooks.create',
3023
3527
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nwebhook = client.webhooks.create(\n url="https://example.com/webhooks",\n)\nprint(webhook.webhook)',
@@ -3048,6 +3552,10 @@ const EMBEDDED_METHODS = [
3048
3552
  method: 'webhooks retrieve',
3049
3553
  example: "believe webhooks retrieve \\\n --api-key 'My API Key' \\\n --webhook-id webhook_id",
3050
3554
  },
3555
+ csharp: {
3556
+ method: 'Webhooks.Retrieve',
3557
+ example: 'WebhookRetrieveParams parameters = new() { WebhookID = "webhook_id" };\n\nvar registeredWebhook = await client.Webhooks.Retrieve(parameters);\n\nConsole.WriteLine(registeredWebhook);',
3558
+ },
3051
3559
  go: {
3052
3560
  method: 'client.Webhooks.Get',
3053
3561
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tregisteredWebhook, err := client.Webhooks.Get(context.TODO(), "webhook_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", registeredWebhook.ID)\n}\n',
@@ -3063,6 +3571,10 @@ const EMBEDDED_METHODS = [
3063
3571
  method: 'webhooks().retrieve',
3064
3572
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.webhooks.RegisteredWebhook\nimport com.believe.api.models.webhooks.WebhookRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val registeredWebhook: RegisteredWebhook = client.webhooks().retrieve("webhook_id")\n}',
3065
3573
  },
3574
+ php: {
3575
+ method: 'webhooks->retrieve',
3576
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$registeredWebhook = $client->webhooks->retrieve('webhook_id');\n\nvar_dump($registeredWebhook);",
3577
+ },
3066
3578
  python: {
3067
3579
  method: 'webhooks.retrieve',
3068
3580
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nregistered_webhook = client.webhooks.retrieve(\n "webhook_id",\n)\nprint(registered_webhook.id)',
@@ -3093,6 +3605,10 @@ const EMBEDDED_METHODS = [
3093
3605
  method: 'webhooks delete',
3094
3606
  example: "believe webhooks delete \\\n --api-key 'My API Key' \\\n --webhook-id webhook_id",
3095
3607
  },
3608
+ csharp: {
3609
+ method: 'Webhooks.Delete',
3610
+ example: 'WebhookDeleteParams parameters = new() { WebhookID = "webhook_id" };\n\nvar webhook = await client.Webhooks.Delete(parameters);\n\nConsole.WriteLine(webhook);',
3611
+ },
3096
3612
  go: {
3097
3613
  method: 'client.Webhooks.Delete',
3098
3614
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\twebhook, err := client.Webhooks.Delete(context.TODO(), "webhook_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", webhook)\n}\n',
@@ -3108,6 +3624,10 @@ const EMBEDDED_METHODS = [
3108
3624
  method: 'webhooks().delete',
3109
3625
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.webhooks.WebhookDeleteParams\nimport com.believe.api.models.webhooks.WebhookDeleteResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val webhook: WebhookDeleteResponse = client.webhooks().delete("webhook_id")\n}',
3110
3626
  },
3627
+ php: {
3628
+ method: 'webhooks->delete',
3629
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$webhook = $client->webhooks->delete('webhook_id');\n\nvar_dump($webhook);",
3630
+ },
3111
3631
  python: {
3112
3632
  method: 'webhooks.delete',
3113
3633
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nwebhook = client.webhooks.delete(\n "webhook_id",\n)\nprint(webhook)',
@@ -3141,6 +3661,10 @@ const EMBEDDED_METHODS = [
3141
3661
  method: 'webhooks trigger_event',
3142
3662
  example: "believe webhooks trigger-event \\\n --api-key 'My API Key' \\\n --event-type match.completed",
3143
3663
  },
3664
+ csharp: {
3665
+ method: 'Webhooks.TriggerEvent',
3666
+ example: 'WebhookTriggerEventParams parameters = new()\n{\n EventType = EventType.MatchCompleted\n};\n\nvar response = await client.Webhooks.TriggerEvent(parameters);\n\nConsole.WriteLine(response);',
3667
+ },
3144
3668
  go: {
3145
3669
  method: 'client.Webhooks.TriggerEvent',
3146
3670
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Webhooks.TriggerEvent(context.TODO(), believe.WebhookTriggerEventParams{\n\t\tEventType: believe.WebhookTriggerEventParamsEventTypeMatchCompleted,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.EventID)\n}\n',
@@ -3156,6 +3680,10 @@ const EMBEDDED_METHODS = [
3156
3680
  method: 'webhooks().triggerEvent',
3157
3681
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.webhooks.WebhookTriggerEventParams\nimport com.believe.api.models.webhooks.WebhookTriggerEventResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: WebhookTriggerEventParams = WebhookTriggerEventParams.builder()\n .eventType(WebhookTriggerEventParams.EventType.MATCH_COMPLETED)\n .build()\n val response: WebhookTriggerEventResponse = client.webhooks().triggerEvent(params)\n}',
3158
3682
  },
3683
+ php: {
3684
+ method: 'webhooks->triggerEvent',
3685
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->webhooks->triggerEvent(\n eventType: 'match.completed',\n payload: [\n 'data' => [\n 'awayScore' => 0,\n 'awayTeamID' => 'away_team_id',\n 'completedAt' => new \\DateTimeImmutable('2019-12-27T18:11:19.117Z'),\n 'homeScore' => 0,\n 'homeTeamID' => 'home_team_id',\n 'matchID' => 'match_id',\n 'matchType' => 'league',\n 'result' => 'home_win',\n 'tedPostMatchQuote' => 'ted_post_match_quote',\n 'lessonLearned' => 'lesson_learned',\n 'manOfTheMatch' => 'man_of_the_match',\n ],\n 'eventType' => 'match.completed',\n ],\n);\n\nvar_dump($response);",
3686
+ },
3159
3687
  python: {
3160
3688
  method: 'webhooks.trigger_event',
3161
3689
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.webhooks.trigger_event(\n event_type="match.completed",\n)\nprint(response.event_id)',
@@ -3182,6 +3710,9 @@ const EMBEDDED_METHODS = [
3182
3710
  cli: {
3183
3711
  example: "believe webhooks unwrap \\\n --api-key 'My API Key'",
3184
3712
  },
3713
+ csharp: {
3714
+ example: 'WebhookUnwrapParams parameters = new();\n\nawait client.Webhooks.Unwrap(parameters);',
3715
+ },
3185
3716
  go: {
3186
3717
  method: 'client.Webhooks.Unwrap',
3187
3718
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Webhooks.Unwrap(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -3192,6 +3723,10 @@ const EMBEDDED_METHODS = [
3192
3723
  kotlin: {
3193
3724
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.webhooks.WebhookUnwrapParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.webhooks().unwrap()\n}',
3194
3725
  },
3726
+ php: {
3727
+ method: 'webhooks->unwrap',
3728
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->webhooks->unwrap();\n\nvar_dump($result);",
3729
+ },
3195
3730
  python: {
3196
3731
  method: 'webhooks.unwrap',
3197
3732
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.webhooks.unwrap()',
@@ -3229,6 +3764,10 @@ const EMBEDDED_METHODS = [
3229
3764
  method: 'ticket_sales list',
3230
3765
  example: "believe ticket-sales list \\\n --api-key 'My API Key'",
3231
3766
  },
3767
+ csharp: {
3768
+ method: 'TicketSales.List',
3769
+ example: 'TicketSaleListParams parameters = new();\n\nvar page = await client.TicketSales.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
3770
+ },
3232
3771
  go: {
3233
3772
  method: 'client.TicketSales.List',
3234
3773
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.TicketSales.List(context.TODO(), believe.TicketSaleListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
@@ -3244,6 +3783,10 @@ const EMBEDDED_METHODS = [
3244
3783
  method: 'ticketSales().list',
3245
3784
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.ticketsales.TicketSaleListPage\nimport com.believe.api.models.ticketsales.TicketSaleListParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val page: TicketSaleListPage = client.ticketSales().list()\n}',
3246
3785
  },
3786
+ php: {
3787
+ method: 'ticketSales->list',
3788
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$page = $client->ticketSales->list(\n couponCode: 'coupon_code',\n currency: 'currency',\n limit: 10,\n matchID: 'match_id',\n purchaseMethod: PurchaseMethod::ONLINE,\n skip: 0,\n);\n\nvar_dump($page);",
3789
+ },
3247
3790
  python: {
3248
3791
  method: 'ticket_sales.list',
3249
3792
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\npage = client.ticket_sales.list()\npage = page.data[0]\nprint(page.id)',
@@ -3287,6 +3830,10 @@ const EMBEDDED_METHODS = [
3287
3830
  method: 'ticket_sales create',
3288
3831
  example: "believe ticket-sales create \\\n --api-key 'My API Key' \\\n --buyer-name 'Mae Green' \\\n --currency GBP \\\n --discount 9.00 \\\n --match-id match-001 \\\n --purchase-method online \\\n --quantity 2 \\\n --subtotal 90.00 \\\n --tax 16.20 \\\n --total 97.20 \\\n --unit-price 45.00",
3289
3832
  },
3833
+ csharp: {
3834
+ method: 'TicketSales.Create',
3835
+ example: 'TicketSaleCreateParams parameters = new()\n{\n BuyerName = "Mae Green",\n Currency = "GBP",\n Discount = "9.00",\n MatchID = "match-001",\n PurchaseMethod = PurchaseMethod.Online,\n Quantity = 2,\n Subtotal = "90.00",\n Tax = "16.20",\n Total = "97.20",\n UnitPrice = "45.00",\n};\n\nvar ticketSale = await client.TicketSales.Create(parameters);\n\nConsole.WriteLine(ticketSale);',
3836
+ },
3290
3837
  go: {
3291
3838
  method: 'client.TicketSales.New',
3292
3839
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tticketSale, err := client.TicketSales.New(context.TODO(), believe.TicketSaleNewParams{\n\t\tBuyerName: "Mae Green",\n\t\tCurrency: "GBP",\n\t\tDiscount: "9.00",\n\t\tMatchID: "match-001",\n\t\tPurchaseMethod: believe.PurchaseMethodOnline,\n\t\tQuantity: 2,\n\t\tSubtotal: "90.00",\n\t\tTax: "16.20",\n\t\tTotal: "97.20",\n\t\tUnitPrice: "45.00",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", ticketSale.ID)\n}\n',
@@ -3302,6 +3849,10 @@ const EMBEDDED_METHODS = [
3302
3849
  method: 'ticketSales().create',
3303
3850
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.ticketsales.PurchaseMethod\nimport com.believe.api.models.ticketsales.TicketSale\nimport com.believe.api.models.ticketsales.TicketSaleCreateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val params: TicketSaleCreateParams = TicketSaleCreateParams.builder()\n .buyerName("Mae Green")\n .currency("GBP")\n .discount("9.00")\n .matchId("match-001")\n .purchaseMethod(PurchaseMethod.ONLINE)\n .quantity(2L)\n .subtotal("90.00")\n .tax("16.20")\n .total("97.20")\n .unitPrice("45.00")\n .build()\n val ticketSale: TicketSale = client.ticketSales().create(params)\n}',
3304
3851
  },
3852
+ php: {
3853
+ method: 'ticketSales->create',
3854
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$ticketSale = $client->ticketSales->create(\n buyerName: 'Mae Green',\n currency: 'GBP',\n discount: '9.00',\n matchID: 'match-001',\n purchaseMethod: PurchaseMethod::ONLINE,\n quantity: 2,\n subtotal: '90.00',\n tax: '16.20',\n total: '97.20',\n unitPrice: '45.00',\n buyerEmail: 'mae.green@example.com',\n couponCode: 'BELIEVE10',\n);\n\nvar_dump($ticketSale);",
3855
+ },
3305
3856
  python: {
3306
3857
  method: 'ticket_sales.create',
3307
3858
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nticket_sale = client.ticket_sales.create(\n buyer_name="Mae Green",\n currency="GBP",\n discount="9.00",\n match_id="match-001",\n purchase_method="online",\n quantity=2,\n subtotal="90.00",\n tax="16.20",\n total="97.20",\n unit_price="45.00",\n)\nprint(ticket_sale.id)',
@@ -3331,6 +3882,10 @@ const EMBEDDED_METHODS = [
3331
3882
  method: 'ticket_sales delete',
3332
3883
  example: "believe ticket-sales delete \\\n --api-key 'My API Key' \\\n --ticket-sale-id ticket_sale_id",
3333
3884
  },
3885
+ csharp: {
3886
+ method: 'TicketSales.Delete',
3887
+ example: 'TicketSaleDeleteParams parameters = new() { TicketSaleID = "ticket_sale_id" };\n\nawait client.TicketSales.Delete(parameters);',
3888
+ },
3334
3889
  go: {
3335
3890
  method: 'client.TicketSales.Delete',
3336
3891
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.TicketSales.Delete(context.TODO(), "ticket_sale_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -3346,6 +3901,10 @@ const EMBEDDED_METHODS = [
3346
3901
  method: 'ticketSales().delete',
3347
3902
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.ticketsales.TicketSaleDeleteParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.ticketSales().delete("ticket_sale_id")\n}',
3348
3903
  },
3904
+ php: {
3905
+ method: 'ticketSales->delete',
3906
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->ticketSales->delete('ticket_sale_id');\n\nvar_dump($result);",
3907
+ },
3349
3908
  python: {
3350
3909
  method: 'ticket_sales.delete',
3351
3910
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.ticket_sales.delete(\n "ticket_sale_id",\n)',
@@ -3376,6 +3935,10 @@ const EMBEDDED_METHODS = [
3376
3935
  method: 'ticket_sales retrieve',
3377
3936
  example: "believe ticket-sales retrieve \\\n --api-key 'My API Key' \\\n --ticket-sale-id ticket_sale_id",
3378
3937
  },
3938
+ csharp: {
3939
+ method: 'TicketSales.Retrieve',
3940
+ example: 'TicketSaleRetrieveParams parameters = new() { TicketSaleID = "ticket_sale_id" };\n\nvar ticketSale = await client.TicketSales.Retrieve(parameters);\n\nConsole.WriteLine(ticketSale);',
3941
+ },
3379
3942
  go: {
3380
3943
  method: 'client.TicketSales.Get',
3381
3944
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tticketSale, err := client.TicketSales.Get(context.TODO(), "ticket_sale_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", ticketSale.ID)\n}\n',
@@ -3391,6 +3954,10 @@ const EMBEDDED_METHODS = [
3391
3954
  method: 'ticketSales().retrieve',
3392
3955
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.ticketsales.TicketSale\nimport com.believe.api.models.ticketsales.TicketSaleRetrieveParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val ticketSale: TicketSale = client.ticketSales().retrieve("ticket_sale_id")\n}',
3393
3956
  },
3957
+ php: {
3958
+ method: 'ticketSales->retrieve',
3959
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$ticketSale = $client->ticketSales->retrieve('ticket_sale_id');\n\nvar_dump($ticketSale);",
3960
+ },
3394
3961
  python: {
3395
3962
  method: 'ticket_sales.retrieve',
3396
3963
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nticket_sale = client.ticket_sales.retrieve(\n "ticket_sale_id",\n)\nprint(ticket_sale.id)',
@@ -3435,6 +4002,10 @@ const EMBEDDED_METHODS = [
3435
4002
  method: 'ticket_sales update',
3436
4003
  example: "believe ticket-sales update \\\n --api-key 'My API Key' \\\n --ticket-sale-id ticket_sale_id",
3437
4004
  },
4005
+ csharp: {
4006
+ method: 'TicketSales.Update',
4007
+ example: 'TicketSaleUpdateParams parameters = new() { TicketSaleID = "ticket_sale_id" };\n\nvar ticketSale = await client.TicketSales.Update(parameters);\n\nConsole.WriteLine(ticketSale);',
4008
+ },
3438
4009
  go: {
3439
4010
  method: 'client.TicketSales.Update',
3440
4011
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tticketSale, err := client.TicketSales.Update(\n\t\tcontext.TODO(),\n\t\t"ticket_sale_id",\n\t\tbelieve.TicketSaleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", ticketSale.ID)\n}\n',
@@ -3450,6 +4021,10 @@ const EMBEDDED_METHODS = [
3450
4021
  method: 'ticketSales().update',
3451
4022
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.ticketsales.TicketSale\nimport com.believe.api.models.ticketsales.TicketSaleUpdateParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val ticketSale: TicketSale = client.ticketSales().update("ticket_sale_id")\n}',
3452
4023
  },
4024
+ php: {
4025
+ method: 'ticketSales->update',
4026
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$ticketSale = $client->ticketSales->update(\n 'ticket_sale_id',\n buyerEmail: 'dev@stainless.com',\n buyerName: 'buyer_name',\n couponCode: 'coupon_code',\n currency: 'currency',\n discount: 'discount',\n matchID: 'match_id',\n purchaseMethod: PurchaseMethod::ONLINE,\n quantity: 1,\n subtotal: 'subtotal',\n tax: 'tax',\n total: 'total',\n unitPrice: 'unit_price',\n);\n\nvar_dump($ticketSale);",
4027
+ },
3453
4028
  python: {
3454
4029
  method: 'ticket_sales.update',
3455
4030
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nticket_sale = client.ticket_sales.update(\n ticket_sale_id="ticket_sale_id",\n)\nprint(ticket_sale.id)',
@@ -3479,6 +4054,10 @@ const EMBEDDED_METHODS = [
3479
4054
  method: 'health check',
3480
4055
  example: "believe health check \\\n --api-key 'My API Key'",
3481
4056
  },
4057
+ csharp: {
4058
+ method: 'Health.Check',
4059
+ example: 'HealthCheckParams parameters = new();\n\nvar response = await client.Health.Check(parameters);\n\nConsole.WriteLine(response);',
4060
+ },
3482
4061
  go: {
3483
4062
  method: 'client.Health.Check',
3484
4063
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Health.Check(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
@@ -3494,6 +4073,10 @@ const EMBEDDED_METHODS = [
3494
4073
  method: 'health().check',
3495
4074
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.health.HealthCheckParams\nimport com.believe.api.models.health.HealthCheckResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val response: HealthCheckResponse = client.health().check()\n}',
3496
4075
  },
4076
+ php: {
4077
+ method: 'health->check',
4078
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->health->check();\n\nvar_dump($response);",
4079
+ },
3497
4080
  python: {
3498
4081
  method: 'health.check',
3499
4082
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.health.check()\nprint(response)',
@@ -3523,6 +4106,10 @@ const EMBEDDED_METHODS = [
3523
4106
  method: 'version retrieve',
3524
4107
  example: "believe version retrieve \\\n --api-key 'My API Key'",
3525
4108
  },
4109
+ csharp: {
4110
+ method: 'Version.Retrieve',
4111
+ example: 'VersionRetrieveParams parameters = new();\n\nvar version = await client.Version.Retrieve(parameters);\n\nConsole.WriteLine(version);',
4112
+ },
3526
4113
  go: {
3527
4114
  method: 'client.Version.Get',
3528
4115
  example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tversion, err := client.Version.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", version)\n}\n',
@@ -3538,6 +4125,10 @@ const EMBEDDED_METHODS = [
3538
4125
  method: 'version().retrieve',
3539
4126
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.version.VersionRetrieveParams\nimport com.believe.api.models.version.VersionRetrieveResponse\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n val version: VersionRetrieveResponse = client.version().retrieve()\n}',
3540
4127
  },
4128
+ php: {
4129
+ method: 'version->retrieve',
4130
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$version = $client->version->retrieve();\n\nvar_dump($version);",
4131
+ },
3541
4132
  python: {
3542
4133
  method: 'version.retrieve',
3543
4134
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nversion = client.version.retrieve()\nprint(version)',
@@ -3566,6 +4157,10 @@ const EMBEDDED_METHODS = [
3566
4157
  method: 'ws test',
3567
4158
  example: "believe client:ws test \\\n --api-key 'My API Key'",
3568
4159
  },
4160
+ csharp: {
4161
+ method: 'Client.Ws.Test',
4162
+ example: 'WTestParams parameters = new();\n\nawait client.Client.Ws.Test(parameters);',
4163
+ },
3569
4164
  go: {
3570
4165
  method: 'client.Client.Ws.Test',
3571
4166
  example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Client.Ws.Test(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
@@ -3581,6 +4176,10 @@ const EMBEDDED_METHODS = [
3581
4176
  method: 'client().ws().test',
3582
4177
  example: 'package com.believe.api.example\n\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.client.ws.WTestParams\n\nfun main() {\n val client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\n client.client().ws().test()\n}',
3583
4178
  },
4179
+ php: {
4180
+ method: 'client->ws->test',
4181
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$result = $client->client->ws->test();\n\nvar_dump($result);",
4182
+ },
3584
4183
  python: {
3585
4184
  method: 'client.ws.test',
3586
4185
  example: 'import os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\nclient.client.ws.test()',
@@ -3599,11 +4198,11 @@ const EMBEDDED_METHODS = [
3599
4198
  const EMBEDDED_READMES = [
3600
4199
  {
3601
4200
  language: 'python',
3602
- content: '# Believe Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/believe.svg?label=pypi%20(stable))](https://pypi.org/project/believe/)\n\nThe Believe Python library provides convenient access to the Believe REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJuYW1lIjoiQGNqYXZkZXYvYmVsaWV2ZS1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9iZWxpZXZlLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYmVsaWV2ZS1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbelieve.stlmcp.com%22%2C%22headers%22%3A%7B%22x-believe-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\n The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from the production repo\npip install git+ssh://git@github.com/cjavdev/believe-python.git\n```\n> [!NOTE]\n> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install believe`\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\n\npage = client.characters.list()\nprint(page.data)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `BELIEVE_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncBelieve` instead of `Believe` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom believe import AsyncBelieve\n\nclient = AsyncBelieve(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n page = await client.characters.list()\n print(page.data)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from the production repo\npip install \'believe[aiohttp] @ git+ssh://git@github.com/cjavdev/believe-python.git\'\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom believe import DefaultAioHttpClient\nfrom believe import AsyncBelieve\n\nasync def main() -> None:\n async with AsyncBelieve(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n page = await client.characters.list()\n print(page.data)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Believe API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom believe import Believe\n\nclient = Believe()\n\nall_characters = []\n# Automatically fetches more pages as needed.\nfor character in client.characters.list():\n # Do something with character here\n all_characters.append(character)\nprint(all_characters)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom believe import AsyncBelieve\n\nclient = AsyncBelieve()\n\nasync def main() -> None:\n all_characters = []\n # Iterate through items across all pages, issuing requests as needed.\n async for character in client.characters.list():\n all_characters.append(character)\n print(all_characters)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.characters.list()\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.data)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.characters.list()\n\nprint(f"the current start offset for this page: {first_page.skip}") # => "the current start offset for this page: 1"\nfor character in first_page.data:\n print(character.id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom believe import Believe\n\nclient = Believe()\n\ncharacter = client.characters.create(\n background="Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.",\n emotional_stats={\n "curiosity": 40,\n "empathy": 85,\n "optimism": 45,\n "resilience": 95,\n "vulnerability": 60,\n },\n name="Roy Kent",\n personality_traits=["intense", "loyal", "secretly caring", "profane"],\n role="coach",\n)\nprint(character.emotional_stats)\n```\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.\n\n```python\nfrom pathlib import Path\nfrom believe import Believe\n\nclient = Believe()\n\nclient.teams.logo.upload(\n team_id="team_id",\n file=Path("/path/to/file"),\n)\n```\n\nThe async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `believe.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `believe.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `believe.APIError`.\n\n```python\nimport believe\nfrom believe import Believe\n\nclient = Believe()\n\ntry:\n client.characters.list()\nexcept believe.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept believe.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept believe.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom believe import Believe\n\n# Configure the default for all requests:\nclient = Believe(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).characters.list()\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom believe import Believe\n\n# Configure the default for all requests:\nclient = Believe(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Believe(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).characters.list()\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `BELIEVE_LOG` to `info`.\n\n```shell\n$ export BELIEVE_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom believe import Believe\n\nclient = Believe()\nresponse = client.characters.with_raw_response.list()\nprint(response.headers.get(\'X-My-Header\'))\n\ncharacter = response.parse() # get the object that `characters.list()` would have returned\nprint(character.id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/cjavdev/believe-python/tree/main/src/believe/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/cjavdev/believe-python/tree/main/src/believe/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.characters.with_streaming_response.list() as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom believe import Believe, DefaultHttpxClient\n\nclient = Believe(\n # Or use the `BELIEVE_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom believe import Believe\n\nwith Believe() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport believe\nprint(believe.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
4201
+ content: '# Believe Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/believe.svg?label=pypi%20(stable))](https://pypi.org/project/believe/)\n\nThe Believe Python library provides convenient access to the Believe REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjamF2ZGV2L2JlbGlldmUtbWNwIl0sImVudiI6eyJCRUxJRVZFX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cjavdev%2Fbelieve-mcp%22%5D%2C%22env%22%3A%7B%22BELIEVE_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\n The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from the production repo\npip install git+ssh://git@github.com/cjavdev/believe-python.git\n```\n> [!NOTE]\n> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install believe`\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom believe import Believe\n\nclient = Believe(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\n\npage = client.characters.list()\nprint(page.data)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `BELIEVE_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncBelieve` instead of `Believe` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom believe import AsyncBelieve\n\nclient = AsyncBelieve(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n page = await client.characters.list()\n print(page.data)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from the production repo\npip install \'believe[aiohttp] @ git+ssh://git@github.com/cjavdev/believe-python.git\'\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom believe import DefaultAioHttpClient\nfrom believe import AsyncBelieve\n\nasync def main() -> None:\n async with AsyncBelieve(\n api_key=os.environ.get("BELIEVE_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n page = await client.characters.list()\n print(page.data)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Believe API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom believe import Believe\n\nclient = Believe()\n\nall_characters = []\n# Automatically fetches more pages as needed.\nfor character in client.characters.list():\n # Do something with character here\n all_characters.append(character)\nprint(all_characters)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom believe import AsyncBelieve\n\nclient = AsyncBelieve()\n\nasync def main() -> None:\n all_characters = []\n # Iterate through items across all pages, issuing requests as needed.\n async for character in client.characters.list():\n all_characters.append(character)\n print(all_characters)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.characters.list()\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.data)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.characters.list()\n\nprint(f"the current start offset for this page: {first_page.skip}") # => "the current start offset for this page: 1"\nfor character in first_page.data:\n print(character.id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom believe import Believe\n\nclient = Believe()\n\ncharacter = client.characters.create(\n background="Legendary midfielder for Chelsea and AFC Richmond, now assistant coach. Known for his gruff exterior hiding a heart of gold.",\n emotional_stats={\n "curiosity": 40,\n "empathy": 85,\n "optimism": 45,\n "resilience": 95,\n "vulnerability": 60,\n },\n name="Roy Kent",\n personality_traits=["intense", "loyal", "secretly caring", "profane"],\n role="coach",\n)\nprint(character.emotional_stats)\n```\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.\n\n```python\nfrom pathlib import Path\nfrom believe import Believe\n\nclient = Believe()\n\nclient.teams.logo.upload(\n team_id="team_id",\n file=Path("/path/to/file"),\n)\n```\n\nThe async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `believe.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `believe.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `believe.APIError`.\n\n```python\nimport believe\nfrom believe import Believe\n\nclient = Believe()\n\ntry:\n client.characters.list()\nexcept believe.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept believe.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept believe.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom believe import Believe\n\n# Configure the default for all requests:\nclient = Believe(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).characters.list()\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom believe import Believe\n\n# Configure the default for all requests:\nclient = Believe(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Believe(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).characters.list()\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `BELIEVE_LOG` to `info`.\n\n```shell\n$ export BELIEVE_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom believe import Believe\n\nclient = Believe()\nresponse = client.characters.with_raw_response.list()\nprint(response.headers.get(\'X-My-Header\'))\n\ncharacter = response.parse() # get the object that `characters.list()` would have returned\nprint(character.id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/cjavdev/believe-python/tree/main/src/believe/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/cjavdev/believe-python/tree/main/src/believe/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.characters.with_streaming_response.list() as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom believe import Believe, DefaultHttpxClient\n\nclient = Believe(\n # Or use the `BELIEVE_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom believe import Believe\n\nwith Believe() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport believe\nprint(believe.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
3603
4202
  },
3604
4203
  {
3605
4204
  language: 'go',
3606
- content: '# Believe Go API Library\n\n<a href="https://pkg.go.dev/github.com/cjavdev/believe-go"><img src="https://pkg.go.dev/badge/github.com/cjavdev/believe-go.svg" alt="Go Reference"></a>\n\nThe Believe Go library provides convenient access to the Believe REST API\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJuYW1lIjoiQGNqYXZkZXYvYmVsaWV2ZS1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9iZWxpZXZlLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYmVsaWV2ZS1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbelieve.stlmcp.com%22%2C%22headers%22%3A%7B%22x-believe-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/cjavdev/believe-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/cjavdev/believe-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("BELIEVE_API_KEY")\n\t)\n\tpage, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Characters.List(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/cjavdev/believe-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Characters.ListAutoPaging(context.TODO(), believe.CharacterListParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tcharacter := iter.Current()\n\tfmt.Printf("%+v\\n", character)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\nfor page != nil {\n\tfor _, character := range page.Data {\n\t\tfmt.Printf("%+v\\n", character)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\nif err != nil {\n\tvar apierr *believe.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/characters": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Characters.List(\n\tctx,\n\tbelieve.CharacterListParams{},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n```go\n// A file from the file system\nfile, err := os.Open("/path/to/file")\nbelieve.TeamLogoUploadParams{\n\tFile: file,\n}\n\n// A file from a string\nbelieve.TeamLogoUploadParams{\n\tFile: strings.NewReader("my file contents"),\n}\n\n// With a custom filename and contentType\nbelieve.TeamLogoUploadParams{\n\tFile: believe.File(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),\n}\n```\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := believe.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Characters.List(\n\tcontext.TODO(),\n\tbelieve.CharacterListParams{},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\npage, err := client.Characters.List(\n\tcontext.TODO(),\n\tbelieve.CharacterListParams{},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", page)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
4205
+ content: '# Believe Go API Library\n\n<a href="https://pkg.go.dev/github.com/cjavdev/believe-go"><img src="https://pkg.go.dev/badge/github.com/cjavdev/believe-go.svg" alt="Go Reference"></a>\n\nThe Believe Go library provides convenient access to the Believe REST API\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjamF2ZGV2L2JlbGlldmUtbWNwIl0sImVudiI6eyJCRUxJRVZFX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cjavdev%2Fbelieve-mcp%22%5D%2C%22env%22%3A%7B%22BELIEVE_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/cjavdev/believe-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/cjavdev/believe-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/cjavdev/believe-go"\n\t"github.com/cjavdev/believe-go/option"\n)\n\nfunc main() {\n\tclient := believe.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("BELIEVE_API_KEY")\n\t)\n\tpage, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Characters.List(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/cjavdev/believe-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Characters.ListAutoPaging(context.TODO(), believe.CharacterListParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tcharacter := iter.Current()\n\tfmt.Printf("%+v\\n", character)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\nfor page != nil {\n\tfor _, character := range page.Data {\n\t\tfmt.Printf("%+v\\n", character)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Characters.List(context.TODO(), believe.CharacterListParams{})\nif err != nil {\n\tvar apierr *believe.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/characters": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Characters.List(\n\tctx,\n\tbelieve.CharacterListParams{},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n```go\n// A file from the file system\nfile, err := os.Open("/path/to/file")\nbelieve.TeamLogoUploadParams{\n\tFile: file,\n}\n\n// A file from a string\nbelieve.TeamLogoUploadParams{\n\tFile: strings.NewReader("my file contents"),\n}\n\n// With a custom filename and contentType\nbelieve.TeamLogoUploadParams{\n\tFile: believe.File(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),\n}\n```\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := believe.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Characters.List(\n\tcontext.TODO(),\n\tbelieve.CharacterListParams{},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\npage, err := client.Characters.List(\n\tcontext.TODO(),\n\tbelieve.CharacterListParams{},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", page)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
3607
4206
  },
3608
4207
  {
3609
4208
  language: 'terraform',
@@ -3611,24 +4210,32 @@ const EMBEDDED_READMES = [
3611
4210
  },
3612
4211
  {
3613
4212
  language: 'typescript',
3614
- content: "# Believe TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@cjavdev/believe.svg?label=npm%20(stable))](https://npmjs.org/package/@cjavdev/believe) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@cjavdev/believe)\n\nThis library provides convenient access to the Believe REST API from server-side TypeScript or JavaScript.\n\n\n\nThe full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJuYW1lIjoiQGNqYXZkZXYvYmVsaWV2ZS1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9iZWxpZXZlLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYmVsaWV2ZS1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbelieve.stlmcp.com%22%2C%22headers%22%3A%7B%22x-believe-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @cjavdev/believe\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n apiKey: process.env['BELIEVE_API_KEY'], // This is the default and can be omitted\n});\n\nconst page = await client.characters.list();\nconst character = page.data[0];\n\nconsole.log(character.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n apiKey: process.env['BELIEVE_API_KEY'], // This is the default and can be omitted\n});\n\nconst [character]: [Believe.Character] = await client.characters.list();\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed in many different forms:\n- `File` (or an object with the same structure)\n- a `fetch` `Response` (or an object with the same structure)\n- an `fs.ReadStream`\n- the return value of our `toFile` helper\n\n```ts\nimport fs from 'fs';\nimport Believe, { toFile } from '@cjavdev/believe';\n\nconst client = new Believe();\n\n// If you have access to Node `fs` we recommend using `fs.createReadStream()`:\nawait client.teams.logo.upload('team_id', { file: fs.createReadStream('/path/to/file') });\n\n// Or if you have the web `File` API you can pass a `File` instance:\nawait client.teams.logo.upload('team_id', { file: new File(['my bytes'], 'file') });\n\n// You can also pass a `fetch` `Response`:\nawait client.teams.logo.upload('team_id', { file: await fetch('https://somesite/file') });\n\n// Finally, if none of the above are convenient, you can use our `toFile` helper:\nawait client.teams.logo.upload('team_id', { file: await toFile(Buffer.from('my bytes'), 'file') });\nawait client.teams.logo.upload('team_id', {\n file: await toFile(new Uint8Array([0, 1, 2]), 'file'),\n});\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst page = await client.characters.list().catch(async (err) => {\n if (err instanceof Believe.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Believe({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.characters.list({\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Believe({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.characters.list({\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the Believe API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllCharacters(params) {\n const allCharacters = [];\n // Automatically fetches more pages as needed.\n for await (const character of client.characters.list()) {\n allCharacters.push(character);\n }\n return allCharacters;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.characters.list();\nfor (const character of page.data) {\n console.log(character);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Tree shaking\n\nThis library supports tree shaking to reduce bundle size. Instead of importing the full client, you can create a client only including the API resources you need:\n\n~~~ts\nimport { createClient } from '@cjavdev/believe/tree-shakable';\nimport { Characters } from '@cjavdev/believe/resources/characters';\nimport { BaseLogo } from '@cjavdev/believe/resources/teams/logo';\n\nconst client = createClient({\n // Specify the resources you'd like to use ...\n resources: [Characters, BaseLogo],\n});\n\n// ... then make API calls as usual.\nconst page = await client.characters.list();\nconst character = page.data[0]\nconst fileUpload = await client.teams.logo.upload('team_id', { file: fs.createReadStream('path/to/file') });\n~~~\n\nEach API resource has two versions, the full resource (e.g., `Characters`) which includes all subresources, and the base resource (e.g., `BaseCharacters`) which does not.\n\nThe tree-shaken client is fully typed, so TypeScript will provide accurate autocomplete and prevent access to resources not included in your configuration.\nThe `createClient` function automatically infers the correct type, but you can also use the `PartialBelieve` type explicitly:\n\n~~~ts\nimport Believe from '@cjavdev/believe';\nimport { createClient, type PartialBelieve } from '@cjavdev/believe/tree-shakable';\nimport { BaseCharacters } from '@cjavdev/believe/resources/characters';\n\n// Explicit variable type\nconst client: PartialBelieve<{ characters: BaseCharacters }> = createClient({\n resources: [BaseCharacters],\n /* ... */\n});\n\n// Function parameter type\nasync function main(client: PartialBelieve<{ characters: BaseCharacters }>) {\n const page = await client.characters.list();\n const character = page.data[0]\n}\n\n// Works with any client that has the characters resource\nconst treeShakableClient = createClient({\n resources: [BaseCharacters],\n /* ... */\n});\nconst fullClient = new Believe(/* ... */);\n\nmain(treeShakableClient); // Works\nmain(fullClient); // Also works\n~~~\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Believe();\n\nconst response = await client.characters.list().asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: page, response: raw } = await client.characters.list().withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nfor await (const character of page) {\n console.log(character.id);\n}\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `BELIEVE_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Believe from '@cjavdev/believe';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Believe({\n logger: logger.child({ name: 'Believe' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.characters.list({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Believe from '@cjavdev/believe';\nimport fetch from 'my-fetch';\n\nconst client = new Believe({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Believe from '@cjavdev/believe';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Believe({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Believe from 'npm:@cjavdev/believe';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Believe({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n- Web browsers: disabled by default to avoid exposing your secret API credentials. Enable browser support by explicitly setting `dangerouslyAllowBrowser` to true'.\n<details>\n <summary>More explanation</summary>\n\n ### Why is this dangerous?\n Enabling the `dangerouslyAllowBrowser` option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments,\n any user with access to the browser can potentially inspect, extract, and misuse these credentials. This could lead to unauthorized access using your credentials and potentially compromise sensitive data or functionality.\n ### When might this not be dangerous?\n In certain scenarios where enabling browser support might not pose significant risks:\n - Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated.\n - Public APIs with Limited Scope: If your API has very limited scope and the exposed credentials do not grant access to sensitive data or critical operations, the potential impact of exposure is reduced.\n - Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated.\n\n</details>\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
4213
+ content: "# Believe TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@cjavdev/believe.svg?label=npm%20(stable))](https://npmjs.org/package/@cjavdev/believe) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@cjavdev/believe)\n\nThis library provides convenient access to the Believe REST API from server-side TypeScript or JavaScript.\n\n\n\nThe full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjamF2ZGV2L2JlbGlldmUtbWNwIl0sImVudiI6eyJCRUxJRVZFX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cjavdev%2Fbelieve-mcp%22%5D%2C%22env%22%3A%7B%22BELIEVE_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @cjavdev/believe\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n apiKey: process.env['BELIEVE_API_KEY'], // This is the default and can be omitted\n});\n\nconst page = await client.characters.list();\nconst character = page.data[0];\n\nconsole.log(character.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n apiKey: process.env['BELIEVE_API_KEY'], // This is the default and can be omitted\n});\n\nconst [character]: [Believe.Character] = await client.characters.list();\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed in many different forms:\n- `File` (or an object with the same structure)\n- a `fetch` `Response` (or an object with the same structure)\n- an `fs.ReadStream`\n- the return value of our `toFile` helper\n\n```ts\nimport fs from 'fs';\nimport Believe, { toFile } from '@cjavdev/believe';\n\nconst client = new Believe();\n\n// If you have access to Node `fs` we recommend using `fs.createReadStream()`:\nawait client.teams.logo.upload('team_id', { file: fs.createReadStream('/path/to/file') });\n\n// Or if you have the web `File` API you can pass a `File` instance:\nawait client.teams.logo.upload('team_id', { file: new File(['my bytes'], 'file') });\n\n// You can also pass a `fetch` `Response`:\nawait client.teams.logo.upload('team_id', { file: await fetch('https://somesite/file') });\n\n// Finally, if none of the above are convenient, you can use our `toFile` helper:\nawait client.teams.logo.upload('team_id', { file: await toFile(Buffer.from('my bytes'), 'file') });\nawait client.teams.logo.upload('team_id', {\n file: await toFile(new Uint8Array([0, 1, 2]), 'file'),\n});\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst page = await client.characters.list().catch(async (err) => {\n if (err instanceof Believe.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Believe({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.characters.list({\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Believe({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.characters.list({\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the Believe API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllCharacters(params) {\n const allCharacters = [];\n // Automatically fetches more pages as needed.\n for await (const character of client.characters.list()) {\n allCharacters.push(character);\n }\n return allCharacters;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.characters.list();\nfor (const character of page.data) {\n console.log(character);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Tree shaking\n\nThis library supports tree shaking to reduce bundle size. Instead of importing the full client, you can create a client only including the API resources you need:\n\n~~~ts\nimport { createClient } from '@cjavdev/believe/tree-shakable';\nimport { Characters } from '@cjavdev/believe/resources/characters';\nimport { BaseLogo } from '@cjavdev/believe/resources/teams/logo';\n\nconst client = createClient({\n // Specify the resources you'd like to use ...\n resources: [Characters, BaseLogo],\n});\n\n// ... then make API calls as usual.\nconst page = await client.characters.list();\nconst character = page.data[0]\nconst fileUpload = await client.teams.logo.upload('team_id', { file: fs.createReadStream('path/to/file') });\n~~~\n\nEach API resource has two versions, the full resource (e.g., `Characters`) which includes all subresources, and the base resource (e.g., `BaseCharacters`) which does not.\n\nThe tree-shaken client is fully typed, so TypeScript will provide accurate autocomplete and prevent access to resources not included in your configuration.\nThe `createClient` function automatically infers the correct type, but you can also use the `PartialBelieve` type explicitly:\n\n~~~ts\nimport Believe from '@cjavdev/believe';\nimport { createClient, type PartialBelieve } from '@cjavdev/believe/tree-shakable';\nimport { BaseCharacters } from '@cjavdev/believe/resources/characters';\n\n// Explicit variable type\nconst client: PartialBelieve<{ characters: BaseCharacters }> = createClient({\n resources: [BaseCharacters],\n /* ... */\n});\n\n// Function parameter type\nasync function main(client: PartialBelieve<{ characters: BaseCharacters }>) {\n const page = await client.characters.list();\n const character = page.data[0]\n}\n\n// Works with any client that has the characters resource\nconst treeShakableClient = createClient({\n resources: [BaseCharacters],\n /* ... */\n});\nconst fullClient = new Believe(/* ... */);\n\nmain(treeShakableClient); // Works\nmain(fullClient); // Also works\n~~~\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Believe();\n\nconst response = await client.characters.list().asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: page, response: raw } = await client.characters.list().withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nfor await (const character of page) {\n console.log(character.id);\n}\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `BELIEVE_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Believe from '@cjavdev/believe';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Believe({\n logger: logger.child({ name: 'Believe' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.characters.list({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Believe from '@cjavdev/believe';\nimport fetch from 'my-fetch';\n\nconst client = new Believe({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Believe from '@cjavdev/believe';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Believe({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Believe from '@cjavdev/believe';\n\nconst client = new Believe({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Believe from 'npm:@cjavdev/believe';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Believe({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n- Web browsers: disabled by default to avoid exposing your secret API credentials. Enable browser support by explicitly setting `dangerouslyAllowBrowser` to true'.\n<details>\n <summary>More explanation</summary>\n\n ### Why is this dangerous?\n Enabling the `dangerouslyAllowBrowser` option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments,\n any user with access to the browser can potentially inspect, extract, and misuse these credentials. This could lead to unauthorized access using your credentials and potentially compromise sensitive data or functionality.\n ### When might this not be dangerous?\n In certain scenarios where enabling browser support might not pose significant risks:\n - Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated.\n - Public APIs with Limited Scope: If your API has very limited scope and the exposed credentials do not grant access to sensitive data or critical operations, the potential impact of exposure is reduced.\n - Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated.\n\n</details>\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
3615
4214
  },
3616
4215
  {
3617
4216
  language: 'ruby',
3618
- content: '# Believe Ruby API library\n\nThe Believe Ruby library provides convenient access to the Believe REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/cjavdev/believe-ruby#Sorbet) for usage with Sorbet. The standard library\'s `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJuYW1lIjoiQGNqYXZkZXYvYmVsaWV2ZS1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9iZWxpZXZlLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYmVsaWV2ZS1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbelieve.stlmcp.com%22%2C%22headers%22%3A%7B%22x-believe-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nDocumentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/believe).\n\n\n\n## Installation\n\nTo use this gem, install via Bundler by adding the following to your application\'s `Gemfile`:\n\n<!-- x-release-please-start-version -->\n\n```ruby\ngem "believe", "~> 0.0.1"\n```\n\n<!-- x-release-please-end -->\n\n## Usage\n\n```ruby\nrequire "bundler/setup"\nrequire "believe"\n\nbelieve = ::Believe::Client.new(\n api_key: ENV["BELIEVE_API_KEY"] # This is the default and can be omitted\n)\n\npage = believe.characters.list\n\nputs(page.id)\n```\n\n\n\n### Pagination\n\nList methods in the Believe API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```ruby\npage = believe.characters.list\n\n# Fetch single item from page.\ncharacter = page.data[0]\nputs(character.id)\n\n# Automatically fetches more pages as needed.\npage.auto_paging_each do |character|\n puts(character.id)\nend\n```\n\nAlternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.\n\n```ruby\nif page.next_page?\n new_page = page.next_page\n puts(new_page.data[0].id)\nend\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more.\n\n```ruby\nrequire "pathname"\n\n# Use `Pathname` to send the filename and/or avoid paging a large file into memory:\nfile_upload = believe.teams.logo.upload(file: Pathname("/path/to/file"))\n\n# Alternatively, pass file contents or a `StringIO` directly:\nfile_upload = believe.teams.logo.upload(file: File.read("/path/to/file"))\n\n# Or, to control the filename and/or content type:\nfile = ::Believe::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "…")\nfile_upload = believe.teams.logo.upload(file: file)\n\nputs(file_upload.file_id)\n```\n\nNote that you can also pass a raw `IO` descriptor, but this disables retries, as the library can\'t be sure if the descriptor is a file or pipe (which cannot be rewound).\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `::Believe::Errors::APIError` will be thrown:\n\n```ruby\nbegin\n character = believe.characters.list\nrescue ::Believe::Errors::APIConnectionError => e\n puts("The server could not be reached")\n puts(e.cause) # an underlying Exception, likely raised within `net/http`\nrescue ::Believe::Errors::RateLimitError => e\n puts("A 429 status code was received; we should back off a bit.")\nrescue ::Believe::Errors::APIStatusError => e\n puts("Another non-200-range status code was received")\n puts(e.status)\nend\n```\n\nError codes are as follows:\n\n| Cause | Error Type |\n| ---------------- | -------------------------- |\n| HTTP 400 | `BadRequestError` |\n| HTTP 401 | `AuthenticationError` |\n| HTTP 403 | `PermissionDeniedError` |\n| HTTP 404 | `NotFoundError` |\n| HTTP 409 | `ConflictError` |\n| HTTP 422 | `UnprocessableEntityError` |\n| HTTP 429 | `RateLimitError` |\n| HTTP >= 500 | `InternalServerError` |\n| Other HTTP error | `APIStatusError` |\n| Timeout | `APITimeoutError` |\n| Network error | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `max_retries` option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\nbelieve = ::Believe::Client.new(\n max_retries: 0 # default is 2\n)\n\n# Or, configure per-request:\nbelieve.characters.list(request_options: {max_retries: 5})\n```\n\n### Timeouts\n\nBy default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\nbelieve = ::Believe::Client.new(\n timeout: nil # default is 60\n)\n\n# Or, configure per-request:\nbelieve.characters.list(request_options: {timeout: 5})\n```\n\nOn timeout, `::Believe::Errors::APITimeoutError` is raised.\n\nNote that requests that time out are retried by default.\n\n## Advanced concepts\n\n### BaseModel\n\nAll parameter and response objects inherit from `::Believe::Internal::Type::BaseModel`, which provides several conveniences, including:\n\n1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.\n\n2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.\n\n3. Both instances and the classes themselves can be pretty-printed.\n\n4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra_` parameters of the same name overrides the documented parameters.\n\n```ruby\npage =\n believe.characters.list(\n request_options: {\n extra_query: {my_query_parameter: value},\n extra_body: {my_body_parameter: value},\n extra_headers: {"my-header": value}\n }\n )\n\nputs(page[:my_undocumented_property])\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```ruby\nresponse = client.request(\n method: :post,\n path: \'/undocumented/endpoint\',\n query: {"dog": "woof"},\n headers: {"useful-header": "interesting-value"},\n body: {"hello": "world"}\n)\n```\n\n### Concurrency & connection pooling\n\nThe `::Believe::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.\n\nEach instance of `::Believe::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.\n\nWhen all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.\n\nUnless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.\n\n## Sorbet\n\nThis library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.\n\nYou can provide typesafe request parameters like so:\n\n```ruby\nbelieve.characters.list \n```\n\nOr, equivalently:\n\n```ruby\n# Hashes work, but are not typesafe:\nbelieve.characters.list\n\n# You can also splat a full Params class:\nparams = ::Believe::CharacterListParams.new\nbelieve.characters.list(**params)\n```\n\n### Enums\n\nSince this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:\n\n```ruby\n# :coach\nputs(::Believe::CharacterRole::COACH)\n\n# Revealed type: `T.all(::Believe::CharacterRole, Symbol)`\nT.reveal_type(::Believe::CharacterRole::COACH)\n```\n\nEnum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:\n\n```ruby\n# Using the enum constants preserves the tagged type information:\nbelieve.characters.create(\n role: ::Believe::CharacterRole::COACH,\n # …\n)\n\n# Literal values are also permissible:\nbelieve.characters.create(\n role: :coach,\n # …\n)\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.\n\n## Requirements\n\nRuby 3.2.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/cjavdev/believe-ruby/tree/main/CONTRIBUTING.md).\n',
4217
+ content: '# Believe Ruby API library\n\nThe Believe Ruby library provides convenient access to the Believe REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/cjavdev/believe-ruby#Sorbet) for usage with Sorbet. The standard library\'s `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjamF2ZGV2L2JlbGlldmUtbWNwIl0sImVudiI6eyJCRUxJRVZFX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cjavdev%2Fbelieve-mcp%22%5D%2C%22env%22%3A%7B%22BELIEVE_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nDocumentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/believe).\n\n\n\n## Installation\n\nTo use this gem, install via Bundler by adding the following to your application\'s `Gemfile`:\n\n<!-- x-release-please-start-version -->\n\n```ruby\ngem "believe", "~> 0.0.1"\n```\n\n<!-- x-release-please-end -->\n\n## Usage\n\n```ruby\nrequire "bundler/setup"\nrequire "believe"\n\nbelieve = ::Believe::Client.new(\n api_key: ENV["BELIEVE_API_KEY"] # This is the default and can be omitted\n)\n\npage = believe.characters.list\n\nputs(page.id)\n```\n\n\n\n### Pagination\n\nList methods in the Believe API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```ruby\npage = believe.characters.list\n\n# Fetch single item from page.\ncharacter = page.data[0]\nputs(character.id)\n\n# Automatically fetches more pages as needed.\npage.auto_paging_each do |character|\n puts(character.id)\nend\n```\n\nAlternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.\n\n```ruby\nif page.next_page?\n new_page = page.next_page\n puts(new_page.data[0].id)\nend\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more.\n\n```ruby\nrequire "pathname"\n\n# Use `Pathname` to send the filename and/or avoid paging a large file into memory:\nfile_upload = believe.teams.logo.upload(file: Pathname("/path/to/file"))\n\n# Alternatively, pass file contents or a `StringIO` directly:\nfile_upload = believe.teams.logo.upload(file: File.read("/path/to/file"))\n\n# Or, to control the filename and/or content type:\nfile = ::Believe::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "…")\nfile_upload = believe.teams.logo.upload(file: file)\n\nputs(file_upload.file_id)\n```\n\nNote that you can also pass a raw `IO` descriptor, but this disables retries, as the library can\'t be sure if the descriptor is a file or pipe (which cannot be rewound).\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `::Believe::Errors::APIError` will be thrown:\n\n```ruby\nbegin\n character = believe.characters.list\nrescue ::Believe::Errors::APIConnectionError => e\n puts("The server could not be reached")\n puts(e.cause) # an underlying Exception, likely raised within `net/http`\nrescue ::Believe::Errors::RateLimitError => e\n puts("A 429 status code was received; we should back off a bit.")\nrescue ::Believe::Errors::APIStatusError => e\n puts("Another non-200-range status code was received")\n puts(e.status)\nend\n```\n\nError codes are as follows:\n\n| Cause | Error Type |\n| ---------------- | -------------------------- |\n| HTTP 400 | `BadRequestError` |\n| HTTP 401 | `AuthenticationError` |\n| HTTP 403 | `PermissionDeniedError` |\n| HTTP 404 | `NotFoundError` |\n| HTTP 409 | `ConflictError` |\n| HTTP 422 | `UnprocessableEntityError` |\n| HTTP 429 | `RateLimitError` |\n| HTTP >= 500 | `InternalServerError` |\n| Other HTTP error | `APIStatusError` |\n| Timeout | `APITimeoutError` |\n| Network error | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `max_retries` option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\nbelieve = ::Believe::Client.new(\n max_retries: 0 # default is 2\n)\n\n# Or, configure per-request:\nbelieve.characters.list(request_options: {max_retries: 5})\n```\n\n### Timeouts\n\nBy default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\nbelieve = ::Believe::Client.new(\n timeout: nil # default is 60\n)\n\n# Or, configure per-request:\nbelieve.characters.list(request_options: {timeout: 5})\n```\n\nOn timeout, `::Believe::Errors::APITimeoutError` is raised.\n\nNote that requests that time out are retried by default.\n\n## Advanced concepts\n\n### BaseModel\n\nAll parameter and response objects inherit from `::Believe::Internal::Type::BaseModel`, which provides several conveniences, including:\n\n1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.\n\n2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.\n\n3. Both instances and the classes themselves can be pretty-printed.\n\n4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra_` parameters of the same name overrides the documented parameters.\n\n```ruby\npage =\n believe.characters.list(\n request_options: {\n extra_query: {my_query_parameter: value},\n extra_body: {my_body_parameter: value},\n extra_headers: {"my-header": value}\n }\n )\n\nputs(page[:my_undocumented_property])\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```ruby\nresponse = client.request(\n method: :post,\n path: \'/undocumented/endpoint\',\n query: {"dog": "woof"},\n headers: {"useful-header": "interesting-value"},\n body: {"hello": "world"}\n)\n```\n\n### Concurrency & connection pooling\n\nThe `::Believe::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.\n\nEach instance of `::Believe::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.\n\nWhen all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.\n\nUnless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.\n\n## Sorbet\n\nThis library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.\n\nYou can provide typesafe request parameters like so:\n\n```ruby\nbelieve.characters.list \n```\n\nOr, equivalently:\n\n```ruby\n# Hashes work, but are not typesafe:\nbelieve.characters.list\n\n# You can also splat a full Params class:\nparams = ::Believe::CharacterListParams.new\nbelieve.characters.list(**params)\n```\n\n### Enums\n\nSince this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:\n\n```ruby\n# :coach\nputs(::Believe::CharacterRole::COACH)\n\n# Revealed type: `T.all(::Believe::CharacterRole, Symbol)`\nT.reveal_type(::Believe::CharacterRole::COACH)\n```\n\nEnum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:\n\n```ruby\n# Using the enum constants preserves the tagged type information:\nbelieve.characters.create(\n role: ::Believe::CharacterRole::COACH,\n # …\n)\n\n# Literal values are also permissible:\nbelieve.characters.create(\n role: :coach,\n # …\n)\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.\n\n## Requirements\n\nRuby 3.2.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/cjavdev/believe-ruby/tree/main/CONTRIBUTING.md).\n',
3619
4218
  },
3620
4219
  {
3621
4220
  language: 'java',
3622
- content: '# Believe Java API Library\n\n<!-- x-release-please-start-version -->\n[![Maven Central](https://img.shields.io/maven-central/v/com.believe.api/believe-java)](https://central.sonatype.com/artifact/com.believe.api/believe-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.believe.api/believe-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.believe.api/believe-java/0.0.1)\n<!-- x-release-please-end -->\n\nThe Believe Java SDK provides convenient access to the Believe REST API from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJuYW1lIjoiQGNqYXZkZXYvYmVsaWV2ZS1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9iZWxpZXZlLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYmVsaWV2ZS1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbelieve.stlmcp.com%22%2C%22headers%22%3A%7B%22x-believe-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nJavadocs are available on [javadoc.io](https://javadoc.io/doc/com.believe.api/believe-java/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("com.believe.api:believe-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>com.believe.api</groupId>\n <artifactId>believe-java</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport com.believe.api.models.characters.CharacterListPage;\nimport com.believe.api.models.characters.CharacterListParams;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClient client = BelieveOkHttpClient.fromEnv();\n\nCharacterListPage page = client.characters().list();\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClient client = BelieveOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n // Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n // Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | ----------------- | -------------------- | -------- | ---------------------------- |\n| `apiKey` | `believe.apiKey` | `BELIEVE_API_KEY` | true | - |\n| `baseUrl` | `believe.baseUrl` | `BELIEVE_BASE_URL` | true | `"https://believe.cjav.dev"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.believe.api.client.BelieveClient;\n\nBelieveClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Believe API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.characters().list(...)` should be called with an instance of `CharacterListParams`, and it will return an instance of `CharacterListPage`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport com.believe.api.models.characters.CharacterListPageAsync;\nimport com.believe.api.models.characters.CharacterListParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClient client = BelieveOkHttpClient.fromEnv();\n\nCompletableFuture<CharacterListPageAsync> page = client.async().characters().list();\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.believe.api.client.BelieveClientAsync;\nimport com.believe.api.client.okhttp.BelieveOkHttpClientAsync;\nimport com.believe.api.models.characters.CharacterListPageAsync;\nimport com.believe.api.models.characters.CharacterListParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClientAsync client = BelieveOkHttpClientAsync.fromEnv();\n\nCompletableFuture<CharacterListPageAsync> page = client.characters().list();\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n## File uploads\n\nThe SDK defines methods that accept files.\n\nTo upload a file, pass a [`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html):\n\n```java\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\nimport java.nio.file.Paths;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file(Paths.get("/path/to/file"))\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\nOr an arbitrary [`InputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html):\n\n```java\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\nimport java.net.URL;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file(new URL("https://example.com//path/to/file").openStream())\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\nOr a `byte[]` array:\n\n```java\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file("content".getBytes())\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\nNote that when passing a non-`Path` its filename is unknown so it will not be included in the request. To manually set a filename, pass a [`MultipartField`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```java\nimport com.believe.api.core.MultipartField;\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\nimport java.io.InputStream;\nimport java.net.URL;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file(MultipartField.<InputStream>builder()\n .value(new URL("https://example.com//path/to/file").openStream())\n .filename("/path/to/file")\n .build())\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.believe.api.core.http.Headers;\nimport com.believe.api.core.http.HttpResponseFor;\nimport com.believe.api.models.characters.CharacterListPage;\nimport com.believe.api.models.characters.CharacterListParams;\n\nHttpResponseFor<CharacterListPage> page = client.characters().withRawResponse().list();\n\nint statusCode = page.statusCode();\nHeaders headers = page.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage parsedPage = page.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`BelieveServiceException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](believe-java-core/src/main/kotlin/com/believe/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](believe-java-core/src/main/kotlin/com/believe/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](believe-java-core/src/main/kotlin/com/believe/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](believe-java-core/src/main/kotlin/com/believe/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](believe-java-core/src/main/kotlin/com/believe/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](believe-java-core/src/main/kotlin/com/believe/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](believe-java-core/src/main/kotlin/com/believe/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`BelieveIoException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveIoException.kt): I/O networking errors.\n\n- [`BelieveRetryableException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`BelieveInvalidDataException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`BelieveException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.believe.api.models.characters.Character;\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list();\n\n// Process as an Iterable\nfor (Character character : page.autoPager()) {\n System.out.println(character);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(character -> System.out.println(character));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](believe-java-core/src/main/kotlin/com/believe/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.believe.api.core.http.AsyncStreamResponse;\nimport com.believe.api.models.characters.Character;\nimport com.believe.api.models.characters.CharacterListPageAsync;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<CharacterListPageAsync> pageFuture = client.async().characters().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(character -> {\n System.out.println(character);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(Character character) {\n System.out.println(character);\n }\n\n @Override\n public void onComplete(Optional<Throwable> error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(character -> {\n System.out.println(character);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.believe.api.models.characters.Character;\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list();\nwhile (true) {\n for (Character character : page.items()) {\n System.out.println(character);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nThe SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).\n\nEnable logging by setting the `BELIEVE_LOG` environment variable to `info`:\n\n```sh\nexport BELIEVE_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport BELIEVE_LOG=debug\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `believe-java-core` is published with a [configuration file](believe-java-core/src/main/resources/META-INF/proguard/believe-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport java.time.Duration;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport java.time.Duration;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `believe-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveClient`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClient.kt), [`BelieveClientAsync`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsync.kt), [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt), and [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), all of which can work with any HTTP client\n- `believe-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) and [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), which provide a way to construct [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) and [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), respectively, using OkHttp\n- `believe-java`\n - Depends on and exposes the APIs of both `believe-java-core` and `believe-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`believe-java` dependency](#installation) with `believe-java-core`\n2. Copy `believe-java-client-okhttp`\'s [`OkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`believe-java` dependency](#installation) with `believe-java-core`\n2. Write a class that implements the [`HttpClient`](believe-java-core/src/main/kotlin/com/believe/api/core/http/HttpClient.kt) interface\n3. Construct [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport com.believe.api.models.characters.CharacterListParams;\n\nCharacterListParams params = CharacterListParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport com.believe.api.models.characters.CharacterCreateParams;\nimport com.believe.api.models.characters.EmotionalStats;\n\nCharacterCreateParams params = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt) object to its setter:\n\n```java\nimport com.believe.api.models.characters.CharacterListParams;\n\nCharacterListParams params = CharacterListParams.builder().build();\n```\n\nThe most straightforward way to create a [`JsonValue`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```java\nimport com.believe.api.core.JsonMissing;\nimport com.believe.api.models.characters.CharacterCreateParams;\nimport com.believe.api.models.characters.CharacterListParams;\nimport com.believe.api.models.characters.CharacterRole;\nimport com.believe.api.models.characters.EmotionalStats;\nimport java.util.List;\n\nCharacterListParams params = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .curiosity(40L)\n .empathy(85L)\n .optimism(45L)\n .resilience(95L)\n .vulnerability(60L)\n .build())\n .name("Roy Kent")\n .personalityTraits(List.of(\n "intense",\n "loyal",\n "secretly caring",\n "profane"\n ))\n .role(CharacterRole.COACH)\n .background(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> additionalProperties = client.characters().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.believe.api.core.JsonField;\nimport java.util.Optional;\n\nJsonField<String> background = client.characters().create(params)._background();\n\nif (background.isMissing()) {\n // The property is absent from the JSON response\n} else if (background.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional<String> jsonString = background.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = background.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`BelieveInvalidDataException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt) only if you directly access the property.\n\nIf you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.believe.api.models.characters.Character;\n\nCharacter character = client.characters().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list(RequestOptions.builder().responseValidation(true).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-java/issues) with questions, bugs, or suggestions.\n',
4221
+ content: '# Believe Java API Library\n\n<!-- x-release-please-start-version -->\n[![Maven Central](https://img.shields.io/maven-central/v/com.believe.api/believe-java)](https://central.sonatype.com/artifact/com.believe.api/believe-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.believe.api/believe-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.believe.api/believe-java/0.0.1)\n<!-- x-release-please-end -->\n\nThe Believe Java SDK provides convenient access to the Believe REST API from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjamF2ZGV2L2JlbGlldmUtbWNwIl0sImVudiI6eyJCRUxJRVZFX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cjavdev%2Fbelieve-mcp%22%5D%2C%22env%22%3A%7B%22BELIEVE_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nJavadocs are available on [javadoc.io](https://javadoc.io/doc/com.believe.api/believe-java/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("com.believe.api:believe-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>com.believe.api</groupId>\n <artifactId>believe-java</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport com.believe.api.models.characters.CharacterListPage;\nimport com.believe.api.models.characters.CharacterListParams;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClient client = BelieveOkHttpClient.fromEnv();\n\nCharacterListPage page = client.characters().list();\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClient client = BelieveOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n // Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n // Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | ----------------- | -------------------- | -------- | ---------------------------- |\n| `apiKey` | `believe.apiKey` | `BELIEVE_API_KEY` | true | - |\n| `baseUrl` | `believe.baseUrl` | `BELIEVE_BASE_URL` | true | `"https://believe.cjav.dev"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.believe.api.client.BelieveClient;\n\nBelieveClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Believe API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.characters().list(...)` should be called with an instance of `CharacterListParams`, and it will return an instance of `CharacterListPage`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport com.believe.api.models.characters.CharacterListPageAsync;\nimport com.believe.api.models.characters.CharacterListParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClient client = BelieveOkHttpClient.fromEnv();\n\nCompletableFuture<CharacterListPageAsync> page = client.async().characters().list();\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.believe.api.client.BelieveClientAsync;\nimport com.believe.api.client.okhttp.BelieveOkHttpClientAsync;\nimport com.believe.api.models.characters.CharacterListPageAsync;\nimport com.believe.api.models.characters.CharacterListParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nBelieveClientAsync client = BelieveOkHttpClientAsync.fromEnv();\n\nCompletableFuture<CharacterListPageAsync> page = client.characters().list();\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n## File uploads\n\nThe SDK defines methods that accept files.\n\nTo upload a file, pass a [`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html):\n\n```java\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\nimport java.nio.file.Paths;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file(Paths.get("/path/to/file"))\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\nOr an arbitrary [`InputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html):\n\n```java\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\nimport java.net.URL;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file(new URL("https://example.com//path/to/file").openStream())\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\nOr a `byte[]` array:\n\n```java\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file("content".getBytes())\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\nNote that when passing a non-`Path` its filename is unknown so it will not be included in the request. To manually set a filename, pass a [`MultipartField`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```java\nimport com.believe.api.core.MultipartField;\nimport com.believe.api.models.teams.logo.FileUpload;\nimport com.believe.api.models.teams.logo.LogoUploadParams;\nimport java.io.InputStream;\nimport java.net.URL;\n\nLogoUploadParams params = LogoUploadParams.builder()\n .teamId("team_id")\n .file(MultipartField.<InputStream>builder()\n .value(new URL("https://example.com//path/to/file").openStream())\n .filename("/path/to/file")\n .build())\n .build();\nFileUpload fileUpload = client.teams().logo().upload(params);\n```\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.believe.api.core.http.Headers;\nimport com.believe.api.core.http.HttpResponseFor;\nimport com.believe.api.models.characters.CharacterListPage;\nimport com.believe.api.models.characters.CharacterListParams;\n\nHttpResponseFor<CharacterListPage> page = client.characters().withRawResponse().list();\n\nint statusCode = page.statusCode();\nHeaders headers = page.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage parsedPage = page.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`BelieveServiceException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](believe-java-core/src/main/kotlin/com/believe/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](believe-java-core/src/main/kotlin/com/believe/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](believe-java-core/src/main/kotlin/com/believe/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](believe-java-core/src/main/kotlin/com/believe/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](believe-java-core/src/main/kotlin/com/believe/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](believe-java-core/src/main/kotlin/com/believe/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](believe-java-core/src/main/kotlin/com/believe/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`BelieveIoException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveIoException.kt): I/O networking errors.\n\n- [`BelieveRetryableException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`BelieveInvalidDataException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`BelieveException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.believe.api.models.characters.Character;\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list();\n\n// Process as an Iterable\nfor (Character character : page.autoPager()) {\n System.out.println(character);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(character -> System.out.println(character));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](believe-java-core/src/main/kotlin/com/believe/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.believe.api.core.http.AsyncStreamResponse;\nimport com.believe.api.models.characters.Character;\nimport com.believe.api.models.characters.CharacterListPageAsync;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<CharacterListPageAsync> pageFuture = client.async().characters().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(character -> {\n System.out.println(character);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(Character character) {\n System.out.println(character);\n }\n\n @Override\n public void onComplete(Optional<Throwable> error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(character -> {\n System.out.println(character);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.believe.api.models.characters.Character;\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list();\nwhile (true) {\n for (Character character : page.items()) {\n System.out.println(character);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nThe SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).\n\nEnable logging by setting the `BELIEVE_LOG` environment variable to `info`:\n\n```sh\nexport BELIEVE_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport BELIEVE_LOG=debug\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `believe-java-core` is published with a [configuration file](believe-java-core/src/main/resources/META-INF/proguard/believe-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport java.time.Duration;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\nimport java.time.Duration;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `believe-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveClient`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClient.kt), [`BelieveClientAsync`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsync.kt), [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt), and [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), all of which can work with any HTTP client\n- `believe-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) and [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), which provide a way to construct [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) and [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), respectively, using OkHttp\n- `believe-java`\n - Depends on and exposes the APIs of both `believe-java-core` and `believe-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`believe-java` dependency](#installation) with `believe-java-core`\n2. Copy `believe-java-client-okhttp`\'s [`OkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`believe-java` dependency](#installation) with `believe-java-core`\n2. Write a class that implements the [`HttpClient`](believe-java-core/src/main/kotlin/com/believe/api/core/http/HttpClient.kt) interface\n3. Construct [`BelieveClientImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-java-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-java-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport com.believe.api.models.characters.CharacterListParams;\n\nCharacterListParams params = CharacterListParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport com.believe.api.models.characters.CharacterCreateParams;\nimport com.believe.api.models.characters.EmotionalStats;\n\nCharacterCreateParams params = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt) object to its setter:\n\n```java\nimport com.believe.api.models.characters.CharacterListParams;\n\nCharacterListParams params = CharacterListParams.builder().build();\n```\n\nThe most straightforward way to create a [`JsonValue`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](believe-java-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```java\nimport com.believe.api.core.JsonMissing;\nimport com.believe.api.models.characters.CharacterCreateParams;\nimport com.believe.api.models.characters.CharacterListParams;\nimport com.believe.api.models.characters.CharacterRole;\nimport com.believe.api.models.characters.EmotionalStats;\nimport java.util.List;\n\nCharacterListParams params = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .curiosity(40L)\n .empathy(85L)\n .optimism(45L)\n .resilience(95L)\n .vulnerability(60L)\n .build())\n .name("Roy Kent")\n .personalityTraits(List.of(\n "intense",\n "loyal",\n "secretly caring",\n "profane"\n ))\n .role(CharacterRole.COACH)\n .background(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.believe.api.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> additionalProperties = client.characters().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.believe.api.core.JsonField;\nimport java.util.Optional;\n\nJsonField<String> background = client.characters().create(params)._background();\n\nif (background.isMissing()) {\n // The property is absent from the JSON response\n} else if (background.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional<String> jsonString = background.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = background.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`BelieveInvalidDataException`](believe-java-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt) only if you directly access the property.\n\nIf you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.believe.api.models.characters.Character;\n\nCharacter character = client.characters().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.believe.api.models.characters.CharacterListPage;\n\nCharacterListPage page = client.characters().list(RequestOptions.builder().responseValidation(true).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.believe.api.client.BelieveClient;\nimport com.believe.api.client.okhttp.BelieveOkHttpClient;\n\nBelieveClient client = BelieveOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-java/issues) with questions, bugs, or suggestions.\n',
3623
4222
  },
3624
4223
  {
3625
4224
  language: 'kotlin',
3626
- content: '# Believe Kotlin API Library\n\n<!-- x-release-please-start-version -->\n[![Maven Central](https://img.shields.io/maven-central/v/com.believe.api/believe-kotlin)](https://central.sonatype.com/artifact/com.believe.api/believe-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.believe.api/believe-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.believe.api/believe-kotlin/0.0.1)\n<!-- x-release-please-end -->\n\nThe Believe Kotlin SDK provides convenient access to the Believe REST API from applications written in Kotlin.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJuYW1lIjoiQGNqYXZkZXYvYmVsaWV2ZS1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9iZWxpZXZlLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYmVsaWV2ZS1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbelieve.stlmcp.com%22%2C%22headers%22%3A%7B%22x-believe-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nKDocs are available on [javadoc.io](https://javadoc.io/doc/com.believe.api/believe-kotlin/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("com.believe.api:believe-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>com.believe.api</groupId>\n <artifactId>believe-kotlin</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterListPage\nimport com.believe.api.models.characters.CharacterListParams\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\nval page: CharacterListPage = client.characters().list()\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClient = BelieveOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .apiKey("My API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n // Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n // Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | ----------------- | -------------------- | -------- | ---------------------------- |\n| `apiKey` | `believe.apiKey` | `BELIEVE_API_KEY` | true | - |\n| `baseUrl` | `believe.baseUrl` | `BELIEVE_BASE_URL` | true | `"https://believe.cjav.dev"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\n\nval clientWithOptions: BelieveClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Believe API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.characters().list(...)` should be called with an instance of `CharacterListParams`, and it will return an instance of `CharacterListPage`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterListPageAsync\nimport com.believe.api.models.characters.CharacterListParams\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\nval page: CharacterListPageAsync = client.async().characters().list()\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.believe.api.client.BelieveClientAsync\nimport com.believe.api.client.okhttp.BelieveOkHttpClientAsync\nimport com.believe.api.models.characters.CharacterListPageAsync\nimport com.believe.api.models.characters.CharacterListParams\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClientAsync = BelieveOkHttpClientAsync.fromEnv()\n\nval page: CharacterListPageAsync = client.characters().list()\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n\n\n## File uploads\n\nThe SDK defines methods that accept files.\n\nTo upload a file, pass a [`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html):\n\n```kotlin\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.nio.file.Paths\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file(Paths.get("/path/to/file"))\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\nOr an arbitrary [`InputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html):\n\n```kotlin\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.net.URL\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file(URL("https://example.com//path/to/file").openStream())\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\nOr a `ByteArray`:\n\n```kotlin\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file("content".toByteArray())\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\nNote that when passing a non-`Path` its filename is unknown so it will not be included in the request. To manually set a filename, pass a [`MultipartField`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```kotlin\nimport com.believe.api.core.MultipartField\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.io.InputStream\nimport java.net.URL\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file(MultipartField.builder<InputStream>()\n .value(URL("https://example.com//path/to/file").openStream())\n .filename("/path/to/file")\n .build())\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.believe.api.core.http.Headers\nimport com.believe.api.core.http.HttpResponseFor\nimport com.believe.api.models.characters.CharacterListPage\nimport com.believe.api.models.characters.CharacterListParams\n\nval page: HttpResponseFor<CharacterListPage> = client.characters().withRawResponse().list()\n\nval statusCode: Int = page.statusCode()\nval headers: Headers = page.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval parsedPage: CharacterListPage = page.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`BelieveServiceException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`BelieveIoException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveIoException.kt): I/O networking errors.\n\n- [`BelieveRetryableException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`BelieveInvalidDataException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`BelieveException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list()\npage.autoPager()\n .take(50)\n .forEach { character -> println(character) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPageAsync\n\nval page: CharacterListPageAsync = client.async().characters().list()\npage.autoPager()\n .take(50)\n .forEach { character -> println(character) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.believe.api.models.characters.Character\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list()\nwhile (true) {\n for (character in page.items()) {\n println(character)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nThe SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).\n\nEnable logging by setting the `BELIEVE_LOG` environment variable to `info`:\n\n```sh\nexport BELIEVE_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport BELIEVE_LOG=debug\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `believe-kotlin-core` is published with a [configuration file](believe-kotlin-core/src/main/resources/META-INF/proguard/believe-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build())\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport java.time.Duration\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport java.time.Duration\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `believe-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveClient`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClient.kt), [`BelieveClientAsync`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsync.kt), [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt), and [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), all of which can work with any HTTP client\n- `believe-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) and [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), which provide a way to construct [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) and [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), respectively, using OkHttp\n- `believe-kotlin`\n - Depends on and exposes the APIs of both `believe-kotlin-core` and `believe-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`believe-kotlin` dependency](#installation) with `believe-kotlin-core`\n2. Copy `believe-kotlin-client-okhttp`\'s [`OkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`believe-kotlin` dependency](#installation) with `believe-kotlin-core`\n2. Write a class that implements the [`HttpClient`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/http/HttpClient.kt) interface\n3. Construct [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.believe.api.core.JsonValue\nimport com.believe.api.models.characters.CharacterListParams\n\nval params: CharacterListParams = CharacterListParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```kotlin\nimport com.believe.api.core.JsonValue\nimport com.believe.api.models.characters.CharacterCreateParams\nimport com.believe.api.models.characters.EmotionalStats\n\nval params: CharacterCreateParams = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build()\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListParams\n\nval params: CharacterListParams = CharacterListParams.builder().build()\n```\n\nThe most straightforward way to create a [`JsonValue`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.believe.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```kotlin\nimport com.believe.api.core.JsonMissing\nimport com.believe.api.models.characters.CharacterCreateParams\nimport com.believe.api.models.characters.CharacterListParams\nimport com.believe.api.models.characters.CharacterRole\nimport com.believe.api.models.characters.EmotionalStats\n\nval params: CharacterListParams = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .curiosity(40L)\n .empathy(85L)\n .optimism(45L)\n .resilience(95L)\n .vulnerability(60L)\n .build())\n .name("Roy Kent")\n .personalityTraits(listOf(\n "intense",\n "loyal",\n "secretly caring",\n "profane",\n ))\n .role(CharacterRole.COACH)\n .background(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.believe.api.core.JsonBoolean\nimport com.believe.api.core.JsonNull\nimport com.believe.api.core.JsonNumber\nimport com.believe.api.core.JsonValue\n\nval additionalProperties: Map<String, JsonValue> = client.characters().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.believe.api.core.JsonField\n\nval background: JsonField<String> = client.characters().create(params)._background()\n\nif (background.isMissing()) {\n // The property is absent from the JSON response\n} else if (background.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = background.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = background.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`BelieveInvalidDataException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt) only if you directly access the property.\n\nIf you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.believe.api.models.characters.Character\n\nval character: Character = client.characters().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list(RequestOptions.builder().responseValidation(true).build())\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-kotlin/issues) with questions, bugs, or suggestions.\n',
4225
+ content: '# Believe Kotlin API Library\n\n<!-- x-release-please-start-version -->\n[![Maven Central](https://img.shields.io/maven-central/v/com.believe.api/believe-kotlin)](https://central.sonatype.com/artifact/com.believe.api/believe-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.believe.api/believe-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.believe.api/believe-kotlin/0.0.1)\n<!-- x-release-please-end -->\n\nThe Believe Kotlin SDK provides convenient access to the Believe REST API from applications written in Kotlin.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Believe MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40cjavdev%2Fbelieve-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjamF2ZGV2L2JlbGlldmUtbWNwIl0sImVudiI6eyJCRUxJRVZFX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40cjavdev%2Fbelieve-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cjavdev%2Fbelieve-mcp%22%5D%2C%22env%22%3A%7B%22BELIEVE_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nKDocs are available on [javadoc.io](https://javadoc.io/doc/com.believe.api/believe-kotlin/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("com.believe.api:believe-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>com.believe.api</groupId>\n <artifactId>believe-kotlin</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterListPage\nimport com.believe.api.models.characters.CharacterListParams\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\nval page: CharacterListPage = client.characters().list()\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClient = BelieveOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .apiKey("My API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n // Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n // Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | ----------------- | -------------------- | -------- | ---------------------------- |\n| `apiKey` | `believe.apiKey` | `BELIEVE_API_KEY` | true | - |\n| `baseUrl` | `believe.baseUrl` | `BELIEVE_BASE_URL` | true | `"https://believe.cjav.dev"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\n\nval clientWithOptions: BelieveClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Believe API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.characters().list(...)` should be called with an instance of `CharacterListParams`, and it will return an instance of `CharacterListPage`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport com.believe.api.models.characters.CharacterListPageAsync\nimport com.believe.api.models.characters.CharacterListParams\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClient = BelieveOkHttpClient.fromEnv()\n\nval page: CharacterListPageAsync = client.async().characters().list()\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.believe.api.client.BelieveClientAsync\nimport com.believe.api.client.okhttp.BelieveOkHttpClientAsync\nimport com.believe.api.models.characters.CharacterListPageAsync\nimport com.believe.api.models.characters.CharacterListParams\n\n// Configures using the `believe.apiKey` and `believe.baseUrl` system properties\n// Or configures using the `BELIEVE_API_KEY` and `BELIEVE_BASE_URL` environment variables\nval client: BelieveClientAsync = BelieveOkHttpClientAsync.fromEnv()\n\nval page: CharacterListPageAsync = client.characters().list()\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n\n\n## File uploads\n\nThe SDK defines methods that accept files.\n\nTo upload a file, pass a [`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html):\n\n```kotlin\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.nio.file.Paths\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file(Paths.get("/path/to/file"))\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\nOr an arbitrary [`InputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html):\n\n```kotlin\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.net.URL\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file(URL("https://example.com//path/to/file").openStream())\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\nOr a `ByteArray`:\n\n```kotlin\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file("content".toByteArray())\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\nNote that when passing a non-`Path` its filename is unknown so it will not be included in the request. To manually set a filename, pass a [`MultipartField`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```kotlin\nimport com.believe.api.core.MultipartField\nimport com.believe.api.models.teams.logo.FileUpload\nimport com.believe.api.models.teams.logo.LogoUploadParams\nimport java.io.InputStream\nimport java.net.URL\n\nval params: LogoUploadParams = LogoUploadParams.builder()\n .teamId("team_id")\n .file(MultipartField.builder<InputStream>()\n .value(URL("https://example.com//path/to/file").openStream())\n .filename("/path/to/file")\n .build())\n .build()\nval fileUpload: FileUpload = client.teams().logo().upload(params)\n```\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.believe.api.core.http.Headers\nimport com.believe.api.core.http.HttpResponseFor\nimport com.believe.api.models.characters.CharacterListPage\nimport com.believe.api.models.characters.CharacterListParams\n\nval page: HttpResponseFor<CharacterListPage> = client.characters().withRawResponse().list()\n\nval statusCode: Int = page.statusCode()\nval headers: Headers = page.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval parsedPage: CharacterListPage = page.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`BelieveServiceException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`BelieveIoException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveIoException.kt): I/O networking errors.\n\n- [`BelieveRetryableException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`BelieveInvalidDataException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`BelieveException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list()\npage.autoPager()\n .take(50)\n .forEach { character -> println(character) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPageAsync\n\nval page: CharacterListPageAsync = client.async().characters().list()\npage.autoPager()\n .take(50)\n .forEach { character -> println(character) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.believe.api.models.characters.Character\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list()\nwhile (true) {\n for (character in page.items()) {\n println(character)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nThe SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).\n\nEnable logging by setting the `BELIEVE_LOG` environment variable to `info`:\n\n```sh\nexport BELIEVE_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport BELIEVE_LOG=debug\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `believe-kotlin-core` is published with a [configuration file](believe-kotlin-core/src/main/resources/META-INF/proguard/believe-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build())\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport java.time.Duration\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\nimport java.time.Duration\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `believe-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveClient`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClient.kt), [`BelieveClientAsync`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsync.kt), [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt), and [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), all of which can work with any HTTP client\n- `believe-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) and [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), which provide a way to construct [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) and [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), respectively, using OkHttp\n- `believe-kotlin`\n - Depends on and exposes the APIs of both `believe-kotlin-core` and `believe-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`believe-kotlin` dependency](#installation) with `believe-kotlin-core`\n2. Copy `believe-kotlin-client-okhttp`\'s [`OkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`believe-kotlin` dependency](#installation) with `believe-kotlin-core`\n2. Write a class that implements the [`HttpClient`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/http/HttpClient.kt) interface\n3. Construct [`BelieveClientImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientImpl.kt) or [`BelieveClientAsyncImpl`](believe-kotlin-core/src/main/kotlin/com/believe/api/client/BelieveClientAsyncImpl.kt), similarly to [`BelieveOkHttpClient`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClient.kt) or [`BelieveOkHttpClientAsync`](believe-kotlin-client-okhttp/src/main/kotlin/com/believe/api/client/okhttp/BelieveOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.believe.api.core.JsonValue\nimport com.believe.api.models.characters.CharacterListParams\n\nval params: CharacterListParams = CharacterListParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```kotlin\nimport com.believe.api.core.JsonValue\nimport com.believe.api.models.characters.CharacterCreateParams\nimport com.believe.api.models.characters.EmotionalStats\n\nval params: CharacterCreateParams = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build()\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListParams\n\nval params: CharacterListParams = CharacterListParams.builder().build()\n```\n\nThe most straightforward way to create a [`JsonValue`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.believe.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](believe-kotlin-core/src/main/kotlin/com/believe/api/core/Values.kt):\n\n```kotlin\nimport com.believe.api.core.JsonMissing\nimport com.believe.api.models.characters.CharacterCreateParams\nimport com.believe.api.models.characters.CharacterListParams\nimport com.believe.api.models.characters.CharacterRole\nimport com.believe.api.models.characters.EmotionalStats\n\nval params: CharacterListParams = CharacterCreateParams.builder()\n .emotionalStats(EmotionalStats.builder()\n .curiosity(40L)\n .empathy(85L)\n .optimism(45L)\n .resilience(95L)\n .vulnerability(60L)\n .build())\n .name("Roy Kent")\n .personalityTraits(listOf(\n "intense",\n "loyal",\n "secretly caring",\n "profane",\n ))\n .role(CharacterRole.COACH)\n .background(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.believe.api.core.JsonBoolean\nimport com.believe.api.core.JsonNull\nimport com.believe.api.core.JsonNumber\nimport com.believe.api.core.JsonValue\n\nval additionalProperties: Map<String, JsonValue> = client.characters().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.believe.api.core.JsonField\n\nval background: JsonField<String> = client.characters().create(params)._background()\n\nif (background.isMissing()) {\n // The property is absent from the JSON response\n} else if (background.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = background.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = background.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`BelieveInvalidDataException`](believe-kotlin-core/src/main/kotlin/com/believe/api/errors/BelieveInvalidDataException.kt) only if you directly access the property.\n\nIf you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.believe.api.models.characters.Character\n\nval character: Character = client.characters().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.believe.api.models.characters.CharacterListPage\n\nval page: CharacterListPage = client.characters().list(RequestOptions.builder().responseValidation(true).build())\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.believe.api.client.BelieveClient\nimport com.believe.api.client.okhttp.BelieveOkHttpClient\n\nval client: BelieveClient = BelieveOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/cjavdev/believe-kotlin/issues) with questions, bugs, or suggestions.\n',
4226
+ },
4227
+ {
4228
+ language: 'csharp',
4229
+ content: '# Believe C# API Library\n\nThe Believe C# SDK provides convenient access to the Believe REST API from applications written in C#.\n\n## Installation\n\n```bash\ngit clone git@github.com:cjavdev/believe-csharp.git\ndotnet add reference believe-csharp/src/Believe\n```\n\n## Requirements\n\nThis library requires .NET Standard 2.0 or later.\n\n## Usage\n\nSee the [`examples`](examples) directory for complete and runnable examples.\n\n```csharp\nBelieveClient client = new();\n\nCharacterListParams parameters = new();\n\nvar page = await client.Characters.List(parameters);\n\nConsole.WriteLine(page);\n```',
3627
4230
  },
3628
4231
  {
3629
4232
  language: 'cli',
3630
4233
  content: "# Believe CLI\n\nThe official CLI for the Believe REST API.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n<!-- x-release-please-start-version -->\n\n## Installation\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/cjavdev/believe-cli/cmd/believe@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n<!-- x-release-please-end -->\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nbelieve [resource] <command> [flags...]\n~~~\n\n~~~sh\nbelieve characters list \\\n --api-key 'My API Key'\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| -------------------- | -------- |\n| `BELIEVE_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `BELIEVE_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nbelieve <command> --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nbelieve <command> --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nbelieve <command> <<YAML\narg:\n image: \"@abe.jpg\"\nYAML\n~~~\n\nIf you need to pass a string literal that begins with an `@` sign, you can\nescape the `@` sign to avoid accidentally passing a file.\n\n~~~bash\nbelieve <command> --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nbelieve <command> --arg @data://file.txt\n~~~\n",
3631
4234
  },
4235
+ {
4236
+ language: 'php',
4237
+ content: '# Believe PHP API Library\n\nThe Believe PHP library provides convenient access to the Believe REST API from any PHP 8.1.0+ application.\n\n## Installation\n\nTo use this package, install via Composer by adding the following to your application\'s `composer.json`:\n\n<!-- x-release-please-start-version -->\n```json\n{\n "repositories": [\n {\n "type": "vcs",\n "url": "git@github.com:cjavdev/believe-php.git"\n }\n ],\n "require": {\n "org-placeholder/believe": "dev-main"\n }\n}\n```\n<!-- x-release-please-end -->\n\n## Usage\n\n```php\n<?php\n\n$client = new Client(apiKey: getenv(\'BELIEVE_API_KEY\') ?: \'My API Key\');\n\n$page = $client->characters->list();\n\nvar_dump($page->id);\n```',
4238
+ },
3632
4239
  ];
3633
4240
  const INDEX_OPTIONS = {
3634
4241
  fields: [