{"id":18384497,"url":"https://github.com/speakeasy-sdks/gh-dev-sample-sdk","last_synced_at":"2025-04-11T23:47:58.556Z","repository":{"id":203186026,"uuid":"709027337","full_name":"speakeasy-sdks/gh-dev-sample-sdk","owner":"speakeasy-sdks","description":"A typescript SDK for accessing the Runscope-API API.","archived":false,"fork":false,"pushed_at":"2024-04-02T21:49:02.000Z","size":1376,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-11T23:47:54.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-sdks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-23T21:39:47.000Z","updated_at":"2023-10-23T21:42:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"c52dbe3c-e922-4f75-bbe8-ea356c2370ee","html_url":"https://github.com/speakeasy-sdks/gh-dev-sample-sdk","commit_stats":null,"previous_names":["speakeasy-sdks/gh-dev-sample-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fgh-dev-sample-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fgh-dev-sample-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fgh-dev-sample-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fgh-dev-sample-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-sdks","download_url":"https://codeload.github.com/speakeasy-sdks/gh-dev-sample-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497890,"owners_count":21113983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:14:41.133Z","updated_at":"2025-04-11T23:47:58.514Z","avatar_url":"https://github.com/speakeasy-sdks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Runscope-API\n\n\u003cdiv align=\"left\"\u003e\n    \u003ca href=\"https://speakeasyapi.dev/\"\u003e\u003cimg src=\"https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge\u0026logoColor=FBE331\u0026logo=speakeasy\u0026labelColor=545454\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/speakeasy-sdks/gh-dev-sample-sdk.git/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/speakeasy-sdks/gh-dev-sample-sdk/speakeasy_sdk_generation.yml?style=for-the-badge\" /\u003e\u003c/a\u003e\n    \n\u003c/div\u003e\n\n\n## 🏗 **Welcome to your new SDK!** 🏗\n\nIt has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:\n- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)\n- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)\n- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)\n- [ ] ✨ When ready to productionize, delete this section from the README\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\n### NPM\n\n```bash\nnpm add https://github.com/speakeasy-sdks/gh-dev-sample-sdk\n```\n\n### Yarn\n\n```bash\nyarn add https://github.com/speakeasy-sdks/gh-dev-sample-sdk\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example\n\n```typescript\nimport { RunscopeAPI } from \"Runscope-API\";\n\nasync function run() {\n    const sdk = new RunscopeAPI({\n        runscopeAuth: \"Bearer \u003cYOUR_ACCESS_TOKEN_HERE\u003e\",\n    });\n\n    const res = await sdk.account.getAccount();\n\n    if (res.statusCode == 200) {\n        // handle response\n    }\n}\n\nrun();\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n### [account](docs/sdks/account/README.md)\n\n* [getAccount](docs/sdks/account/README.md#getaccount) - Account Resource\n* [getTeamsTeamIdAgents](docs/sdks/account/README.md#getteamsteamidagents) - Team agents list\n* [getTeamsTeamIdIntegrations](docs/sdks/account/README.md#getteamsteamidintegrations) - Team integrations list\n* [getTeamsTeamIdPeople](docs/sdks/account/README.md#getteamsteamidpeople) - Teams Resource\n\n### [buckets](docs/sdks/buckets/README.md)\n\n* [deleteBucketsBucketKey](docs/sdks/buckets/README.md#deletebucketsbucketkey) - Delete a single bucket resource.\n* [getBuckets](docs/sdks/buckets/README.md#getbuckets) - Returns a list of buckets.\n* [getBucketsBucketKey](docs/sdks/buckets/README.md#getbucketsbucketkey) - Returns a single bucket resource.\n* [postBuckets](docs/sdks/buckets/README.md#postbuckets) - Create a new bucket\n\n### [sharedEnvironments](docs/sdks/sharedenvironments/README.md)\n\n* [getBucketsBucketKeyEnvironments](docs/sdks/sharedenvironments/README.md#getbucketsbucketkeyenvironments) - Returns list of shared environments for a specified bucket.\n* [postBucketsBucketKeyEnvironments](docs/sdks/sharedenvironments/README.md#postbucketsbucketkeyenvironments) - Create new shared environment.\n* [putBucketsBucketKeyEnvironmentsEnvironmentId](docs/sdks/sharedenvironments/README.md#putbucketsbucketkeyenvironmentsenvironmentid) - Update the details of a shared environment.\n\n### [messages](docs/sdks/messages/README.md)\n\n* [deleteBucketsBucketKeyMessages](docs/sdks/messages/README.md#deletebucketsbucketkeymessages) - Clear a bucket (remove all messages).\n* [getBucketsBucketKeyErrors](docs/sdks/messages/README.md#getbucketsbucketkeyerrors) - Retrieve a list of error messages in a bucket\n* [getBucketsBucketKeyMessages](docs/sdks/messages/README.md#getbucketsbucketkeymessages) - Retrieve a list of messages in a bucket\n* [getBucketsBucketKeyMessagesMessageId](docs/sdks/messages/README.md#getbucketsbucketkeymessagesmessageid) - Retrieve the details for a single message.\n* [postBucketsBucketKeyMessages](docs/sdks/messages/README.md#postbucketsbucketkeymessages) - Create a message\n\n### [tests](docs/sdks/tests/README.md)\n\n* [deleteBucketsBucketKeyTestsTestId](docs/sdks/tests/README.md#deletebucketsbucketkeyteststestid) - Delete a test, including all steps, schedules, test-specific environments and results.\n* [getBucketsBucketKeyTests](docs/sdks/tests/README.md#getbucketsbucketkeytests) - Returns a list of tests.\n* [getBucketsBucketKeyTestsTestId](docs/sdks/tests/README.md#getbucketsbucketkeyteststestid) - Retrieve the details of a given test by ID.\n* [getBucketsBucketKeyTestsTestIdMetrics](docs/sdks/tests/README.md#getbucketsbucketkeyteststestidmetrics) - Return details of the test metrics for the specified timeframe.\n* [postBucketsBucketKeyTests](docs/sdks/tests/README.md#postbucketsbucketkeytests) - Create a test.\n* [putBucketsBucketKeyTestsTestId](docs/sdks/tests/README.md#putbucketsbucketkeyteststestid) - Modify a test's name, description, default environment and its steps. To modify other individual properties of a test, make requests to the steps, environments, and schedules subresources of the test.\n\n### [testEnvironments](docs/sdks/testenvironments/README.md)\n\n* [getBucketsBucketKeyTestsTestIdEnvironments](docs/sdks/testenvironments/README.md#getbucketsbucketkeyteststestidenvironments) - Return details of the test's environments (only those that belong to the specified test)\n* [postBucketsBucketKeyTestsTestIdEnvironments](docs/sdks/testenvironments/README.md#postbucketsbucketkeyteststestidenvironments) - Create new test environment.\n* [putBucketsBucketKeyTestsTestIdEnvironmentsEnvironmentId](docs/sdks/testenvironments/README.md#putbucketsbucketkeyteststestidenvironmentsenvironmentid) - Update the details of a test environment.\n\n### [testSteps](docs/sdks/teststeps/README.md)\n\n* [deleteBucketsBucketKeyTestsTestIdStepsStepId](docs/sdks/teststeps/README.md#deletebucketsbucketkeyteststestidstepsstepid) - Delete a step from a test.\n* [getBucketsBucketKeyTestsTestIdSteps](docs/sdks/teststeps/README.md#getbucketsbucketkeyteststestidsteps) - List test steps for a test.\n* [postBucketsBucketKeyTestsTestIdSteps](docs/sdks/teststeps/README.md#postbucketsbucketkeyteststestidsteps) - Add new test step.\n* [putBucketsBucketKeyTestsTestIdStepsStepId](docs/sdks/teststeps/README.md#putbucketsbucketkeyteststestidstepsstepid) - Update the details of a single test step.\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\nHandling errors in this SDK should largely match your expectations.  All operations return a response object or throw an error.  If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.\n\n| Error Object         | Status Code          | Content Type         |\n| -------------------- | -------------------- | -------------------- |\n| errors.StandardError | 400                  | application/json     |\n| errors.SDKError      | 4xx-5xx              | */*                  |\n\nExample\n\n```typescript\nimport { RunscopeAPI } from \"Runscope-API\";\n\nasync function run() {\n    const sdk = new RunscopeAPI({\n        runscopeAuth: \"Bearer \u003cYOUR_ACCESS_TOKEN_HERE\u003e\",\n    });\n\n    let res;\n    try {\n        res = await sdk.testSteps.postBucketsBucketKeyTestsTestIdSteps({\n            testStep: {},\n            bucketKey: \"\u003cvalue\u003e\",\n            testId: \"\u003cvalue\u003e\",\n        });\n    } catch (err) {\n        if (err instanceof errors.StandardError) {\n            console.error(err); // handle exception\n            throw err;\n        } else if (err instanceof errors.SDKError) {\n            console.error(err); // handle exception\n            throw err;\n        }\n    }\n\n    if (res.statusCode == 200) {\n        // handle response\n    }\n}\n\nrun();\n\n```\n\u003c!-- End Error Handling [errors] --\u003e\n\n\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Select Server by Index\n\nYou can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:\n\n| # | Server | Variables |\n| - | ------ | --------- |\n| 0 | `https://api.runscope.com/` | None |\n\n#### Example\n\n```typescript\nimport { RunscopeAPI } from \"Runscope-API\";\n\nasync function run() {\n    const sdk = new RunscopeAPI({\n        serverIdx: 0,\n        runscopeAuth: \"Bearer \u003cYOUR_ACCESS_TOKEN_HERE\u003e\",\n    });\n\n    const res = await sdk.account.getAccount();\n\n    if (res.statusCode == 200) {\n        // handle response\n    }\n}\n\nrun();\n\n```\n\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example:\n```typescript\nimport { RunscopeAPI } from \"Runscope-API\";\n\nasync function run() {\n    const sdk = new RunscopeAPI({\n        serverURL: \"https://api.runscope.com/\",\n        runscopeAuth: \"Bearer \u003cYOUR_ACCESS_TOKEN_HERE\u003e\",\n    });\n\n    const res = await sdk.account.getAccount();\n\n    if (res.statusCode == 200) {\n        // handle response\n    }\n}\n\nrun();\n\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\n\n\u003c!-- Start Custom HTTP Client [http-client] --\u003e\n## Custom HTTP Client\n\nThe Typescript SDK makes API calls using the [axios](https://axios-http.com/docs/intro) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.\n\nFor example, you could specify a header for every request that your sdk makes as follows:\n\n```typescript\nimport { Runscope-API } from \"RunscopeAPI\";\nimport axios from \"axios\";\n\nconst httpClient = axios.create({\n    headers: {'x-custom-header': 'someValue'}\n})\n\nconst sdk = new RunscopeAPI({defaultClient: httpClient});\n```\n\u003c!-- End Custom HTTP Client [http-client] --\u003e\n\n\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security scheme globally:\n\n| Name           | Type           | Scheme         |\n| -------------- | -------------- | -------------- |\n| `runscopeAuth` | oauth2         | OAuth2 token   |\n\nTo authenticate with the API the `runscopeAuth` parameter must be set when initializing the SDK client instance. For example:\n```typescript\nimport { RunscopeAPI } from \"Runscope-API\";\n\nasync function run() {\n    const sdk = new RunscopeAPI({\n        runscopeAuth: \"Bearer \u003cYOUR_ACCESS_TOKEN_HERE\u003e\",\n    });\n\n    const res = await sdk.account.getAccount();\n\n    if (res.statusCode == 200) {\n        // handle response\n    }\n}\n\nrun();\n\n```\n\u003c!-- End Authentication [security] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n# Development\n\n## Maturity\n\nThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage\nto a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally\nlooking for the latest version.\n\n## Contributions\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically.\nFeel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!\n\n### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fgh-dev-sample-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-sdks%2Fgh-dev-sample-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fgh-dev-sample-sdk/lists"}