twitter 8.0.0.rc.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/twitter/rest/direct_messages.rb +4 -8
- data/lib/twitter/rest/utils.rb +1 -1
- data/lib/twitter/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 887f3f7456fa0b9203510120f02368de184dacf83d110b8c0b8a5c28e89bfd74
|
4
|
+
data.tar.gz: 328625a02d50b6fb1bc4167badb0089c249a1c7f89379fba88694bacc247b7c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
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
|
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 = {})
|
data/lib/twitter/rest/utils.rb
CHANGED
@@ -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
|
data/lib/twitter/version.rb
CHANGED
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
|
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-
|
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:
|
280
|
+
version: '0'
|
281
281
|
requirements: []
|
282
|
-
rubygems_version: 3.
|
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.
|