Class: Bkblz::V1::ListFileNamesRequest
- Defined in:
- lib/bkblz/v1/list_file_names.rb
Overview
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
Instance Method Summary collapse
- #build_request(session) ⇒ Object
-
#initialize(bucket, max_file_count = 1000, start_file_name = nil, prefix: nil, delimiter: nil) ⇒ ListFileNamesRequest
constructor
TODO(erick): Switch start_file_name to a keyword arg.
Methods inherited from Request
response_class, #send, url_suffix
Constructor Details
#initialize(bucket, max_file_count = 1000, start_file_name = nil, prefix: nil, delimiter: nil) ⇒ ListFileNamesRequest
TODO(erick): Switch start_file_name to a keyword arg
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/bkblz/v1/list_file_names.rb', line 24 def initialize(bucket, max_file_count=1000, start_file_name=nil, prefix: nil, delimiter: nil) @bucket = bucket @body = {} @body[:bucket_id] = bucket.bucket_id @body[:max_file_count] = max_file_count @body[:start_file_name] = start_file_name if start_file_name @body[:prefix] = prefix if prefix @body[:delimiter] = delimiter if delimiter end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
21 22 23 |
# File 'lib/bkblz/v1/list_file_names.rb', line 21 def bucket @bucket end |
Instance Method Details
#build_request(session) ⇒ Object
35 36 37 |
# File 'lib/bkblz/v1/list_file_names.rb', line 35 def build_request(session) session.create_post url(session), @body end |