lib/emaildirect.rb in emaildirect-1.3.4 vs lib/emaildirect.rb in emaildirect-2.0.0
- old
+ new
@@ -1,10 +1,10 @@
require 'cgi'
require 'uri'
require 'httparty'
require 'hashie'
-Hash.send :include, Hashie::Extensions
+Hash.send :include, Hashie::HashExtensions
libdir = File.dirname(__FILE__)
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
require 'emaildirect/version'
@@ -32,11 +32,11 @@
class << self
# Just allows callers to do EmailDirect.api_key = "..." rather than EmailDirect::EmailDirect.api_key "..." etc
def api_key=(api_key)
EmailDirect.api_key = api_key
end
-
+
def base_uri=(uri)
EmailDirect.base_uri uri
end
# Allows the initializer to turn off actually communicating to the REST service for certain environments
@@ -62,13 +62,13 @@
class NotFound < ClientError; end
class Unavailable < StandardError; end
class EmailDirect
include HTTParty
-
- @@base_uri = "https://rest.emaildirect.com/v1/"
- @@api_key = ""
- headers({
+
+ @@base_uri = 'https://edapi.campaigner.com/v1/'
+ @@api_key = ''
+ headers({
'User-Agent' => "emaildirect-rest-#{VERSION}",
'Content-Type' => 'application/json; charset=utf-8',
'Accept-Encoding' => 'gzip, deflate',
'ApiKey' => @@api_key
})