lib/pt_search.rb
#Builds a hash and generates a JSON string.
#Defaults:
#@interval = "hour"   #Set in constructor.
#@max_results = API_ACTIVITY_LIMIT   #Set in constructor.
Builds a hash and generates a JSON string.
Defaults.
Builds a hash and generates a JSON string . Defaults .
def build_request(rule, from_date=nil, to_date=nil)
	   request = {:query => rule}
        if !from_date.nil?
            request[:fromDate] = from_date
        end
        if !to_date.nil?
            request[:toDate] = to_date
        end
        return request
    end
def build_request ( rule , from_date = nil , to_date = nil ) request = { :query => rule } if ! from_date . nil? request [ :fromDate ] = from_date end if ! to_date . nil? request [ :toDate ] = to_date end return request end
Builds a hash and generates a JSON string.
Builds a hash and generates a JSON string .
rule
<not_specific>
from_date
<not_specific>
to_date
<not_specific>
interval
"hour" #Set in constructor.
" hour " #Set in constructor .
max_results
API_ACTIVITY_LIMIT #Set in constructor.
API_ACTIVITY_LIMIT #Set in constructor .