Project

cindy

0.02
No commit activity in last 3 years
No release in over 3 years
A lightweight and flexible Ruby SDK for Sendy, a self-hosted email newsletter app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.4.2
~> 2.12.0

Runtime

 Project Readme

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://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, "foo@bar.com", "My Name"
=> true
> c.unsubscribe list_id, "foo@bar.com"
=> false

Subscription Status

To check subscription status for Email address:

> c.subscription_status list_id, "foo@bar.com"
=> "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: "foo@bar.com", reply_to: "foo@bar.com", 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://polydice.com/