Class: DocomoNlu::Management::Log
- Defined in:
- lib/docomo_nlu/management/log.rb
Instance Method Summary collapse
- #all ⇒ Object
- #count(params = {}) ⇒ Object
-
#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.
- #find ⇒ Object
- #where ⇒ Object
Methods inherited from Base
check_response, headers, #id_from_response, instantiate_collection, instantiate_record, #login, #logout, #static_headers
Instance Method Details
#all ⇒ Object
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()}/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(), params.to_json, self.class.headers).body) end |
#find ⇒ Object
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 |
#where ⇒ Object
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 |