SDKs & Libraries

Official and community SDKs for integrating with the VardaCal API.

Coming Soon! We're actively developing official SDKs for popular programming languages. For now, you can use our RESTful API directly.

Official SDKs

📦

JavaScript/TypeScript

Official Node.js and browser SDK with TypeScript support

npm install @vardacal/sdk
Coming Q2 2025
🐍

Python

Python SDK with async support

pip install vardacal
Coming Q2 2025

Quick Start Examples

Direct API Usage

Until official SDKs are available, you can easily integrate with our REST API:

class VardaCalClient {
  constructor(apiKey, apiSecret) {
    this.apiKey = apiKey;
    this.apiSecret = apiSecret;
    this.baseURL = 'https://api.vardacal.com/api/v1';
  }

  async request(endpoint, options = {}) {
    const url = `${this.baseURL}${endpoint}`;
    const response = await fetch(url, {
      ...options,
      headers: {
        'X-API-Key': this.apiKey,
        'X-API-Secret': this.apiSecret,
        'Content-Type': 'application/json',
        ...options.headers
      }
    });
    return response.json();
  }

  async getBookings() {
    return this.request('/bookings');
  }

  async createBooking(username, data) {
    return this.request(`/users/${username}/book`, {
      method: 'POST',
      body: JSON.stringify(data)
    });
  }
}

// Usage
const client = new VardaCalClient('your_api_key', 'your_api_secret');
const bookings = await client.getBookings();
import requests

class VardaCalClient:
    def __init__(self, api_key, api_secret):
        self.api_key = api_key
        self.api_secret = api_secret
        self.base_url = 'https://api.vardacal.com/api/v1'
        
    def request(self, endpoint, method='GET', data=None):
        url = f"{self.base_url}{endpoint}"
        headers = {
            'X-API-Key': self.api_key,
            'X-API-Secret': self.api_secret,
            'Content-Type': 'application/json'
        }
        
        response = requests.request(
            method=method,
            url=url,
            headers=headers,
            json=data
        )
        return response.json()
    
    def get_bookings(self):
        return self.request('/bookings')
    
    def create_booking(self, username, data):
        return self.request(
            f'/users/{username}/book',
            method='POST',
            data=data
        )

# Usage
client = VardaCalClient('your_api_key', 'your_api_secret')
bookings = client.get_bookings()
require 'net/http'
require 'json'

class VardaCalClient
  def initialize(api_key, api_secret)
    @api_key = api_key
    @api_secret = api_secret
    @base_url = 'https://api.vardacal.com/api/v1'
  end

  def request(endpoint, method: :get, data: nil)
    uri = URI("#{@base_url}#{endpoint}")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = case method
              when :get then Net::HTTP::Get.new(uri)
              when :post then Net::HTTP::Post.new(uri)
              when :put then Net::HTTP::Put.new(uri)
              when :delete then Net::HTTP::Delete.new(uri)
              end

    request['X-API-Key'] = @api_key
    request['X-API-Secret'] = @api_secret
    request['Content-Type'] = 'application/json'
    request.body = data.to_json if data

    response = http.request(request)
    JSON.parse(response.body)
  end

  def get_bookings
    request('/bookings')
  end

  def create_booking(username, data)
    request("/users/#{username}/book", method: :post, data: data)
  end
end

# Usage
client = VardaCalClient.new('your_api_key', 'your_api_secret')
bookings = client.get_bookings