module Reuters::Namespaces::Search

Represents the base search namespaces. Note that because search is quite a broad namespace inside the Reuters api, it is better to use a more specific namespace such as {Reuters::Namespaces::Search::Equity}.

Public Class Methods

define(*strs) click to toggle source

Define a custom name or endpoint that Reuters uses to define XML Namespaces inside the request body.

@example Defining a custom namespace

str = Reuters::Namespaces::Search.define(:equity_quote, :query_spec, 1)
puts str #=> "http://.../Search/EquityQuote_QuerySpec_1"

@param [String] strs to convert into a valid namespace

@return [String] A full namespaced endpoint with a underscore

separated camelized definition.
# File lib/reuters/namespaces/search.rb, line 42
def self.define(*strs)
  str = strs.map { |s| s.to_s.camelize }.join('_')
  "#{endpoint}/#{str}"
end