diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 09cc09b..8eef584 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.402.12 +speakeasyVersion: 1.402.14 sources: merge-code-samples-into-spec: sourceNamespace: merge-code-samples-into-spec - sourceRevisionDigest: sha256:2d68b77b0f210872692933b76a92278eb70d7cad1d7ae9255b9f963a73e6c4d1 - sourceBlobDigest: sha256:4ead2640798e3d2d3e0ec170662a8351a537e9687ae94fce3196568baf982e5d + sourceRevisionDigest: sha256:cfa5025b4f14ff092b40064a664f15b2fd6d634293b0da2352863417701b072f + sourceBlobDigest: sha256:b537845789964150e66375a92bf7cd5d04e26a42199b989b171a38bf56e402f3 tags: - latest - main diff --git a/openapi-with-code-samples.yaml b/openapi-with-code-samples.yaml index 0251a03..ca46071 100644 --- a/openapi-with-code-samples.yaml +++ b/openapi-with-code-samples.yaml @@ -20,7 +20,7 @@ paths: x-speakeasy-name-override: "create" x-speakeasy-usage-example: true summary: "Create a new link" - x-codeSamples: [{"lang": "typescript", "label": "createLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.create();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "createLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Create(ctx, &operations.CreateLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "createLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n)\n \nres = s.links.create(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "createLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: '...',\n );\n $response = $sdk->links->create($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: createLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.create(request={\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "createLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.create();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "createLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Create(ctx, &operations.CreateLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "createLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n)\n \nres = s.links.create(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "createLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n );\n $response = $sdk->links->create($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: createLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.create(request={\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Create a new link for the authenticated workspace." tags: - "Links" @@ -178,7 +178,7 @@ paths: operationId: "getLinks" x-speakeasy-name-override: "list" x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "pageSize", "in": "parameters", "type": "limit"}], "outputs": {"results": "$"}} - x-codeSamples: [{"lang": "typescript", "label": "getLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.list();\n \n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();"}, {"lang": "go", "label": "getLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.List(ctx, operations.GetLinksRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}"}, {"lang": "ruby", "label": "getLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.links.list(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "getLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksRequest(\n page: 1,\n pageSize: 50,\n );\n $response = $sdk->links->list($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.list(request={\n \"page\": 1,\n \"page_size\": 50,\n})\n\nif res is not None:\n while True:\n # handle items\n\n res = res.next()\n if res is None:\n break"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.list();\n\n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();"}, {"lang": "go", "label": "getLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.List(ctx, operations.GetLinksRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}"}, {"lang": "ruby", "label": "getLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.links.list(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "getLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksRequest(\n page: 1,\n pageSize: 50,\n );\n $response = $sdk->links->list($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.list(request={\n \"page\": 1,\n \"page_size\": 50,\n})\n\nif res is not None:\n while True:\n # handle items\n\n res = res.next()\n if res is None:\n break"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] summary: "Retrieve a list of links" description: "Retrieve a paginated list of links for the authenticated workspace." tags: @@ -299,7 +299,7 @@ paths: operationId: "getLinksCount" x-speakeasy-name-override: "count" summary: "Retrieve links count" - x-codeSamples: [{"lang": "typescript", "label": "getLinksCount", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.count();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "getLinksCount", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Count(ctx, operations.GetLinksCountRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getLinksCount", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksCountRequest.new()\n \nres = s.links.count(req)\n\nif ! res.number.nil?\n # handle response\nend"}, {"lang": "php", "label": "getLinksCount", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksCountRequest();\n $response = $sdk->links->count($request);\n\n if ($response->number !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getLinksCount, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.count(request={})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/count\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getLinksCount", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.count();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getLinksCount", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Count(ctx, operations.GetLinksCountRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getLinksCount", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinksCountRequest.new()\n \nres = s.links.count(req)\n\nif ! res.number.nil?\n # handle response\nend"}, {"lang": "php", "label": "getLinksCount", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksCountRequest();\n $response = $sdk->links->count($request);\n\n if ($response->number !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getLinksCount, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.count(request={})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/count\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve the number of links for the authenticated workspace." tags: - "Links" @@ -402,7 +402,7 @@ paths: operationId: "getLinkInfo" x-speakeasy-name-override: "get" summary: "Retrieve a link" - x-codeSamples: [{"lang": "typescript", "label": "getLinkInfo", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.get();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "getLinkInfo", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Get(ctx, operations.GetLinkInfoRequest{\n LinkID: dubgo.String(\"clux0rgak00011...\"),\n ExternalID: dubgo.String(\"ext_123456\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getLinkInfo", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinkInfoRequest.new(\n link_id: \"clux0rgak00011...\",\n external_id: \"ext_123456\",\n)\n \nres = s.links.get(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "getLinkInfo", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->get('rural-mathematics.name', '', 'clux0rgak00011...', 'ext_123456');\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getLinkInfo, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.get(request={\n \"link_id\": \"clux0rgak00011...\",\n \"external_id\": \"ext_123456\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/info\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getLinkInfo", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.get();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getLinkInfo", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Get(ctx, operations.GetLinkInfoRequest{\n LinkID: dubgo.String(\"clux0rgak00011...\"),\n ExternalID: dubgo.String(\"ext_123456\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getLinkInfo", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetLinkInfoRequest.new(\n link_id: \"clux0rgak00011...\",\n external_id: \"ext_123456\",\n)\n \nres = s.links.get(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "getLinkInfo", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->get('rural-mathematics.name', '', 'clux0rgak00011...', 'ext_123456');\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getLinkInfo, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.get(request={\n \"link_id\": \"clux0rgak00011...\",\n \"external_id\": \"ext_123456\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/info\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve the info for a link." tags: - "Links" @@ -457,7 +457,7 @@ paths: x-speakeasy-name-override: "update" x-speakeasy-max-method-params: 2 summary: "Update a link" - x-codeSamples: [{"lang": "typescript", "label": "updateLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.update(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "updateLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Update(ctx, \"\", &operations.UpdateLinkRequestBody{\n URL: dubgo.String(\"https://google.com\"),\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateUpdateLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.update(link_id=\"\", request_body=::OpenApiSDK::Operations::UpdateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n))\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n '',\n ],\n );\n $response = $sdk->links->update('', $requestBody);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.update(link_id=\"\", request_body={\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/linkId\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "updateLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.update(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "updateLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Update(ctx, \"\", &operations.UpdateLinkRequestBody{\n URL: dubgo.String(\"https://google.com\"),\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateUpdateLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.update(link_id=\"\", request_body=::OpenApiSDK::Operations::UpdateLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n))\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n );\n $response = $sdk->links->update('', $requestBody);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.update(link_id=\"\", request_body={\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/linkId\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Update a link for the authenticated workspace. If there's no change, returns it as it is." tags: - "Links" @@ -622,7 +622,7 @@ paths: x-speakeasy-name-override: "delete" x-speakeasy-max-method-params: 1 summary: "Delete a link" - x-codeSamples: [{"lang": "typescript", "label": "deleteLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.delete(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "deleteLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Delete(ctx, \"\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "deleteLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.delete(link_id=\"\")\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "deleteLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->delete('');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: deleteLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.delete(link_id=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/linkId\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "deleteLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "deleteLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Delete(ctx, \"\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "deleteLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.links.delete(link_id=\"\")\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "deleteLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->delete('');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: deleteLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.delete(link_id=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/linkId\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Delete a link for the authenticated workspace." tags: - "Links" @@ -663,7 +663,7 @@ paths: operationId: "bulkCreateLinks" x-speakeasy-name-override: "createMany" summary: "Bulk create links" - x-codeSamples: [{"lang": "typescript", "label": "bulkCreateLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.createMany();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "bulkCreateLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.CreateMany(ctx, []operations.RequestBody{\n operations.RequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateBulkCreateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n operations.RequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateBulkCreateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "bulkCreateLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = [\n ::OpenApiSDK::Operations::RequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n ),\n]\n \nres = s.links.create_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "bulkCreateLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = [\n new Operations\\RequestBody,\n ];\n $response = $sdk->links->createMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: bulkCreateLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.create_many(request=[\n {\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n {\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n])\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"[{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}]\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/bulk\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "bulkCreateLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.createMany();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "bulkCreateLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.CreateMany(ctx, []operations.RequestBody{\n operations.RequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateBulkCreateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n operations.RequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateBulkCreateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "bulkCreateLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = [\n ::OpenApiSDK::Operations::RequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n ),\n]\n \nres = s.links.create_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "bulkCreateLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = [\n new Operations\\RequestBody,\n ];\n $response = $sdk->links->createMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: bulkCreateLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.create_many(request=[\n {\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n {\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n])\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"[{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}]\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/bulk\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Bulk create up to 100 links for the authenticated workspace." tags: - "Links" @@ -825,7 +825,7 @@ paths: operationId: "bulkUpdateLinks" x-speakeasy-name-override: "updateMany" summary: "Bulk update links" - x-codeSamples: [{"lang": "typescript", "label": "bulkUpdateLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.updateMany();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "bulkUpdateLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.UpdateMany(ctx, &operations.BulkUpdateLinksRequestBody{\n LinkIds: []string{\n \"\",\n },\n Data: operations.Data{\n URL: dubgo.String(\"https://google.com\"),\n TagIds: dubgo.Pointer(operations.CreateBulkUpdateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "bulkUpdateLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::BulkUpdateLinksRequestBody.new(\n link_ids: [\n \"\",\n ],\n data: ::OpenApiSDK::Operations::Data.new(\n url: \"https://google.com\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n ),\n)\n \nres = s.links.update_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "bulkUpdateLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\BulkUpdateLinksRequestBody(\n linkIds: [\n '',\n ],\n data: new Operations\\Data(\n url: 'https://google.com',\n tagIds: '...',\n ),\n );\n $response = $sdk->links->updateMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: bulkUpdateLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.update_many(request={\n \"link_ids\": [\n \"\",\n ],\n \"data\": {\n \"url\": \"https://google.com\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"linkIds\\\":[\\\"string\\\"],\\\"data\\\":{\\\"url\\\":\\\"https://google.com\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/bulk\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "bulkUpdateLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.updateMany();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "bulkUpdateLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.UpdateMany(ctx, &operations.BulkUpdateLinksRequestBody{\n LinkIds: []string{\n \"\",\n },\n Data: operations.Data{\n URL: dubgo.String(\"https://google.com\"),\n TagIds: dubgo.Pointer(operations.CreateBulkUpdateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "bulkUpdateLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::BulkUpdateLinksRequestBody.new(\n link_ids: [\n \"\",\n ],\n data: ::OpenApiSDK::Operations::Data.new(\n url: \"https://google.com\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n ),\n)\n \nres = s.links.update_many(req)\n\nif ! res.link_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "bulkUpdateLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\BulkUpdateLinksRequestBody(\n linkIds: [\n '',\n ],\n data: new Operations\\Data(\n url: 'https://google.com',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n );\n $response = $sdk->links->updateMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: bulkUpdateLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.update_many(request={\n \"link_ids\": [\n \"\",\n ],\n \"data\": {\n \"url\": \"https://google.com\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"linkIds\\\":[\\\"string\\\"],\\\"data\\\":{\\\"url\\\":\\\"https://google.com\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/bulk\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Bulk update up to 100 links with the same data for the authenticated workspace." tags: - "Links" @@ -979,7 +979,7 @@ paths: operationId: "bulkDeleteLinks" x-speakeasy-name-override: "deleteMany" summary: "Bulk delete links" - x-codeSamples: [{"lang": "typescript", "label": "bulkDeleteLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.deleteMany({\n linkIds: [\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n ],\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "bulkDeleteLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.DeleteMany(ctx, operations.BulkDeleteLinksRequest{\n LinkIds: []string{\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "bulkDeleteLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::BulkDeleteLinksRequest.new(\n link_ids: [\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n ],\n)\n \nres = s.links.delete_many(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "bulkDeleteLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->deleteMany([\n 'clux0rgak00011...',\n 'clux0rgak00022...',\n]);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: bulkDeleteLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.delete_many(request={\n \"link_ids\": [\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/bulk\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "bulkDeleteLinks", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.deleteMany({\n linkIds: [\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "bulkDeleteLinks", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.DeleteMany(ctx, operations.BulkDeleteLinksRequest{\n LinkIds: []string{\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "bulkDeleteLinks", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::BulkDeleteLinksRequest.new(\n link_ids: [\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n ],\n)\n \nres = s.links.delete_many(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "bulkDeleteLinks", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->deleteMany([\n 'clux0rgak00011...',\n 'clux0rgak00022...',\n]);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: bulkDeleteLinks, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.delete_many(request={\n \"link_ids\": [\n \"clux0rgak00011...\",\n \"clux0rgak00022...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/bulk\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Bulk delete up to 100 links for the authenticated workspace." tags: - "Links" @@ -1026,7 +1026,7 @@ paths: x-speakeasy-name-override: "upsert" x-speakeasy-usage-example: true summary: "Upsert a link" - x-codeSamples: [{"lang": "typescript", "label": "upsertLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.upsert();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "upsertLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Upsert(ctx, &operations.UpsertLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateUpsertLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "upsertLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n)\n \nres = s.links.upsert(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "upsertLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\UpsertLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n '',\n ],\n );\n $response = $sdk->links->upsert($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: upsertLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.upsert(request={\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/upsert\")\n .put(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "upsertLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.links.upsert();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "upsertLink", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Upsert(ctx, &operations.UpsertLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateUpsertLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "upsertLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(\n url: \"https://google.com\",\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n)\n \nres = s.links.upsert(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "upsertLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\UpsertLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n );\n $response = $sdk->links->upsert($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: upsertLink, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.links.upsert(request={\n \"url\": \"https://google.com\",\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"url\\\":\\\"https://google.com\\\",\\\"domain\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"externalId\\\":\\\"123456\\\",\\\"prefix\\\":\\\"string\\\",\\\"trackConversion\\\":false,\\\"archived\\\":false,\\\"publicStats\\\":false,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":false,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":false,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"geo\\\":{\\\"AF\\\":\\\"string\\\",\\\"AL\\\":\\\"string\\\",\\\"DZ\\\":\\\"string\\\",\\\"AS\\\":\\\"string\\\",\\\"AD\\\":\\\"string\\\",\\\"AO\\\":\\\"string\\\",\\\"AI\\\":\\\"string\\\",\\\"AQ\\\":\\\"string\\\",\\\"AG\\\":\\\"string\\\",\\\"AR\\\":\\\"string\\\",\\\"AM\\\":\\\"string\\\",\\\"AW\\\":\\\"string\\\",\\\"AU\\\":\\\"string\\\",\\\"AT\\\":\\\"string\\\",\\\"AZ\\\":\\\"string\\\",\\\"BS\\\":\\\"string\\\",\\\"BH\\\":\\\"string\\\",\\\"BD\\\":\\\"string\\\",\\\"BB\\\":\\\"string\\\",\\\"BY\\\":\\\"string\\\",\\\"BE\\\":\\\"string\\\",\\\"BZ\\\":\\\"string\\\",\\\"BJ\\\":\\\"string\\\",\\\"BM\\\":\\\"string\\\",\\\"BT\\\":\\\"string\\\",\\\"BO\\\":\\\"string\\\",\\\"BA\\\":\\\"string\\\",\\\"BW\\\":\\\"string\\\",\\\"BV\\\":\\\"string\\\",\\\"BR\\\":\\\"string\\\",\\\"IO\\\":\\\"string\\\",\\\"BN\\\":\\\"string\\\",\\\"BG\\\":\\\"string\\\",\\\"BF\\\":\\\"string\\\",\\\"BI\\\":\\\"string\\\",\\\"KH\\\":\\\"string\\\",\\\"CM\\\":\\\"string\\\",\\\"CA\\\":\\\"string\\\",\\\"CV\\\":\\\"string\\\",\\\"KY\\\":\\\"string\\\",\\\"CF\\\":\\\"string\\\",\\\"TD\\\":\\\"string\\\",\\\"CL\\\":\\\"string\\\",\\\"CN\\\":\\\"string\\\",\\\"CX\\\":\\\"string\\\",\\\"CC\\\":\\\"string\\\",\\\"CO\\\":\\\"string\\\",\\\"KM\\\":\\\"string\\\",\\\"CG\\\":\\\"string\\\",\\\"CD\\\":\\\"string\\\",\\\"CK\\\":\\\"string\\\",\\\"CR\\\":\\\"string\\\",\\\"CI\\\":\\\"string\\\",\\\"HR\\\":\\\"string\\\",\\\"CU\\\":\\\"string\\\",\\\"CY\\\":\\\"string\\\",\\\"CZ\\\":\\\"string\\\",\\\"DK\\\":\\\"string\\\",\\\"DJ\\\":\\\"string\\\",\\\"DM\\\":\\\"string\\\",\\\"DO\\\":\\\"string\\\",\\\"EC\\\":\\\"string\\\",\\\"EG\\\":\\\"string\\\",\\\"SV\\\":\\\"string\\\",\\\"GQ\\\":\\\"string\\\",\\\"ER\\\":\\\"string\\\",\\\"EE\\\":\\\"string\\\",\\\"ET\\\":\\\"string\\\",\\\"FK\\\":\\\"string\\\",\\\"FO\\\":\\\"string\\\",\\\"FJ\\\":\\\"string\\\",\\\"FI\\\":\\\"string\\\",\\\"FR\\\":\\\"string\\\",\\\"GF\\\":\\\"string\\\",\\\"PF\\\":\\\"string\\\",\\\"TF\\\":\\\"string\\\",\\\"GA\\\":\\\"string\\\",\\\"GM\\\":\\\"string\\\",\\\"GE\\\":\\\"string\\\",\\\"DE\\\":\\\"string\\\",\\\"GH\\\":\\\"string\\\",\\\"GI\\\":\\\"string\\\",\\\"GR\\\":\\\"string\\\",\\\"GL\\\":\\\"string\\\",\\\"GD\\\":\\\"string\\\",\\\"GP\\\":\\\"string\\\",\\\"GU\\\":\\\"string\\\",\\\"GT\\\":\\\"string\\\",\\\"GN\\\":\\\"string\\\",\\\"GW\\\":\\\"string\\\",\\\"GY\\\":\\\"string\\\",\\\"HT\\\":\\\"string\\\",\\\"HM\\\":\\\"string\\\",\\\"VA\\\":\\\"string\\\",\\\"HN\\\":\\\"string\\\",\\\"HK\\\":\\\"string\\\",\\\"HU\\\":\\\"string\\\",\\\"IS\\\":\\\"string\\\",\\\"IN\\\":\\\"string\\\",\\\"ID\\\":\\\"string\\\",\\\"IR\\\":\\\"string\\\",\\\"IQ\\\":\\\"string\\\",\\\"IE\\\":\\\"string\\\",\\\"IL\\\":\\\"string\\\",\\\"IT\\\":\\\"string\\\",\\\"JM\\\":\\\"string\\\",\\\"JP\\\":\\\"string\\\",\\\"JO\\\":\\\"string\\\",\\\"KZ\\\":\\\"string\\\",\\\"KE\\\":\\\"string\\\",\\\"KI\\\":\\\"string\\\",\\\"KP\\\":\\\"string\\\",\\\"KR\\\":\\\"string\\\",\\\"KW\\\":\\\"string\\\",\\\"KG\\\":\\\"string\\\",\\\"LA\\\":\\\"string\\\",\\\"LV\\\":\\\"string\\\",\\\"LB\\\":\\\"string\\\",\\\"LS\\\":\\\"string\\\",\\\"LR\\\":\\\"string\\\",\\\"LY\\\":\\\"string\\\",\\\"LI\\\":\\\"string\\\",\\\"LT\\\":\\\"string\\\",\\\"LU\\\":\\\"string\\\",\\\"MO\\\":\\\"string\\\",\\\"MG\\\":\\\"string\\\",\\\"MW\\\":\\\"string\\\",\\\"MY\\\":\\\"string\\\",\\\"MV\\\":\\\"string\\\",\\\"ML\\\":\\\"string\\\",\\\"MT\\\":\\\"string\\\",\\\"MH\\\":\\\"string\\\",\\\"MQ\\\":\\\"string\\\",\\\"MR\\\":\\\"string\\\",\\\"MU\\\":\\\"string\\\",\\\"YT\\\":\\\"string\\\",\\\"MX\\\":\\\"string\\\",\\\"FM\\\":\\\"string\\\",\\\"MD\\\":\\\"string\\\",\\\"MC\\\":\\\"string\\\",\\\"MN\\\":\\\"string\\\",\\\"MS\\\":\\\"string\\\",\\\"MA\\\":\\\"string\\\",\\\"MZ\\\":\\\"string\\\",\\\"MM\\\":\\\"string\\\",\\\"NA\\\":\\\"string\\\",\\\"NR\\\":\\\"string\\\",\\\"NP\\\":\\\"string\\\",\\\"NL\\\":\\\"string\\\",\\\"NC\\\":\\\"string\\\",\\\"NZ\\\":\\\"string\\\",\\\"NI\\\":\\\"string\\\",\\\"NE\\\":\\\"string\\\",\\\"NG\\\":\\\"string\\\",\\\"NU\\\":\\\"string\\\",\\\"NF\\\":\\\"string\\\",\\\"MK\\\":\\\"string\\\",\\\"MP\\\":\\\"string\\\",\\\"NO\\\":\\\"string\\\",\\\"OM\\\":\\\"string\\\",\\\"PK\\\":\\\"string\\\",\\\"PW\\\":\\\"string\\\",\\\"PS\\\":\\\"string\\\",\\\"PA\\\":\\\"string\\\",\\\"PG\\\":\\\"string\\\",\\\"PY\\\":\\\"string\\\",\\\"PE\\\":\\\"string\\\",\\\"PH\\\":\\\"string\\\",\\\"PN\\\":\\\"string\\\",\\\"PL\\\":\\\"string\\\",\\\"PT\\\":\\\"string\\\",\\\"PR\\\":\\\"string\\\",\\\"QA\\\":\\\"string\\\",\\\"RE\\\":\\\"string\\\",\\\"RO\\\":\\\"string\\\",\\\"RU\\\":\\\"string\\\",\\\"RW\\\":\\\"string\\\",\\\"SH\\\":\\\"string\\\",\\\"KN\\\":\\\"string\\\",\\\"LC\\\":\\\"string\\\",\\\"PM\\\":\\\"string\\\",\\\"VC\\\":\\\"string\\\",\\\"WS\\\":\\\"string\\\",\\\"SM\\\":\\\"string\\\",\\\"ST\\\":\\\"string\\\",\\\"SA\\\":\\\"string\\\",\\\"SN\\\":\\\"string\\\",\\\"SC\\\":\\\"string\\\",\\\"SL\\\":\\\"string\\\",\\\"SG\\\":\\\"string\\\",\\\"SK\\\":\\\"string\\\",\\\"SI\\\":\\\"string\\\",\\\"SB\\\":\\\"string\\\",\\\"SO\\\":\\\"string\\\",\\\"ZA\\\":\\\"string\\\",\\\"GS\\\":\\\"string\\\",\\\"ES\\\":\\\"string\\\",\\\"LK\\\":\\\"string\\\",\\\"SD\\\":\\\"string\\\",\\\"SR\\\":\\\"string\\\",\\\"SJ\\\":\\\"string\\\",\\\"SZ\\\":\\\"string\\\",\\\"SE\\\":\\\"string\\\",\\\"CH\\\":\\\"string\\\",\\\"SY\\\":\\\"string\\\",\\\"TW\\\":\\\"string\\\",\\\"TJ\\\":\\\"string\\\",\\\"TZ\\\":\\\"string\\\",\\\"TH\\\":\\\"string\\\",\\\"TL\\\":\\\"string\\\",\\\"TG\\\":\\\"string\\\",\\\"TK\\\":\\\"string\\\",\\\"TO\\\":\\\"string\\\",\\\"TT\\\":\\\"string\\\",\\\"TN\\\":\\\"string\\\",\\\"TR\\\":\\\"string\\\",\\\"TM\\\":\\\"string\\\",\\\"TC\\\":\\\"string\\\",\\\"TV\\\":\\\"string\\\",\\\"UG\\\":\\\"string\\\",\\\"UA\\\":\\\"string\\\",\\\"AE\\\":\\\"string\\\",\\\"GB\\\":\\\"string\\\",\\\"US\\\":\\\"string\\\",\\\"UM\\\":\\\"string\\\",\\\"UY\\\":\\\"string\\\",\\\"UZ\\\":\\\"string\\\",\\\"VU\\\":\\\"string\\\",\\\"VE\\\":\\\"string\\\",\\\"VN\\\":\\\"string\\\",\\\"VG\\\":\\\"string\\\",\\\"VI\\\":\\\"string\\\",\\\"WF\\\":\\\"string\\\",\\\"EH\\\":\\\"string\\\",\\\"YE\\\":\\\"string\\\",\\\"ZM\\\":\\\"string\\\",\\\"ZW\\\":\\\"string\\\",\\\"AX\\\":\\\"string\\\",\\\"BQ\\\":\\\"string\\\",\\\"CW\\\":\\\"string\\\",\\\"GG\\\":\\\"string\\\",\\\"IM\\\":\\\"string\\\",\\\"JE\\\":\\\"string\\\",\\\"ME\\\":\\\"string\\\",\\\"BL\\\":\\\"string\\\",\\\"MF\\\":\\\"string\\\",\\\"RS\\\":\\\"string\\\",\\\"SX\\\":\\\"string\\\",\\\"SS\\\":\\\"string\\\",\\\"XK\\\":\\\"string\\\"},\\\"doIndex\\\":false,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/links/upsert\")\n .put(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created." tags: - "Links" @@ -1185,7 +1185,7 @@ paths: operationId: "getQRCode" x-speakeasy-name-override: "get" summary: "Retrieve a QR code" - x-codeSamples: [{"lang": "typescript", "label": "getQRCode", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.qrCodes.get({\n url: \"https://normal-making.name\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "getQRCode", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.QRCodes.Get(ctx, operations.GetQRCodeRequest{\n URL: \"https://normal-making.name\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getQRCode", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetQRCodeRequest.new(\n url: \"https://normal-making.name\",\n)\n \nres = s.qr_codes.get(req)\n\nif ! res.res.nil?\n # handle response\nend"}, {"lang": "php", "label": "getQRCode", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetQRCodeRequest(\n url: 'https://normal-making.name',\n );\n $response = $sdk->qrCodes->get($request);\n\n if ($response->res !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getQRCode, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.qr_codes.get(request={\n \"url\": \"https://normal-making.name\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/qr\")\n .get()\n .addHeader(\"accept\", \"image/png\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getQRCode", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.qrCodes.get({\n url: \"https://normal-making.name\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getQRCode", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.QRCodes.Get(ctx, operations.GetQRCodeRequest{\n URL: \"https://normal-making.name\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getQRCode", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetQRCodeRequest.new(\n url: \"https://normal-making.name\",\n)\n \nres = s.qr_codes.get(req)\n\nif ! res.res.nil?\n # handle response\nend"}, {"lang": "php", "label": "getQRCode", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetQRCodeRequest(\n url: 'https://normal-making.name',\n );\n $response = $sdk->qrCodes->get($request);\n\n if ($response->res !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getQRCode, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.qr_codes.get(request={\n \"url\": \"https://normal-making.name\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/qr\")\n .get()\n .addHeader(\"accept\", \"image/png\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve a QR code for a link." tags: - "QR Codes" @@ -1258,7 +1258,7 @@ paths: operationId: "retrieveAnalytics" x-speakeasy-name-override: "retrieve" summary: "Retrieve analytics for a link, a domain, or the authenticated workspace." - x-codeSamples: [{"lang": "typescript", "label": "retrieveAnalytics", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.analytics.retrieve();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "retrieveAnalytics", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Analytics.Retrieve(ctx, operations.RetrieveAnalyticsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n RefererURL: dubgo.String(\"https://dub.co/blog\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "retrieveAnalytics", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n referer_url: \"https://dub.co/blog\",\n)\n \nres = s.analytics.retrieve(req)\n\nif ! res.one_of.nil?\n # handle response\nend"}, {"lang": "php", "label": "retrieveAnalytics", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\RetrieveAnalyticsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n );\n $response = $sdk->analytics->retrieve($request);\n\n if ($response->oneOf !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: retrieveAnalytics, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.analytics.retrieve(request={\n \"timezone\": \"America/New_York\",\n \"city\": \"New York\",\n \"device\": \"Desktop\",\n \"browser\": \"Chrome\",\n \"os\": \"Windows\",\n \"referer\": \"google.com\",\n \"referer_url\": \"https://dub.co/blog\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/analytics\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "retrieveAnalytics", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.analytics.retrieve();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "retrieveAnalytics", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Analytics.Retrieve(ctx, operations.RetrieveAnalyticsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n RefererURL: dubgo.String(\"https://dub.co/blog\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "retrieveAnalytics", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n referer_url: \"https://dub.co/blog\",\n)\n \nres = s.analytics.retrieve(req)\n\nif ! res.one_of.nil?\n # handle response\nend"}, {"lang": "php", "label": "retrieveAnalytics", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\RetrieveAnalyticsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n );\n $response = $sdk->analytics->retrieve($request);\n\n if ($response->oneOf !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: retrieveAnalytics, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.analytics.retrieve(request={\n \"timezone\": \"America/New_York\",\n \"city\": \"New York\",\n \"device\": \"Desktop\",\n \"browser\": \"Chrome\",\n \"os\": \"Windows\",\n \"referer\": \"google.com\",\n \"referer_url\": \"https://dub.co/blog\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/analytics\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters." tags: - "Analytics" @@ -1480,7 +1480,7 @@ paths: operationId: "listEvents" x-speakeasy-name-override: "list" summary: "Retrieve a list of events" - x-codeSamples: [{"lang": "typescript", "label": "listEvents", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.events.list();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "listEvents", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Events.List(ctx, operations.ListEventsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n RefererURL: dubgo.String(\"https://dub.co/blog\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "listEvents", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListEventsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n referer_url: \"https://dub.co/blog\",\n)\n \nres = s.events.list(req)\n\nif ! res.click_events.nil?\n # handle response\nend"}, {"lang": "php", "label": "listEvents", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\ListEventsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n );\n $response = $sdk->events->list($request);\n\n if ($response->clickEvents !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: listEvents, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.events.list(request={\n \"timezone\": \"America/New_York\",\n \"city\": \"New York\",\n \"device\": \"Desktop\",\n \"browser\": \"Chrome\",\n \"os\": \"Windows\",\n \"referer\": \"google.com\",\n \"referer_url\": \"https://dub.co/blog\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/events\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "listEvents", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.events.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "listEvents", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Events.List(ctx, operations.ListEventsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n RefererURL: dubgo.String(\"https://dub.co/blog\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "listEvents", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListEventsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n referer_url: \"https://dub.co/blog\",\n)\n \nres = s.events.list(req)\n\nif ! res.click_events.nil?\n # handle response\nend"}, {"lang": "php", "label": "listEvents", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\ListEventsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n );\n $response = $sdk->events->list($request);\n\n if ($response->clickEvents !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: listEvents, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.events.list(request={\n \"timezone\": \"America/New_York\",\n \"city\": \"New York\",\n \"device\": \"Desktop\",\n \"browser\": \"Chrome\",\n \"os\": \"Windows\",\n \"referer\": \"google.com\",\n \"referer_url\": \"https://dub.co/blog\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/events\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve a paginated list of events for the authenticated workspace." tags: - "Events" @@ -1686,7 +1686,7 @@ paths: operationId: "getWorkspace" x-speakeasy-name-override: "get" summary: "Retrieve a workspace" - x-codeSamples: [{"lang": "typescript", "label": "getWorkspace", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.workspaces.get({\n idOrSlug: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "getWorkspace", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Workspaces.Get(ctx, operations.GetWorkspaceRequest{\n IDOrSlug: \"\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getWorkspace", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(\n id_or_slug: \"\",\n)\n \nres = s.workspaces.get(req)\n\nif ! res.workspace_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "getWorkspace", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->workspaces->get('');\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getWorkspace, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.workspaces.get(request={\n \"id_or_slug\": \"\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/workspaces/idOrSlug\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getWorkspace", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.workspaces.get({\n idOrSlug: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getWorkspace", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Workspaces.Get(ctx, operations.GetWorkspaceRequest{\n IDOrSlug: \"\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getWorkspace", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(\n id_or_slug: \"\",\n)\n \nres = s.workspaces.get(req)\n\nif ! res.workspace_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "getWorkspace", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->workspaces->get('');\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getWorkspace, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.workspaces.get(request={\n \"id_or_slug\": \"\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/workspaces/idOrSlug\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve a workspace for the authenticated user." tags: - "Workspaces" @@ -1720,7 +1720,7 @@ paths: x-speakeasy-name-override: "update" x-speakeasy-max-method-params: 2 summary: "Update a workspace" - x-codeSamples: [{"lang": "typescript", "label": "updateWorkspace", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.workspaces.update(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "updateWorkspace", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Workspaces.Update(ctx, \"\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateWorkspace", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.workspaces.update(id_or_slug=\"\", request_body=::OpenApiSDK::Operations::UpdateWorkspaceRequestBody.new())\n\nif ! res.workspace_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateWorkspace", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateWorkspaceRequestBody();\n $response = $sdk->workspaces->update('', $requestBody);\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateWorkspace, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.workspaces.update(id_or_slug=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/workspaces/idOrSlug\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "updateWorkspace", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.workspaces.update(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "updateWorkspace", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Workspaces.Update(ctx, \"\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateWorkspace", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.workspaces.update(id_or_slug=\"\", request_body=::OpenApiSDK::Operations::UpdateWorkspaceRequestBody.new())\n\nif ! res.workspace_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateWorkspace", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateWorkspaceRequestBody();\n $response = $sdk->workspaces->update('', $requestBody);\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateWorkspace, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.workspaces.update(id_or_slug=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/workspaces/idOrSlug\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Update a workspace by ID or slug." tags: - "Workspaces" @@ -1768,7 +1768,7 @@ paths: operationId: "createTag" x-speakeasy-name-override: "create" summary: "Create a new tag" - x-codeSamples: [{"lang": "typescript", "label": "createTag", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.create();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "createTag", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Create(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "createTag", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateTagRequestBody.new()\n \nres = s.tags.create(req)\n\nif ! res.tag_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "createTag", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateTagRequestBody();\n $response = $sdk->tags->create($request);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: createTag, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.create()\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"string\\\",\\\"color\\\":\\\"red\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "createTag", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.create();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "createTag", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Create(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "createTag", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateTagRequestBody.new()\n \nres = s.tags.create(req)\n\nif ! res.tag_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "createTag", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateTagRequestBody();\n $response = $sdk->tags->create($request);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: createTag, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.create()\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"string\\\",\\\"color\\\":\\\"red\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Create a new tag for the authenticated workspace." tags: - "Tags" @@ -1819,7 +1819,7 @@ paths: operationId: "getTags" x-speakeasy-name-override: "list" summary: "Retrieve a list of tags" - x-codeSamples: [{"lang": "typescript", "label": "getTags", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.list();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "getTags", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.List(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getTags", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.list()\n\nif ! res.tag_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "getTags", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $response = $sdk->tags->list();\n\n if ($response->tagSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getTags, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.list()\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getTags", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getTags", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.List(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getTags", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.list()\n\nif ! res.tag_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "getTags", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $response = $sdk->tags->list();\n\n if ($response->tagSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getTags, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.list()\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve a list of tags for the authenticated workspace." tags: - "Tags" @@ -1848,7 +1848,7 @@ paths: x-speakeasy-name-override: "update" x-speakeasy-max-method-params: 2 summary: "Update a tag" - x-codeSamples: [{"lang": "typescript", "label": "updateTag", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.update(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "updateTag", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Update(ctx, \"\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateTag", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateTagRequestBody.new())\n\nif ! res.tag_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateTag", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateTagRequestBody();\n $response = $sdk->tags->update('', $requestBody);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateTag, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.update(id=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"string\\\",\\\"color\\\":\\\"red\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags/id\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "updateTag", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.update(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "updateTag", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Update(ctx, \"\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateTag", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateTagRequestBody.new())\n\nif ! res.tag_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateTag", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateTagRequestBody();\n $response = $sdk->tags->update('', $requestBody);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateTag, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.update(id=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"string\\\",\\\"color\\\":\\\"red\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags/id\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Update a tag in the workspace." tags: - "Tags" @@ -1908,7 +1908,7 @@ paths: x-speakeasy-name-override: "delete" x-speakeasy-max-method-params: 1 summary: "Delete a tag" - x-codeSamples: [{"lang": "typescript", "label": "deleteTag", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.delete(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "deleteTag", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Delete(ctx, \"\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "deleteTag", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.delete(id=\"\")\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "deleteTag", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->tags->delete('');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: deleteTag, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.delete(id=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags/id\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "deleteTag", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.tags.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "deleteTag", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Delete(ctx, \"\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "deleteTag", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.delete(id=\"\")\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "deleteTag", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->tags->delete('');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: deleteTag, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.tags.delete(id=\"\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/tags/id\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Delete a tag from the workspace. All existing links will still work, but they will no longer be associated with this tag." tags: - "Tags" @@ -1949,7 +1949,7 @@ paths: operationId: "createDomain" x-speakeasy-name-override: "create" summary: "Create a domain" - x-codeSamples: [{"lang": "typescript", "label": "createDomain", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.create();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "createDomain", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Create(ctx, &operations.CreateDomainRequestBody{\n Slug: \"acme.com\",\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "createDomain", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n)\n \nres = s.domains.create(req)\n\nif ! res.domain_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "createDomain", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->create($request);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: createDomain, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.create(request={\n \"slug\": \"acme.com\",\n \"expired_url\": \"https://acme.com/expired\",\n \"archived\": False,\n \"placeholder\": \"https://dub.co/help/article/what-is-dub\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"slug\\\":\\\"acme.com\\\",\\\"expiredUrl\\\":\\\"https://acme.com/expired\\\",\\\"archived\\\":false,\\\"placeholder\\\":\\\"https://dub.co/help/article/what-is-dub\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "createDomain", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.create();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "createDomain", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Create(ctx, &operations.CreateDomainRequestBody{\n Slug: \"acme.com\",\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "createDomain", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n)\n \nres = s.domains.create(req)\n\nif ! res.domain_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "createDomain", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->create($request);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: createDomain, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.create(request={\n \"slug\": \"acme.com\",\n \"expired_url\": \"https://acme.com/expired\",\n \"archived\": False,\n \"placeholder\": \"https://dub.co/help/article/what-is-dub\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"slug\\\":\\\"acme.com\\\",\\\"expiredUrl\\\":\\\"https://acme.com/expired\\\",\\\"archived\\\":false,\\\"placeholder\\\":\\\"https://dub.co/help/article/what-is-dub\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Create a domain for the authenticated workspace." tags: - "Domains" @@ -2003,7 +2003,7 @@ paths: operationId: "listDomains" x-speakeasy-name-override: "list" x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "pageSize", "in": "parameters", "type": "limit"}], "outputs": {"results": "$"}} - x-codeSamples: [{"lang": "typescript", "label": "listDomains", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.list();\n \n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();"}, {"lang": "go", "label": "listDomains", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.List(ctx, operations.ListDomainsRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}"}, {"lang": "ruby", "label": "listDomains", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListDomainsRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.domains.list(req)\n\nif ! res.domain_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "listDomains", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->list(false, '', 1, 50);\n\n if ($response->domainSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: listDomains, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.list(request={\n \"page\": 1,\n \"page_size\": 50,\n})\n\nif res is not None:\n while True:\n # handle items\n\n res = res.next()\n if res is None:\n break"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "listDomains", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.list();\n\n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();"}, {"lang": "go", "label": "listDomains", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.List(ctx, operations.ListDomainsRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}"}, {"lang": "ruby", "label": "listDomains", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::ListDomainsRequest.new(\n page: 1.0,\n page_size: 50.0,\n)\n \nres = s.domains.list(req)\n\nif ! res.domain_schemas.nil?\n # handle response\nend"}, {"lang": "php", "label": "listDomains", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->list(false, '', 1, 50);\n\n if ($response->domainSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: listDomains, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.list(request={\n \"page\": 1,\n \"page_size\": 50,\n})\n\nif res is not None:\n while True:\n # handle items\n\n res = res.next()\n if res is None:\n break"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] summary: "Retrieve a list of domains" description: "Retrieve a list of domains associated with the authenticated workspace." tags: @@ -2068,7 +2068,7 @@ paths: x-speakeasy-name-override: "update" x-speakeasy-max-method-params: 2 summary: "Update a domain" - x-codeSamples: [{"lang": "typescript", "label": "updateDomain", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.update(\"acme.com\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "updateDomain", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Update(ctx, \"acme.com\", &operations.UpdateDomainRequestBody{\n Slug: dubgo.String(\"acme.com\"),\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateDomain", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.update(slug=\"acme.com\", request_body=::OpenApiSDK::Operations::UpdateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n))\n\nif ! res.domain_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateDomain", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->update('acme.com', $requestBody);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateDomain, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.update(slug=\"acme.com\", request_body={\n \"slug\": \"acme.com\",\n \"expired_url\": \"https://acme.com/expired\",\n \"archived\": False,\n \"placeholder\": \"https://dub.co/help/article/what-is-dub\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"slug\\\":\\\"acme.com\\\",\\\"expiredUrl\\\":\\\"https://acme.com/expired\\\",\\\"archived\\\":false,\\\"placeholder\\\":\\\"https://dub.co/help/article/what-is-dub\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains/slug\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "updateDomain", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.update(\"acme.com\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "updateDomain", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Update(ctx, \"acme.com\", &operations.UpdateDomainRequestBody{\n Slug: dubgo.String(\"acme.com\"),\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "updateDomain", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.update(slug=\"acme.com\", request_body=::OpenApiSDK::Operations::UpdateDomainRequestBody.new(\n slug: \"acme.com\",\n expired_url: \"https://acme.com/expired\",\n archived: false,\n placeholder: \"https://dub.co/help/article/what-is-dub\",\n))\n\nif ! res.domain_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "updateDomain", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->update('acme.com', $requestBody);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: updateDomain, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.update(slug=\"acme.com\", request_body={\n \"slug\": \"acme.com\",\n \"expired_url\": \"https://acme.com/expired\",\n \"archived\": False,\n \"placeholder\": \"https://dub.co/help/article/what-is-dub\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"slug\\\":\\\"acme.com\\\",\\\"expiredUrl\\\":\\\"https://acme.com/expired\\\",\\\"archived\\\":false,\\\"placeholder\\\":\\\"https://dub.co/help/article/what-is-dub\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains/slug\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Update a domain for the authenticated workspace." tags: - "Domains" @@ -2130,7 +2130,7 @@ paths: x-speakeasy-name-override: "delete" x-speakeasy-max-method-params: 1 summary: "Delete a domain" - x-codeSamples: [{"lang": "typescript", "label": "deleteDomain", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.delete(\"acme.com\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "deleteDomain", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Delete(ctx, \"acme.com\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "deleteDomain", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.delete(slug=\"acme.com\")\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "deleteDomain", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->delete('acme.com');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: deleteDomain, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.delete(slug=\"acme.com\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains/slug\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "deleteDomain", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.domains.delete(\"acme.com\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "deleteDomain", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Delete(ctx, \"acme.com\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "deleteDomain", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.domains.delete(slug=\"acme.com\")\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "deleteDomain", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->delete('acme.com');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: deleteDomain, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.domains.delete(slug=\"acme.com\")\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/domains/slug\")\n .delete(null)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain." tags: - "Domains" @@ -2173,7 +2173,7 @@ paths: operationId: "trackLead" x-speakeasy-name-override: "lead" summary: "Track a lead" - x-codeSamples: [{"lang": "typescript", "label": "trackLead", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.track.lead();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "trackLead", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Lead(ctx, &operations.TrackLeadRequestBody{\n ClickID: \"\",\n EventName: \"Sign up\",\n CustomerID: \"\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "trackLead", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackLeadRequestBody.new(\n click_id: \"\",\n event_name: \"Sign up\",\n customer_id: \"\",\n)\n \nres = s.track.lead(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "trackLead", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackLeadRequestBody(\n clickId: '',\n eventName: 'Sign up',\n customerId: '',\n );\n $response = $sdk->track->lead($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: trackLead, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.track.lead(request={\n \"click_id\": \"\",\n \"event_name\": \"Sign up\",\n \"customer_id\": \"\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"clickId\\\":\\\"string\\\",\\\"eventName\\\":\\\"Sign up\\\",\\\"customerId\\\":\\\"string\\\",\\\"customerName\\\":\\\"string\\\",\\\"customerEmail\\\":\\\"user@example.com\\\",\\\"customerAvatar\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/track/lead\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "trackLead", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.track.lead();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "trackLead", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Lead(ctx, &operations.TrackLeadRequestBody{\n ClickID: \"\",\n EventName: \"Sign up\",\n CustomerID: \"\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "trackLead", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackLeadRequestBody.new(\n click_id: \"\",\n event_name: \"Sign up\",\n customer_id: \"\",\n)\n \nres = s.track.lead(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "trackLead", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackLeadRequestBody(\n clickId: '',\n eventName: 'Sign up',\n customerId: '',\n );\n $response = $sdk->track->lead($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: trackLead, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.track.lead(request={\n \"click_id\": \"\",\n \"event_name\": \"Sign up\",\n \"customer_id\": \"\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"clickId\\\":\\\"string\\\",\\\"eventName\\\":\\\"Sign up\\\",\\\"customerId\\\":\\\"string\\\",\\\"customerName\\\":\\\"string\\\",\\\"customerEmail\\\":\\\"user@example.com\\\",\\\"customerAvatar\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/track/lead\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Track a lead for a short link." tags: - "Track" @@ -2280,7 +2280,7 @@ paths: operationId: "trackSale" x-speakeasy-name-override: "sale" summary: "Track a sale" - x-codeSamples: [{"lang": "typescript", "label": "trackSale", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.track.sale();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "trackSale", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Sale(ctx, &operations.TrackSaleRequestBody{\n CustomerID: \"\",\n Amount: 996500,\n PaymentProcessor: operations.PaymentProcessorPaddle,\n EventName: dubgo.String(\"Purchase\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "trackSale", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackSaleRequestBody.new(\n customer_id: \"\",\n amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE,\n event_name: \"Purchase\",\n)\n \nres = s.track.sale(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "trackSale", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackSaleRequestBody(\n customerId: '',\n amount: 996500,\n paymentProcessor: Operations\\PaymentProcessor::Paddle,\n eventName: 'Purchase',\n );\n $response = $sdk->track->sale($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: trackSale, source: "from dub import Dub\nfrom dub.models import operations\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.track.sale(request={\n \"customer_id\": \"\",\n \"amount\": 996500,\n \"payment_processor\": operations.PaymentProcessor.PADDLE,\n \"event_name\": \"Purchase\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"customerId\\\":\\\"string\\\",\\\"amount\\\":0,\\\"paymentProcessor\\\":\\\"stripe\\\",\\\"eventName\\\":\\\"Purchase\\\",\\\"invoiceId\\\":\\\"string\\\",\\\"currency\\\":\\\"usd\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/track/sale\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "trackSale", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.track.sale();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "trackSale", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Sale(ctx, &operations.TrackSaleRequestBody{\n CustomerID: \"\",\n Amount: 996500,\n PaymentProcessor: operations.PaymentProcessorPaddle,\n EventName: dubgo.String(\"Purchase\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "trackSale", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackSaleRequestBody.new(\n customer_id: \"\",\n amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE,\n event_name: \"Purchase\",\n)\n \nres = s.track.sale(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "trackSale", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackSaleRequestBody(\n customerId: '',\n amount: 996500,\n paymentProcessor: Operations\\PaymentProcessor::Paddle,\n eventName: 'Purchase',\n );\n $response = $sdk->track->sale($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: trackSale, source: "from dub import Dub\nfrom dub.models import operations\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.track.sale(request={\n \"customer_id\": \"\",\n \"amount\": 996500,\n \"payment_processor\": operations.PaymentProcessor.PADDLE,\n \"event_name\": \"Purchase\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"customerId\\\":\\\"string\\\",\\\"amount\\\":0,\\\"paymentProcessor\\\":\\\"stripe\\\",\\\"eventName\\\":\\\"Purchase\\\",\\\"invoiceId\\\":\\\"string\\\",\\\"currency\\\":\\\"usd\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/track/sale\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Track a sale for a short link." tags: - "Track" @@ -2403,7 +2403,7 @@ paths: operationId: "trackCustomer" x-speakeasy-name-override: "customer" summary: "Track a customer" - x-codeSamples: [{"lang": "typescript", "label": "trackCustomer", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.track.customer();\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "trackCustomer", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Customer(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "trackCustomer", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackCustomerRequestBody.new(\n customer_id: \"\",\n)\n \nres = s.track.customer(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "trackCustomer", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackCustomerRequestBody(\n customerId: '',\n );\n $response = $sdk->track->customer($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: trackCustomer, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.track.customer()\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"customerId\\\":\\\"string\\\",\\\"customerName\\\":\\\"string\\\",\\\"customerEmail\\\":\\\"user@example.com\\\",\\\"customerAvatar\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/track/customer\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "trackCustomer", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.track.customer();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "trackCustomer", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Customer(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "trackCustomer", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::TrackCustomerRequestBody.new(\n customer_id: \"\",\n)\n \nres = s.track.customer(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "trackCustomer", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackCustomerRequestBody(\n customerId: '',\n );\n $response = $sdk->track->customer($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: trackCustomer, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.track.customer()\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"customerId\\\":\\\"string\\\",\\\"customerName\\\":\\\"string\\\",\\\"customerEmail\\\":\\\"user@example.com\\\",\\\"customerAvatar\\\":\\\"string\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/track/customer\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Track a customer for an authenticated workspace." tags: - "Track" @@ -2473,7 +2473,7 @@ paths: operationId: "getMetatags" x-speakeasy-name-override: "get" summary: "Retrieve the metatags for a URL" - x-codeSamples: [{"lang": "typescript", "label": "getMetatags", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.metatags.get({\n url: \"https://dub.co\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"}, {"lang": "go", "label": "getMetatags", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Metatags.Get(ctx, operations.GetMetatagsRequest{\n URL: \"https://dub.co\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getMetatags", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetMetatagsRequest.new(\n url: \"https://dub.co\",\n)\n \nres = s.metatags.get(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "getMetatags", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->metatags->get('https://dub.co');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getMetatags, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.metatags.get(request={\n \"url\": \"https://dub.co\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/metatags\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] + x-codeSamples: [{"lang": "typescript", "label": "getMetatags", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.metatags.get({\n url: \"https://dub.co\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getMetatags", "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Metatags.Get(ctx, operations.GetMetatagsRequest{\n URL: \"https://dub.co\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getMetatags", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetMetatagsRequest.new(\n url: \"https://dub.co\",\n)\n \nres = s.metatags.get(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "getMetatags", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security(\n token: \"DUB_API_KEY\",\n);\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->metatags->get('https://dub.co');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}"}, {lang: python, label: getMetatags, source: "from dub import Dub\n\ns = Dub(\n token=\"DUB_API_KEY\",\n)\n\nres = s.metatags.get(request={\n \"url\": \"https://dub.co\",\n})\n\nif res is not None:\n # handle response\n pass"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/metatags\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"}] description: "Retrieve the metatags for a URL." tags: - "Metatags"