twitter 8.0.0.rc.1 → 8.0.0

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: b80e3506c8a84c489163c646cc9dee9796125556ac219c29f324f533436e2699
4
- data.tar.gz: 25c98a022fefc26d3c38de160a4afa6edcf619e79b9f72487e61643891eb65fb
3
+ metadata.gz: 887f3f7456fa0b9203510120f02368de184dacf83d110b8c0b8a5c28e89bfd74
4
+ data.tar.gz: 328625a02d50b6fb1bc4167badb0089c249a1c7f89379fba88694bacc247b7c9
5
5
  SHA512:
6
- metadata.gz: bd410ed4a557fb3e2890e9fc6cd81672f73b1d8dfa4d0c5cb3f793943074f5ef8aba43332e833bc411ac39c1648a0835145a4c722f6c94bd790fcd7d390610c3
7
- data.tar.gz: 726be9e6536df1c63fdbf528011ddffeeee5c88bf65031f88555009718626c40a7e8661356abd4c58be6709b289565a4e56fb36127a9512b4c7009d27b4bf26b
6
+ metadata.gz: f4da2b78382449b35b00181f71ea6e48de2e169c9e1c5107c414d2384c721a0cb4328b7981dc9f987a5c947e593974b1fb811ef76d10a277dfb471d93c039d97
7
+ data.tar.gz: b02e8884564113c6e28ff5852826e35861c1ce7dee1db57925c0c6f09f5dfebf9879030c786b44910a910a224592ba8c42045bddbac187e68e03d4e29bf4608c
@@ -50,8 +50,7 @@ module Twitter
50
50
  # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
51
51
  # @return [Array<Twitter::DirectMessage>] Direct messages received by the authenticating user.
52
52
  # @param options [Hash] A customizable set of options.
53
- # @option options [Integer] :count Specifies the number of records (sent and received dms) to retrieve. Must be less than or equal to 50. Default is 50
54
- # this count does not directly correspond to the output, as we pull sent and received messages from twitter and only present received to the user
53
+ # @option options [Integer] :count Specifies the number of records (sent and received dms) to retrieve. Must be less than or equal to 50. Default is 20
55
54
  # @option options [String] :cursor Specifies the cursor position of results to retrieve.
56
55
  def direct_messages_received(options = {})
57
56
  limit = options.fetch(:count, 20)
@@ -66,8 +65,7 @@ module Twitter
66
65
  # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
67
66
  # @return [Array<Twitter::DirectMessage>] Direct messages sent by the authenticating user.
68
67
  # @param options [Hash] A customizable set of options.
69
- # @option options [Integer] :count Specifies the number of records (sent and received dms) to retrieve. Must be less than or equal to 50. Default is 50
70
- # this count does not directly correspond to the output, as we pull sent and received messages from twitter and only present received to the user
68
+ # @option options [Integer] :count Specifies the number of records (sent and received dms) to retrieve. Must be less than or equal to 50. Default is 20
71
69
  # @option options [String] :cursor Specifies the cursor position of results to retrieve.
72
70
  def direct_messages_sent(options = {})
73
71
  limit = options.fetch(:count, 20)
@@ -84,7 +82,6 @@ module Twitter
84
82
  # @return [Twitter::DirectMessage] The requested message.
85
83
  # @param id [Integer] A direct message ID.
86
84
  # @param options [Hash] A customizable set of options.
87
-
88
85
  def direct_message(id, options = {})
89
86
  direct_message_event(id, options).direct_message
90
87
  end
@@ -116,8 +113,7 @@ module Twitter
116
113
 
117
114
  # @see https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events
118
115
  # @param options [Hash] A customizable set of options.
119
- # @option options [Integer] :count Specifies the number of records (sent and received dms) to retrieve. Must be less than or equal to 50. Default is 50
120
- # this count does not directly correspond to the output, as we pull sent and received messages from twitter and only present received to the user
116
+ # @option options [Integer] :count Specifies the number of records (sent and received dms) to retrieve. Must be less than or equal to 50. Default is 20
121
117
  # @option options [String] :cursor Specifies the cursor position of results to retrieve.
122
118
  # @overload direct_messages(*ids)
123
119
  # Returns direct messages
@@ -165,7 +161,7 @@ module Twitter
165
161
  # @authentication Requires user context
166
162
  # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
167
163
  # @return [Twitter::DirectMessage] The sent message.
168
- # @param user [Integer, String, Twitter::User] A Twitter user ID
164
+ # @param user_id [Integer] A Twitter user ID
169
165
  # @param text [String] The text of your direct message, up to 10,000 characters.
170
166
  # @param options [Hash] A customizable set of options.
171
167
  def create_direct_message(user_id, text, options = {})
@@ -241,7 +241,7 @@ module Twitter
241
241
  # @param users [Enumerable<Integer, String, URI, Twitter::User>] A collection of Twitter user IDs, screen_names, URIs, or objects.
242
242
  # @return [Hash]
243
243
  def merge_users!(hash, users)
244
- user_ids, screen_names = collect_users(users)
244
+ user_ids, screen_names = collect_users(users.uniq)
245
245
  hash[:user_id] = user_ids.join(",") unless user_ids.empty?
246
246
  hash[:screen_name] = screen_names.join(",") unless screen_names.empty?
247
247
  end
@@ -19,7 +19,7 @@ module Twitter
19
19
 
20
20
  # @return [Integer, NilClass]
21
21
  def pre
22
- "rc.1"
22
+ nil
23
23
  end
24
24
 
25
25
  # @return [Hash]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0.rc.1
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Berlin
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2023-03-08 00:00:00.000000000 Z
15
+ date: 2023-04-30 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: addressable
@@ -275,11 +275,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
275
275
  version: '3.0'
276
276
  required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  requirements:
278
- - - ">"
278
+ - - ">="
279
279
  - !ruby/object:Gem::Version
280
- version: 1.3.1
280
+ version: '0'
281
281
  requirements: []
282
- rubygems_version: 3.2.33
282
+ rubygems_version: 3.4.12
283
283
  signing_key:
284
284
  specification_version: 4
285
285
  summary: A Ruby interface to the Twitter API.