class SoapyBing::CampaignManagement
Attributes
service[R]
Public Class Methods
new(*args)
click to toggle source
# File lib/soapy_bing/campaign_management.rb, line 7 def initialize(*args) @service = Service.campaign_management(*args) end
Public Instance Methods
get_geo_locations()
click to toggle source
# File lib/soapy_bing/campaign_management.rb, line 11 def get_geo_locations # rubocop:disable Style/AccessorMethodName response = service.get_geo_locations_file_url( version: '1.0', language_locale: 'en' ) csv = HTTParty.get(response[:file_url]).body header, *body = CSV.parse(csv) body.map { |row| header.zip(row).to_h } end