class RDStation::Client
Public Class Methods
new(access_token:, refresh_token: nil)
click to toggle source
# File lib/rdstation/client.rb, line 3 def initialize(access_token:, refresh_token: nil) warn_deprecation unless refresh_token @authorization = Authorization.new( access_token: access_token, refresh_token: refresh_token ) end
Public Instance Methods
account()
click to toggle source
# File lib/rdstation/client.rb, line 11 def account @account ||= RDStation::Account.new(authorization: @authorization) end
analytics()
click to toggle source
# File lib/rdstation/client.rb, line 39 def analytics @analytics ||= RDStation::Analytics.new(authorization: @authorization) end
contacts()
click to toggle source
# File lib/rdstation/client.rb, line 15 def contacts @contacts ||= RDStation::Contacts.new(authorization: @authorization) end
emails()
click to toggle source
# File lib/rdstation/client.rb, line 35 def emails @emails ||= RDStation::Emails.new(authorization: @authorization) end
events()
click to toggle source
# File lib/rdstation/client.rb, line 19 def events @events ||= RDStation::Events.new(authorization: @authorization) end
fields()
click to toggle source
# File lib/rdstation/client.rb, line 23 def fields @fields ||= RDStation::Fields.new(authorization: @authorization) end
landing_pages()
click to toggle source
# File lib/rdstation/client.rb, line 43 def landing_pages @landing_pages ||= RDStation::LandingPages.new(authorization: @authorization) end
segmentations()
click to toggle source
# File lib/rdstation/client.rb, line 31 def segmentations @segmentations ||= RDStation::Segmentations.new(authorization: @authorization) end
webhooks()
click to toggle source
# File lib/rdstation/client.rb, line 27 def webhooks @webhooks ||= RDStation::Webhooks.new(authorization: @authorization) end
Private Instance Methods
warn_deprecation()
click to toggle source
# File lib/rdstation/client.rb, line 49 def warn_deprecation warn "DEPRECATION WARNING: Specifying refresh_token in RDStation::Client.new(access_token: 'at', refresh_token: 'rt') is optional right now, but will be mandatory in future versions. " end