Class: TermuxRubyApi::SubSystems::CallLog
- Defined in:
- lib/termux_ruby_api/sub_systems/call_log.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#log(limit: nil, offset: nil) ⇒ Array <Hash>
Gets part of the list of phone calls in the phone.
-
#log_all ⇒ Array <Hash>
Gets the whole list of phone calls in the phone, with no pagination.
Methods inherited from Base
Constructor Details
This class inherits a constructor from TermuxRubyApi::SubSystems::Base
Instance Method Details
#log(limit: nil, offset: nil) ⇒ Array <Hash>
Gets part of the list of phone calls in the phone
8 9 10 11 12 13 14 |
# File 'lib/termux_ruby_api/sub_systems/call_log.rb', line 8 def log(limit:nil, offset:nil) args = owner.generate_args_list([['-l', limit&.to_s], ['-o', offset&.to_s] ]) res = owner.json_api_command('call-log', nil, *args) TermuxRubyApi::Utils::Xformer.xform(res, date: :time, duration: :duration, type: :symbol) end |
#log_all ⇒ Array <Hash>
Gets the whole list of phone calls in the phone, with no pagination
18 19 20 |
# File 'lib/termux_ruby_api/sub_systems/call_log.rb', line 18 def log_all log(limit: -1) end |