Class: ATProto::Writes::Collector
- Inherits:
-
Object
- Object
- ATProto::Writes::Collector
- Extended by:
- T::Sig
- Includes:
- RequestUtils
- Defined in:
- lib/at_protocol/writes.rb
Instance Method Summary collapse
- #create(hash) ⇒ Object
- #delete(uri) ⇒ Object
-
#initialize ⇒ Collector
constructor
A new instance of Collector.
- #update(uri, hash) ⇒ Object
Methods included from RequestUtils
at_uri, #create_session_uri, #default_authenticated_headers, #default_headers, #delete_record_uri, #delete_session_uri, #get_paginated_data, #get_post_thread_uri, #get_session_uri, #mute_actor_uri, #query_obj_to_query_params, #refresh_session_uri, #refresh_token_headers, #resolve_handle, #upload_blob_uri
Constructor Details
#initialize ⇒ Collector
Returns a new instance of Collector.
118 119 120 |
# File 'lib/at_protocol/writes.rb', line 118 def initialize @writes = [] end |
Instance Method Details
#create(hash) ⇒ Object
124 125 126 127 128 129 130 |
# File 'lib/at_protocol/writes.rb', line 124 def create(hash) @writes << Write.new({ action: Write::Action::Create, value: hash, collection: hash["$type"] || hash[:"$type"], }) end |