distributed-press-api-client 0.4.2 → 0.5.0rc0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26a1b1d09a0b95c8852f253a6d4bf5c5a8f506c0e8176f65bbbffe1ef8f06aff
4
- data.tar.gz: a06560b95f7e1969c52e653fb563569bb17b811e91995766a36f3f8de85b640d
3
+ metadata.gz: e19e26b40b8e66a49cd2ac91d688ffc0757fc83c7d19d6d3e7c59917d7cab652
4
+ data.tar.gz: bea92fa0f42403e3c6eeffa5484f8224bbfc08236089be41aed7dd6900124f77
5
5
  SHA512:
6
- metadata.gz: bce9df9c4cd0eb80868af163c63a9234006d5c779b91e768bd4726aebd0978fb44a240b9c7806912ea480f338a47ead8d433b3c7b956662eb0cb2b9527c93f57
7
- data.tar.gz: 28be64d94b3add7ac1333f85ff2f00a4e55b9568783de437172264c619227d75e28801082a0600186480935e2dda9605411e68dc8d53cc10280ceed1893fe411
6
+ metadata.gz: 6df7cae6980256471a341c25d9ec34f60d38df59eded802959e210167157960376ef19e00d09be9b943cbf9f165046b7949de7824ea1dffbb7dd8824718c8f7b
7
+ data.tar.gz: 846042442ce3c6720b5af695332d6140edacbe523e4fc7ad3f930938179672faffbd4a587e66ff45a44b1c8e796133188cc1e867770f4b9e4859d8f07e0c2fca
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'uri'
4
+ require_relative 'client'
5
+
6
+ class DistributedPress
7
+ module V1
8
+ module Social
9
+ # Manages the activity's replies
10
+ class Replies
11
+ # @return [DistributedPress::V1::Social::Client]
12
+ attr_reader :client
13
+
14
+ # @return [String]
15
+ attr_reader :actor
16
+
17
+ # @return [String] Activity ID (URL)
18
+ attr_reader :activity
19
+
20
+ # @param :client [DistributedPress::V1::Social::Client]
21
+ # @param :actor [String]
22
+ # @param :activity [String]
23
+ def initialize(client:, actor:, activity:)
24
+ @client = client
25
+ @actor = actor
26
+ @activity = activity
27
+ end
28
+
29
+ # Get the activities replies collection. Authenticated requests
30
+ # contain the list of replies.
31
+ #
32
+ # @return [HTTParty::Response]
33
+ def get
34
+ client.get(endpoint: endpoint)
35
+ end
36
+
37
+ # Replies
38
+ #
39
+ # @return [String]
40
+ def endpoint
41
+ @endpoint ||= "/v1/#{actor}/inbox/replies/#{URI.encode_uri_component(activity)}"
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -3,5 +3,5 @@
3
3
  # API client
4
4
  class DistributedPress
5
5
  # Version
6
- VERSION = '0.4.2'
6
+ VERSION = '0.5.0rc0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distributed-press-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0rc0
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-05 00:00:00.000000000 Z
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -317,6 +317,7 @@ files:
317
317
  - lib/distributed_press/v1/social/outbox.rb
318
318
  - lib/distributed_press/v1/social/reference.rb
319
319
  - lib/distributed_press/v1/social/referenced_object.rb
320
+ - lib/distributed_press/v1/social/replies.rb
320
321
  - lib/distributed_press/v1/social/schemas/webhook.rb
321
322
  - lib/distributed_press/v1/social/signed_headers.rb
322
323
  - lib/distributed_press/v1/token.rb
@@ -351,9 +352,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
352
  version: '2.7'
352
353
  required_rubygems_version: !ruby/object:Gem::Requirement
353
354
  requirements:
354
- - - ">="
355
+ - - ">"
355
356
  - !ruby/object:Gem::Version
356
- version: '0'
357
+ version: 1.3.1
357
358
  requirements: []
358
359
  rubygems_version: 3.3.26
359
360
  signing_key: