class EngagingNetworks::Supporter

Public Instance Methods

data(email) click to toggle source
# File lib/engaging_networks/supporter.rb, line 4
def data(email)
  # data.service only returns Y/N values on which fields contain data, not actual data contained
  client.get_request(data_path, {service: 'SupporterData', email: email,
      token_type: EngagingNetworks::Request::MultiTokenAuthentication::PUBLIC, time: Time.now.to_i}) # cache bust the time parameter.
end
exists?(email) click to toggle source
# File lib/engaging_networks/supporter.rb, line 10
def exists?(email)
  return data(email).obj.supporterExists == 'Y'
end
export(startDate) click to toggle source
# File lib/engaging_networks/supporter.rb, line 14
def export(startDate)
  # startDate must be MMDDYYY and within last 45 days
  client.get_request(export_path, {startDate: startDate.strftime("%m%d%Y"),
      token_type: EngagingNetworks::Request::MultiTokenAuthentication::PRIVATE})

  # TODO, filter for specific fields
end