Skip to content
/ cindy Public

A lightweight and flexible Ruby SDK for Sendy, a self-hosted email newsletter app.

License

Notifications You must be signed in to change notification settings

polydice/cindy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cindy

A lightweight and flexible Ruby SDK for Sendy, a self-hosted email newsletter app.

Usage

The API of Cindy was basically implemented after Sendy's API documentation.

Client

To use Cindy, first create a client instance:

c = Cindy.new "http:https://sendy.co/demo/", "QywLZqDddP2P//d6ntekf+GY82nLrHke"

There're two parameters for initialize method:

  1. API Endpoint - The URL for Sendy installation.
  2. API Key - Optional, only for subscription status methods.

Subscribe / Unsubscribe

Then you can subscribe or unsubscribe from a list:

> c.subscribe list_id, "[email protected]", "My Name"
=> true
> c.unsubscribe list_id, "[email protected]"
=> false

Subscription Status

To check subscription status for Email address:

> c.subscription_status list_id, "[email protected]"
=> "Unsubscribed"

Active Subscriber Count

To get active subscriber count of a list:

> c.active_subscriber_count list_id
=> 1660

Create Campaign

To create new campaign:

> c.create_campaign from_name: "foo", from_email: "[email protected]", reply_to: "[email protected]", subject: "Hello, world", html_text: "<h1>Hello, world</h1>"
=> Campaign created

More Reference

Check Sendy's API documentation to learn more about parameters and possible responses.

License

MIT License. Copyright 2013-2015 Polydice, Inc. http:https://polydice.com/

About

A lightweight and flexible Ruby SDK for Sendy, a self-hosted email newsletter app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages