Project

freshmail

0.01
No commit activity in last 3 years
No release in over 3 years
FreshMail.pl API wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

Freshmail

This is a Rails Gem for Freshmail REST API.

Instalation

gem install freshmail

or add it to your Gemfile:

gem 'freshmail'

Usage

Create instance of gem:

freshmail = Freshmail::Client.new('YOUR_API_KEY', 'YOUR_API_SECRET')

After that, you can access Freshmail methods, for example:

my_lists = freshmail.lists
my_first_list_hash = my_lists['lists'].first['subscriberListHash']
my_last_list_hash = my_lists['lists'].last['subscriberListHash']

freshmail.add_subscriber(email: 'test@test.net', list: my_first_list_hash, state: 1)

freshmail.batch_add_subscriber(subscribers: [{email: 'test@test.net'}, {email: 'test2@test.net'}], list: my_last_list_hash, state: 1)

freshmail.subscriber(email: 'test@test.net', list: my_first_list_hash)
freshmail.subscribers(subscribers: [{email: 'test2@test.net'}], list: my_last_list_hash)

freshmail.delete_subscriber(email: 'test@test.net', list: my_first_list_hash)
freshmail.batch_delete_subscriber(subscribers: [{email: 'test@test.net'}, {email: 'test2@test.net'}], list: my_last_list_hash)

Available methods:

freshmail.ping
freshmail.mail(...)
freshmail.subscriber(...)
freshmail.subscribers(...)
freshmail.add_subscriber(...)
freshmail.edit_subscriber(...)
freshmail.batch_add_subscriber(...)
freshmail.batch_edit_subscriber(...)
freshmail.delete_subscriber(...)
freshmail.batch_delete_subscriber(...)
freshmail.lists
freshmail.create_list(...)
freshmail.update_list(...)
freshmail.delete_list(...)

Contribution

If you want to contribute to the code, just create pull request, and I will merge it ASAP. Thank you for help.

TODO

Add more methods. Add tests.

Licence

Copyright (c) 2018 Marcin Adamczyk, released under the MIT license

Feel free to contact me if you need help: adamczyk.marcin [--a-t--] outlook.com