Skip to content

renatosnrg/sendgrid-api

Repository files navigation

Sendgrid::API

Build Status Code Climate Coverage Status

A Ruby interface to the SendGrid API.

API Coverage

The SendGrid API is being covered on demand. The next APIs to be supported are the complete Marketing Email API and Mail (Web API).

Check which SendGrid APIs are currently being covered by this gem: https://github.com/renatosnrg/sendgrid-api/wiki/SendGrid-API-Coverage

Installation

Add this line to your application's Gemfile:

gem 'sendgrid-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sendgrid-api

Configuration

client = Sendgrid::API::Client.new('YOUR_USER', 'YOUR_KEY')

Usage Examples

Get your SendGrid Profile

profile = client.profile.get

Modify your SendGrid Profile

profile = Sendgrid::API::Entities::Profile.new(:first_name => 'Your first name',
                                               :last_name => 'Your last name')
response = client.profile.set(profile)

Get Advanced Statistics

stats = client.stats.advanced(:start_date => '2013-01-01', :data_type => 'global')

Contributing

If you want to contribute to cover more APIs or improve something already implemented, follow these steps:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes - do not forget tests (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

A Ruby interface to the SendGrid API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages