🎉 IP Geocoding API is now live. Read more →
Tiny API DocsAboutAboutContact ↗Contact ↗ (opens in a new tab)
GitHubGitHub (opens in a new tab)DiscordDiscord (opens in a new tab)
  • Introduction
  • Overview
    • Key Features
    • Use Cases
  • Getting Started
    • Prerequisites
    • Configuration
    • Listing Your API
    • Pricing Your API
    • Index
  • APIs
    • IP Geocoding
    • Stock Market
    • Weather Forecast
    • Currency Conversion
    • Twitter
    • Email Verification
  • Data Sources
  • Integration
    • Node.js
    • Python
    • Ruby
    • PHP
    • Java
    • jQuery
    • NestJS
    • React
    • Svelte
  • Support
    • FAQs
    • Contact Us
    • GDPR and Data Compliance
  • Introduction
  • Overview
    • Key Features
    • Use Cases
  • Getting Started
    • Prerequisites
    • Configuration
    • Listing Your API
    • Pricing Your API
    • Index
  • APIs
    • IP Geocoding
    • Stock Market
    • Weather Forecast
    • Currency Conversion
    • Twitter
    • Email Verification
  • Data Sources
  • Integration
    • Node.js
    • Python
    • Ruby
    • PHP
    • Java
    • jQuery
    • NestJS
    • React
    • Svelte
  • Support
    • FAQs
    • Contact Us
    • GDPR and Data Compliance
  • About
  • Contact ↗ (opens in a new tab)
Question? Give us feedback → (opens in a new tab)Edit this page
Integration
Ruby

Ruby

In Ruby, you can use the net/http library or a gem like httparty to make API requests. Here's an example using httparty:

require 'httparty'
 
response = HTTParty.get('https://api.tinyapi.co/your-api-endpoint',
  headers: {
    'Authorization' => 'Bearer YOUR_API_KEY'
  }
)
 
if response.code == 200
  puts response.parsed_response
else
  puts "Error: #{response.code}"
end
PythonPHP

Tiny API Docs