Class: DistributedPress::V1::Social::Replies
- Inherits:
-
Object
- Object
- DistributedPress::V1::Social::Replies
- Defined in:
- lib/distributed_press/v1/social/replies.rb
Overview
Manages the activity’s replies
Instance Attribute Summary collapse
-
#activity ⇒ String
readonly
Activity ID (URL).
- #actor ⇒ String readonly
- #client ⇒ DistributedPress::V1::Social::Client readonly
Instance Method Summary collapse
-
#endpoint ⇒ String
Replies.
-
#get ⇒ HTTParty::Response
Get the activities replies collection.
-
#initialize(client:, actor:, activity:) ⇒ Replies
constructor
A new instance of Replies.
Constructor Details
#initialize(client:, actor:, activity:) ⇒ Replies
Returns a new instance of Replies.
23 24 25 26 27 |
# File 'lib/distributed_press/v1/social/replies.rb', line 23 def initialize(client:, actor:, activity:) @client = client @actor = actor @activity = activity end |
Instance Attribute Details
#activity ⇒ String (readonly)
Returns Activity ID (URL).
18 19 20 |
# File 'lib/distributed_press/v1/social/replies.rb', line 18 def activity @activity end |
#actor ⇒ String (readonly)
15 16 17 |
# File 'lib/distributed_press/v1/social/replies.rb', line 15 def actor @actor end |
#client ⇒ DistributedPress::V1::Social::Client (readonly)
12 13 14 |
# File 'lib/distributed_press/v1/social/replies.rb', line 12 def client @client end |
Instance Method Details
#endpoint ⇒ String
Replies
40 41 42 |
# File 'lib/distributed_press/v1/social/replies.rb', line 40 def endpoint @endpoint ||= "/v1/#{actor}/inbox/replies/#{Base64.encode64(activity).delete("\n")}" end |
#get ⇒ HTTParty::Response
Get the activities replies collection. Authenticated requests contain the list of replies.
33 34 35 |
# File 'lib/distributed_press/v1/social/replies.rb', line 33 def get client.get(endpoint: endpoint) end |