Sha256: c1a455bd78c9f9a6c4c52e848b8d650647f7a2cc30da282f504f0b9836cce57d
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
module Hominid class Helper < Base # Helper methods # -------------------------------- def self.account_details # Get details for this account. new.call("getAccountDetails") end def self.convert_css_to_inline(html, strip_css = false) # Convert CSS styles to inline styles and (optionally) remove original styles new.call("inlineCss", html, strip_css) end def self.create_folder(name) # Create a new folder to file campaigns in new.call("createFolder", name) end def self.generate_text(type, content) # Have HTML content auto-converted to a text-only format. # The options for text type are: # 'html' => Expects a string of HTML(default). # 'template' => Expects an array. # 'url' => Expects a valid and public URL. # 'cid' => Expects a campaign ID. # 'tid' => Expects a template ID. new.call("generateText", type, content) end def self.html_to_text(content) # Convert HTML content to text new.call("generateText", 'html', content) end def self.ping # Ping the Mailchimp API new.call("ping") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hominid-2.0.0 | lib/hominid/helper.rb |