Docs

SDKs

Auto-generated from OpenAPI specs. Single file. Zero dependencies.

Overview

Your control center generates a typed SDK for every API you select. Each SDK is a single file with zero external dependencies — just drop it into your project.

Supported languages

LanguageFileMin version
Web & Node
TypeScript (Axios)weather-api.tsTS 4.7+
JavaScript (fetch)weather-api.jsES2020+
Backend
Pythonweather_api.pyPython 3.8+
Goweather_api.goGo 1.18+
JavaWeatherApi.javaJava 11+
C# / .NETWeatherApi.cs.NET 6+
PHPWeatherApi.phpPHP 8.0+
Rubyweather_api.rbRuby 3.0+
Rustweather_api.rsRust 1.56+
KotlinWeatherApi.ktKotlin 1.6+
Mobile
Swift (iOS/macOS)WeatherApi.swiftSwift 5.5+
Dart (Flutter)weather_api.dartDart 2.17+
CLI
cURL (Shell)weather-api.shcURL 7.0+

Downloading SDKs

  1. Open your web console → My APIs
  2. Click any API → Download SDK
  3. Choose your language
  4. Drop the file into your project

TypeScript

import { WeatherApi } from './weather-api';

const api = new WeatherApi({ token: 'YOUR_SECRET' });
const forecast = await api.getForecast({ city: 'Paris', days: 5 });
console.log(forecast.data);

JavaScript

import { WeatherApi } from './weather-api.js';

const api = new WeatherApi({ token: 'YOUR_SECRET' });
const forecast = await api.getForecast({ city: 'Paris', days: 5 });
console.log(forecast.data);

Python

from weather_api import WeatherApi

api = WeatherApi(token="YOUR_SECRET")
forecast = api.get_forecast(city="Paris", days=5)
print(forecast.data)

Go

client := weatherapi.New("YOUR_SECRET")
forecast, err := client.GetForecast(ctx, weatherapi.ForecastParams{
    City: "Paris",
    Days: 5,
})
fmt.Println(forecast.Data)

Java

WeatherApi api = new WeatherApi("YOUR_SECRET");
ForecastResponse forecast = api.getForecast("Paris", 5);
System.out.println(forecast.getData());

C# / .NET

var api = new WeatherApi("YOUR_SECRET");
var forecast = await api.GetForecastAsync("Paris", 5);
Console.WriteLine(forecast.Data);

PHP

$api = new WeatherApi('YOUR_SECRET');
$forecast = $api->getForecast('Paris', 5);
echo $forecast->data;

Ruby

api = WeatherApi.new(token: 'YOUR_SECRET')
forecast = api.get_forecast(city: 'Paris', days: 5)
puts forecast.data

Rust

let client = WeatherApi::new("YOUR_SECRET");
let forecast = client.get_forecast("Paris", 5).await?;
println!("{:?}", forecast.data);

Kotlin

val api = WeatherApi(token = "YOUR_SECRET")
val forecast = api.getForecast(city = "Paris", days = 5)
println(forecast.data)

Swift

let api = WeatherApi(token: "YOUR_SECRET")
let forecast = try await api.getForecast(city: "Paris", days: 5)
print(forecast.data)

Dart (Flutter)

final api = WeatherApi(token: 'YOUR_SECRET');
final forecast = await api.getForecast(city: 'Paris', days: 5);
print(forecast.data);

Fully typed. Every SDK includes type definitions for all request/response objects, generated from the API's OpenAPI specification.