A professional Ruby client for the LetIt API, featuring high-performance support for Microposts and Job management.
For detailed information on the underlying REST API, endpoints, and authentication schemas, please visit the official documentation:
- API Reference: http://api.letit.com
- Job Management: Full support for creating job postings with company logos, descriptions, and metadata.
- Micropost System: Create text posts or file-based updates with attachment support.
- HTTP Client Support: Built on Ruby
Net::HTTPwith centralized authentication and API error handling.
gem install letitOr in your Gemfile:
gem "letit"The client can be initialized with an explicit API key and base URL.
require "letit"
client = LetIt::Client.new(
base_url: "https://api.letit.com",
api_key: "your-api-token"
)The SDK handles multipart form construction and file uploads automatically.
require "letit"
client = LetIt::Client.new(base_url: "https://api.letit.com", api_key: "your-api-token")
logo = LetIt::Schemas::FilePayload.new(
filename: "logo.png",
bytes: File.binread("logo.png"),
mime_type: "image/png"
)
response = client.job.create_with_company(
company_name: "Acme Corp",
company_description: "Building next-gen developer tools.",
company_website: "https://acme.example",
job_title: "Senior Ruby Developer",
job_description: "Building production SDKs and integrations.",
job_how_to_apply: "https://acme.example/careers",
company_logo: logo,
job_location: LetIt::Schemas::JobLocation::REMOTE
)
puts "Job created successfully: #{response.slug}"Easily create posts with optional titles and bodies.
require "letit"
client = LetIt::Client.new(base_url: "https://api.letit.com", api_key: "your-api-token")
response = client.micropost.create(
body: "The Ruby SDK is now live!",
title: "New Update",
post_type: LetIt::Schemas::PostType::TEXT
)
puts "Post created with ID: #{response.public_id}"The SDK can utilize the following environment variable for testing or default configuration:
LETIT_API_TOKEN: Can be used by integration tests against the live API.
Run the test suite:
bundle install
export LETIT_API_TOKEN=your-api-token
bundle exec rspec