Skip to content

Businnect/letit_ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LetIt Ruby SDK

A professional Ruby client for the LetIt API, featuring high-performance support for Microposts and Job management.

API Documentation

For detailed information on the underlying REST API, endpoints, and authentication schemas, please visit the official documentation:

Features

  • 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::HTTP with centralized authentication and API error handling.

Installation

gem install letit

Or in your Gemfile:

gem "letit"

Quick Start

Initialize the Client

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"
)

Create a Job with a Company Logo

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}"

Create a Micropost

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}"

Environment Variables

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.

Testing

Run the test suite:

bundle install
export LETIT_API_TOKEN=your-api-token
bundle exec rspec

About

A professional Ruby client for the LetIt API, featuring high-performance support for Microposts and Job management.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages