Skip to content

trycourier/courier-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Courier Ruby SDK

The Courier Ruby SDK provides typed access to the Courier REST API from any Ruby 3.2+ application. It ships with Yard docstrings, RBS and RBI type definitions for Sorbet, and uses net/http with connection pooling.

Installation

Add to your Gemfile:

gem "trycourier", "~> 4.7"

Then run bundle install.

Quick Start

require "bundler/setup"
require "courier"

client = Courier::Client.new

response = client.send_.message(
  message: {
    to: { email: "you@example.com" },
    content: {
      title: "Hello from Courier!",
      body: "Your first notification, sent with the Ruby SDK."
    }
  }
)

puts response.request_id

The client reads COURIER_API_KEY from your environment automatically. You can also pass it explicitly: Courier::Client.new(api_key: "your-key").

Note: The method is send_ (with trailing underscore) because send is a reserved method in Ruby.

Documentation

Full documentation: courier.com/docs/sdk-libraries/ruby

About

A Ruby Gem for communicating with the Courier REST API.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •