Project

send-cloud

0.0
No commit activity in last 3 years
No release in over 3 years
ruby client for sohu send-cloud api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

SendCloud

Ruby client for sohu sendcloud api

Installation

Add this line to your application's Gemfile:

gem 'send-cloud', github: 'ruchee/send-cloud'

And then execute:

$ bundle

Usage

Configure

SendCloud.setup do |config|
  config.api_user = 'your api user'
  config.sms_user = 'your sms user'
  config.api_key = 'your api key'
  config.log_file = Rails.root.join 'log', 'send-cloud.log'
end

Call the api

SendCloud::Mail.sendtemplate(from: 'test@sendcloud.org', to: 'test@abc.com', subject: 'test', xsmtpapi: '{"to": ["test@abc.com"]}', templateInvokeName: 'test_template')
SendCloud::Sms.send(templateId: '11', msgType: '0', phone: '13800138000', vars: '{"%code%":"123456"}')