lib/createsend/createsend.rb in createsend-3.4.0 vs lib/createsend/createsend.rb in createsend-4.0.0
- old
+ new
@@ -107,11 +107,11 @@
if args.size > 0
auth args.first # Expect auth details as first argument
end
end
- @@base_uri = "https://api.createsend.com/api/v3"
+ @@base_uri = "https://api.createsend.com/api/v3.1"
@@oauth_base_uri = "https://api.createsend.com/oauth"
@@oauth_token_uri = "#{@@oauth_base_uri}/token"
headers({
'User-Agent' => USER_AGENT_STRING,
'Content-Type' => 'application/json; charset=utf-8',
@@ -135,19 +135,9 @@
self.class.refresh_access_token @auth_details[:refresh_token]
auth({
:access_token => access_token,
:refresh_token => refresh_token})
[access_token, expires_in, refresh_token]
- end
-
- # Gets your CreateSend API key, given your site url, username and password.
- def apikey(site_url, username, password)
- site_url = CGI.escape(site_url)
- options = {:basic_auth => {:username => username, :password => password}}
- response = get("/apikey.json?SiteUrl=#{site_url}", options)
- result = Hashie::Mash.new(response)
- auth({:api_key => result.ApiKey}) if not @auth_details
- result
end
# Gets your clients.
def clients
response = get('/clients.json')
\ No newline at end of file