class TrustedSearch::V1

Public Instance Methods

base_path() click to toggle source
# File lib/trustedsearch/api.rb, line 9
def base_path
  if self == APIResource
    raise NotImplementedError.new("APIResource is an abstract class. You should perform actions on its subclasses (i.e. Publisher)")
  end
  "/v1/"
end
getBusinessUpdate(uuid = nil) click to toggle source

Makes an API request to /directory-listings If uuid is nil, all are returned.

# File lib/trustedsearch/api.rb, line 24
def getBusinessUpdate(uuid = nil)

        method_url = 'directory-listings' + ( ( uuid ) ? "/#{uuid}" : '')
        params = {}
        return self.get(method_url, params)
end
getBusinessUpdateSince( since ) click to toggle source

Makes an API request to /directory-listings Since is an integer, only changes made since that time are returned.

# File lib/trustedsearch/api.rb, line 33
def getBusinessUpdateSince( since )

  method_url = 'directory-listings'
  params = {}
  params[:since] = since
  return self.get(method_url, params)
end
postBusiness( data = [] ) click to toggle source

Submit a single business more multiple business for

# File lib/trustedsearch/api.rb, line 42
    def postBusiness( data = [] )
            method_url = 'local-business'
            return self.post(method_url, {} , data )
end
postValidate( data = [] ) click to toggle source

Validate a record.

# File lib/trustedsearch/api.rb, line 47
def postValidate( data = [] )
  method_url = 'validate'
  return self.post(method_url, {} , data )
end
putTestFulfillment( uuid = nil) click to toggle source
# File lib/trustedsearch/api.rb, line 52
def putTestFulfillment( uuid = nil)
  method_url = 'test-fulfillment/' + uuid.to_s
  return self.put(method_url)
end
request(method='get', resource_url, params, body) click to toggle source

Update All request to Version 1.

Calls superclass method
# File lib/trustedsearch/api.rb, line 17
def request(method='get', resource_url, params, body)
  TrustedSearch::api_version = 1
  super
end