git clone https://github.com/Stardraw/stardraw-cloud-samples.git
cd stardraw-cloud-samplesEach sample reads your credentials from environment variables, so nothing secret is committed:
export STARDRAW_EMAIL="you@example.com"
export STARDRAW_PASSWORD="YOUR_PASSWORD"
# optional, defaults to https://stardraw.cloud/api/v1/
export STARDRAW_BASE="https://stardraw.cloud/api/v1/"| Language | What it shows |
|---|---|
| cURL | Plain HTTP scripts — get a token, list projects, create a project. |
| JavaScript / TypeScript | Node with openapi-fetch and types generated from the public OpenAPI document. |
| Python | A small httpx client with token refresh and the same example calls. |
| C# | A minimal console app using HttpClient. |
The samples above hand-write the HTTP calls. For a fully typed client instead, the openapi-generator/ folder generates an SDK straight from the OpenAPI document with openapi-generator, so you call the API through typed methods like getApplication(), getProjectsGrid(…) and createProject(…). Each language has a generate.sh that reads the spec from the SPEC environment variable (defaulting to the live document) and writes the client into a git-ignored generated/ directory — you regenerate it rather than commit it.
| Language | Generator |
|---|---|
| TypeScript | typescript-fetch |
| Python | python |
| C# | csharp |
| Java | java |
openapi-generator is a Java tool, so generating needs a Java runtime — the scripts invoke it through the @openapitools/openapi-generator-cli npm wrapper — alongside each language’s own toolchain.
Every sample also demonstrates honouring a 429 / Retry-After response (see Conventions). You’ll need a Stardraw Cloud account to run them — the credentials drive the password grant.