TimeLogic API SDK usage guide
Install and configure the published TimeLogic API SDKs for TypeScript, Python, Rust, Go, Java, .NET, PHP, Ruby, Kotlin, and Swift.
How do I use a TimeLogic API SDK?
Choose your language on the SDK page, install the published package, and keep TIMELOGIC_API_KEY in an environment variable or secret manager. The page covers the time API JavaScript SDK, time API TypeScript SDK, time API Python SDK, and the time API npm package alongside the other supported languages. The generated clients use the same direct OpenAPI contract as the HTTP examples.
npm install @timelogic/direct-api
import { TimeApi, createConfiguration } from "@timelogic/direct-api";
const api = new TimeApi(createConfiguration({
apiKey: process.env.TIMELOGIC_API_KEY!,
}));
const currentTime = await api.getCurrentTime({ tz: "America/New_York" });
Authentication and base URL
The direct SDKs target https://api.timelogicapi.com and use the direct API key as configured by each generated client. Keep the key outside source control:
export TIMELOGIC_API_KEY="your-key"
Do not put a direct key in browser JavaScript, a public repository, or a client-side mobile bundle. If you are using the RapidAPI marketplace instead, follow its package-specific option and supply the marketplace key and host headers through a server-side configuration.
Choose the package for your language
The SDK page is driven by the repository's SDK manifest. It shows the language, exact install command when the package publishes one, quick-start example, registry link, and the matching README. Use that page rather than copying an import name from a different language's generated client.
Each README is the source for language-specific method naming and configuration details. The website guide explains the shared flow; the README explains the package's generated API surface.
A repeatable SDK workflow
- Install the package with the command shown for your language.
- Read the key from
TIMELOGIC_API_KEYor your platform secret manager. - Create the generated client with the direct host and key configuration.
- Call a small endpoint such as current time with an explicit
tz. - Handle the SDK's HTTP error type and preserve the response body when you need signed-response verification.
The site checks the SDK manifest during the static build so stale install commands and published version metadata are surfaced before release. See SDKs and API reference.
