Module: Vendasta::RI::Visibility
- Defined in:
- lib/vendasta/ri.rb
Overview
Visibility
Class Method Summary collapse
-
.getVisibilityStats(customerIdentifier) ⇒ Object
Get Visibility Stats.
-
.lookupListings(customerIdentifier) ⇒ Object
Lookup Listings.
-
.lookupListingsBysource(customerIdentifier, sourceid) ⇒ Object
Lookup Listings by source id.
-
.lookupPossibleListings(customerIdentifier) ⇒ Object
Lookup Possible Listings.
Class Method Details
.getVisibilityStats(customerIdentifier) ⇒ Object
Get Visibility Stats
78 79 80 81 82 83 84 85 86 |
# File 'lib/vendasta/ri.rb', line 78 def self.getVisibilityStats(customerIdentifier) # Get Visibility Stats response = HTTParty.get("#{OPTIONS[:endpoint]}/visibility/getStats/", :query => {:apiUser => ENV["VENDASTA_RI_APIUSER"], :apiKey => ENV["VENDASTA_RI_APIKEY"], :customerIdentifier => customerIdentifier}) if response.success? response = JSON.parse(response.body) else response = JSON.parse(response.body) end end |
.lookupListings(customerIdentifier) ⇒ Object
Lookup Listings
48 49 50 51 52 53 54 55 56 |
# File 'lib/vendasta/ri.rb', line 48 def self.lookupListings(customerIdentifier) # Lookup Listings response = HTTParty.get("#{OPTIONS[:endpoint]}/visibility/lookupListings/", :query => {:apiUser => ENV["VENDASTA_RI_APIUSER"], :apiKey => ENV["VENDASTA_RI_APIKEY"], :customerIdentifier => customerIdentifier}) if response.success? response = JSON.parse(response.body) else response = JSON.parse(response.body) end end |
.lookupListingsBysource(customerIdentifier, sourceid) ⇒ Object
Lookup Listings by source id
58 59 60 61 62 63 64 65 66 |
# File 'lib/vendasta/ri.rb', line 58 def self.lookupListingsBysource(customerIdentifier, sourceid) # Lookup Listings by source id response = HTTParty.get("#{OPTIONS[:endpoint]}/visibility/lookupListings/", :query => {:apiUser => ENV["VENDASTA_RI_APIUSER"], :apiKey => ENV["VENDASTA_RI_APIKEY"], :customerIdentifier => customerIdentifier, :sourceId => sourceid}) if response.success? response = JSON.parse(response.body) else response = JSON.parse(response.body) end end |
.lookupPossibleListings(customerIdentifier) ⇒ Object
Lookup Possible Listings
68 69 70 71 72 73 74 75 76 |
# File 'lib/vendasta/ri.rb', line 68 def self.lookupPossibleListings(customerIdentifier) # Lookup Possible Listings response = HTTParty.get("#{OPTIONS[:endpoint]}/visibility/lookupPossibleListings/", :query => {:apiUser => ENV["VENDASTA_RI_APIUSER"], :apiKey => ENV["VENDASTA_RI_APIKEY"], :customerIdentifier => customerIdentifier}) if response.success? response = JSON.parse(response.body) else response = JSON.parse(response.body) end end |