Class: DocomoNlu::Management::Log

Inherits:
Base
  • Object
show all
Defined in:
lib/docomo_nlu/management/log.rb

Instance Method Summary collapse

Methods inherited from Base

check_response, headers, #id_from_response, instantiate_collection, instantiate_record, #login, #logout, #static_headers

Instance Method Details

#allObject



29
30
31
# File 'lib/docomo_nlu/management/log.rb', line 29

def all
  Rails.logger.debug "You shoud use 'download' or 'count' method"
end

#count(params = {}) ⇒ Object



25
26
27
# File 'lib/docomo_nlu/management/log.rb', line 25

def count(params = {})
  JSON.parse(connection.post("#{collection_path(prefix_options)}/count", params.to_json, self.class.headers).body)["count"]
end

#download(params = {}) ⇒ Object

Format of params:

>

> “details”:[

> {“operation”:“”,“target”:“input”,“query”:“Hello”,

> “operation”:“AND”,“target”:“”,“query”:“xx”,

> ]

> }

operation: NOT or Empty in leading line, others are AND|OR|NOT. target: input|output|startTopic|endTopic|userId|language|projectSpecific|responseTime_less_than|responseTime_greater_than

> It is possible to ambiguous search using “*” in the following target ( input|output|startTopic|endTopic|userId|language|projectSpecific)

query: String search within 200 characters.



21
22
23
# File 'lib/docomo_nlu/management/log.rb', line 21

def download(params = {})
  JSON.parse(connection.post(collection_path(prefix_options), params.to_json, self.class.headers).body)
end

#findObject



33
34
35
# File 'lib/docomo_nlu/management/log.rb', line 33

def find
  Rails.logger.debug "You shoud use 'download' or 'count' method"
end

#whereObject



37
38
39
# File 'lib/docomo_nlu/management/log.rb', line 37

def where
  Rails.logger.debug "You shoud use 'download' or 'count' method"
end