This repository has been archived by the owner on Nov 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a logical length 1 in check_media.
- Loading branch information
Showing
4 changed files
with
282 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: rtweet | ||
Title: Collecting Twitter Data | ||
Version: 1.0.2.9000 | ||
Version: 1.0.2.9001 | ||
Authors@R: c( | ||
person("Michael W.", "Kearney", , "[email protected]", role = c("aut"), | ||
comment = c(ORCID = "0000-0002-0730-4694")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
http_interactions: | ||
- request: | ||
method: post | ||
uri: https://upload.twitter.com/1.1/media/upload.json | ||
body: | ||
encoding: '' | ||
string: media=list(path = "/home/lluis/Documents/Projects/rtweet/tests/testthat/testing_plot.png", | ||
type = "image/png") | ||
headers: | ||
Accept: application/json, text/xml, application/xml, */* | ||
Authorization: My oauth token is safe | ||
response: | ||
status: | ||
status_code: 200 | ||
category: Success | ||
reason: OK | ||
message: 'Success: (200) OK' | ||
headers: | ||
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 | ||
content-disposition: attachment; filename=json.json | ||
content-encoding: gzip | ||
content-length: '146' | ||
content-type: application/json;charset=utf-8 | ||
date: Thu, 28 Jul 2022 22:45:06 GMT | ||
expires: Tue, 31 Mar 1981 05:00:00 GMT | ||
last-modified: Thu, 28 Jul 2022 22:45:06 GMT | ||
pragma: no-cache | ||
server: tsa_f | ||
set-cookie: | ||
- lang=en; Path=/ | ||
- guest_id=v1%3A165904830627017873; Max-Age=34214400; Expires=Mon, 28 Aug 2023 | ||
22:45:06 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None | ||
status: 200 OK | ||
strict-transport-security: max-age=631138519 | ||
vary: Origin | ||
x-access-level: read-write-directmessages | ||
x-connection-hash: 63615f9f03b9966f627ebd4764c82603461f0f42b7c1bafdaf6d89dd153bb2ea | ||
x-frame-options: SAMEORIGIN | ||
x-rate-limit-limit: '415' | ||
x-rate-limit-remaining: '414' | ||
x-rate-limit-reset: '1659051906' | ||
x-response-time: '765' | ||
x-transaction: 7ef003017dd7e251 | ||
x-twitter-response-tags: BouncerCompliant | ||
x-xss-protection: 1; mode=block | ||
body: | ||
encoding: UTF-8 | ||
file: no | ||
string: '{"media_id":1552787257689620480,"media_id_string":"1552787257689620480","size":48270,"expires_after_secs":86400,"image":{"image_type":"image\/png","w":2818,"h":1890}}' | ||
recorded_at: 2022-07-28 22:45:09 GMT | ||
recorded_with: vcr/1.0.2, webmockr/0.8.0 | ||
- request: | ||
method: post | ||
uri: https://upload.twitter.com/1.1/media/metadata/create.json | ||
body: | ||
encoding: '' | ||
string: '{"media_id":"1552787257689620480","alt_text":{"text":"mp4 for testing"}}' | ||
headers: | ||
Accept: application/json, text/xml, application/xml, */* | ||
Content-Type: application/json | ||
Authorization: My oauth token is safe | ||
response: | ||
status: | ||
status_code: 200 | ||
category: Success | ||
reason: OK | ||
message: 'Success: (200) OK' | ||
headers: | ||
date: Thu, 28 Jul 2022 22:45:07 GMT | ||
vary: Origin | ||
pragma: no-cache | ||
server: tsa_f | ||
status: 200 OK | ||
expires: Tue, 31 Mar 1981 05:00:00 GMT | ||
content-type: text/html;charset=utf-8 | ||
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 | ||
last-modified: Thu, 28 Jul 2022 22:45:07 GMT | ||
x-transaction: a0e308668d28b510 | ||
content-length: '0' | ||
x-access-level: read-write-directmessages | ||
x-frame-options: SAMEORIGIN | ||
x-xss-protection: 1; mode=block | ||
x-rate-limit-limit: '2000' | ||
x-rate-limit-reset: '1659051907' | ||
x-rate-limit-remaining: '1999' | ||
content-security-policy: default-src 'self'; connect-src 'self'; font-src 'self' | ||
https://*.twimg.com https://twitter.com https://ton.twitter.com data:; frame-src | ||
'self' https://*.twimg.com https://twitter.com https://ton.twitter.com; img-src | ||
'self' https://*.twimg.com https://twitter.com https://ton.twitter.com data:; | ||
media-src 'self' https://*.twimg.com https://twitter.com https://ton.twitter.com; | ||
object-src 'none'; script-src 'self' https://*.twimg.com https://twitter.com | ||
https://ton.twitter.com; style-src 'self' https://*.twimg.com https://twitter.com | ||
https://ton.twitter.com; report-uri https://twitter.com/i/csp_report?a=OBZG6ZTJNRSWE2LSMQ%3D%3D%3D%3D%3D%3D&ro=false; | ||
x-twitter-response-tags: BouncerCompliant | ||
strict-transport-security: max-age=631138519 | ||
x-response-time: '141' | ||
x-connection-hash: 63615f9f03b9966f627ebd4764c82603461f0f42b7c1bafdaf6d89dd153bb2ea | ||
body: | ||
encoding: UTF-8 | ||
file: no | ||
string: '' | ||
recorded_at: 2022-07-28 22:45:09 GMT | ||
recorded_with: vcr/1.0.2, webmockr/0.8.0 | ||
- request: | ||
method: post | ||
uri: https://upload.twitter.com/1.1/media/upload.json | ||
body: | ||
encoding: '' | ||
string: media=list(path = "/home/lluis/Documents/Projects/rtweet/tests/testthat/testing_plot.jpg", | ||
type = "image/jpeg") | ||
headers: | ||
Accept: application/json, text/xml, application/xml, */* | ||
Authorization: My oauth token is safe | ||
response: | ||
status: | ||
status_code: 200 | ||
category: Success | ||
reason: OK | ||
message: 'Success: (200) OK' | ||
headers: | ||
date: Thu, 28 Jul 2022 22:45:08 GMT | ||
vary: Origin | ||
pragma: no-cache | ||
server: tsa_f | ||
status: 200 OK | ||
expires: Tue, 31 Mar 1981 05:00:00 GMT | ||
content-type: application/json;charset=utf-8 | ||
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 | ||
last-modified: Thu, 28 Jul 2022 22:45:08 GMT | ||
x-transaction: 07a02aade8661436 | ||
content-length: '148' | ||
x-access-level: read-write-directmessages | ||
x-frame-options: SAMEORIGIN | ||
content-encoding: gzip | ||
x-xss-protection: 1; mode=block | ||
x-rate-limit-limit: '415' | ||
x-rate-limit-reset: '1659051906' | ||
content-disposition: attachment; filename=json.json | ||
x-rate-limit-remaining: '413' | ||
x-twitter-response-tags: BouncerCompliant | ||
strict-transport-security: max-age=631138519 | ||
x-response-time: '818' | ||
x-connection-hash: 63615f9f03b9966f627ebd4764c82603461f0f42b7c1bafdaf6d89dd153bb2ea | ||
body: | ||
encoding: UTF-8 | ||
file: no | ||
string: '{"media_id":1552787263641247749,"media_id_string":"1552787263641247749","size":223180,"expires_after_secs":86400,"image":{"image_type":"image\/jpeg","w":2818,"h":1890}}' | ||
recorded_at: 2022-07-28 22:45:09 GMT | ||
recorded_with: vcr/1.0.2, webmockr/0.8.0 | ||
- request: | ||
method: post | ||
uri: https://upload.twitter.com/1.1/media/metadata/create.json | ||
body: | ||
encoding: '' | ||
string: '{"media_id":"1552787263641247749","alt_text":{"text":"gif for testing"}}' | ||
headers: | ||
Accept: application/json, text/xml, application/xml, */* | ||
Content-Type: application/json | ||
Authorization: My oauth token is safe | ||
response: | ||
status: | ||
status_code: 200 | ||
category: Success | ||
reason: OK | ||
message: 'Success: (200) OK' | ||
headers: | ||
date: Thu, 28 Jul 2022 22:45:08 GMT | ||
vary: Origin | ||
pragma: no-cache | ||
server: tsa_f | ||
status: 200 OK | ||
expires: Tue, 31 Mar 1981 05:00:00 GMT | ||
content-type: text/html;charset=utf-8 | ||
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 | ||
last-modified: Thu, 28 Jul 2022 22:45:08 GMT | ||
x-transaction: 73c4994bf16d58b4 | ||
content-length: '0' | ||
x-access-level: read-write-directmessages | ||
x-frame-options: SAMEORIGIN | ||
x-xss-protection: 1; mode=block | ||
x-rate-limit-limit: '2000' | ||
x-rate-limit-reset: '1659051907' | ||
x-rate-limit-remaining: '1998' | ||
content-security-policy: default-src 'self'; connect-src 'self'; font-src 'self' | ||
https://*.twimg.com https://twitter.com https://ton.twitter.com data:; frame-src | ||
'self' https://*.twimg.com https://twitter.com https://ton.twitter.com; img-src | ||
'self' https://*.twimg.com https://twitter.com https://ton.twitter.com data:; | ||
media-src 'self' https://*.twimg.com https://twitter.com https://ton.twitter.com; | ||
object-src 'none'; script-src 'self' https://*.twimg.com https://twitter.com | ||
https://ton.twitter.com; style-src 'self' https://*.twimg.com https://twitter.com | ||
https://ton.twitter.com; report-uri https://twitter.com/i/csp_report?a=OBZG6ZTJNRSWE2LSMQ%3D%3D%3D%3D%3D%3D&ro=false; | ||
x-twitter-response-tags: BouncerCompliant | ||
strict-transport-security: max-age=631138519 | ||
x-response-time: '104' | ||
x-connection-hash: 63615f9f03b9966f627ebd4764c82603461f0f42b7c1bafdaf6d89dd153bb2ea | ||
body: | ||
encoding: UTF-8 | ||
file: no | ||
string: '' | ||
recorded_at: 2022-07-28 22:45:09 GMT | ||
recorded_with: vcr/1.0.2, webmockr/0.8.0 | ||
- request: | ||
method: post | ||
uri: https://api.twitter.com/1.1/statuses/update.json?status=status message&media_ids=1552787257689620480%2C1552787263641247749 | ||
body: | ||
encoding: '' | ||
string: '' | ||
headers: | ||
Accept: application/json, text/xml, application/xml, */* | ||
Content-Type: '' | ||
Authorization: My oauth token is safe | ||
response: | ||
status: | ||
status_code: 200 | ||
category: Success | ||
reason: OK | ||
message: 'Success: (200) OK' | ||
headers: | ||
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 | ||
content-disposition: attachment; filename=json.json | ||
content-encoding: gzip | ||
content-length: '1113' | ||
content-type: application/json;charset=utf-8 | ||
date: Thu, 28 Jul 2022 22:45:09 GMT | ||
expires: Tue, 31 Mar 1981 05:00:00 GMT | ||
last-modified: Thu, 28 Jul 2022 22:45:09 GMT | ||
pragma: no-cache | ||
server: tsa_f | ||
set-cookie: | ||
- lang=en; Path=/ | ||
- guest_id=v1%3A165904830883196603; Max-Age=34214400; Expires=Mon, 28 Aug 2023 | ||
22:45:09 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None | ||
status: 200 OK | ||
strict-transport-security: max-age=631138519 | ||
x-access-level: read-write-directmessages | ||
x-connection-hash: cfd0f0e05d901b98d1267724a08b2b550bcbcedf2ebd1ead3c333efabf4005e9 | ||
x-content-type-options: nosniff | ||
x-frame-options: SAMEORIGIN | ||
x-response-time: '509' | ||
x-transaction: f73ae97d5b9e627a | ||
x-twitter-response-tags: BouncerCompliant | ||
x-xss-protection: '0' | ||
body: | ||
encoding: UTF-8 | ||
file: no | ||
string: '{"created_at":"Thu Jul 28 22:45:08 +0000 2022","id":1552787268439515136,"id_str":"1552787268439515136","text":"Testing | ||
multiple media https:\/\/t.co\/mnG83IcZve","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":1552787257689620480,"id_str":"1552787257689620480","indices":[23,46],"media_url":"http:\/\/pbs.twimg.com\/media\/FYybyKpXwAAphdo.png","media_url_https":"https:\/\/pbs.twimg.com\/media\/FYybyKpXwAAphdo.png","url":"https:\/\/t.co\/mnG83IcZve","display_url":"pic.twitter.com\/mnG83IcZve","expanded_url":"https:\/\/twitter.com\/rtweet_test\/status\/1552787268439515136\/photo\/1","type":"photo","sizes":{"medium":{"w":1200,"h":805,"resize":"fit"},"small":{"w":680,"h":456,"resize":"fit"},"large":{"w":2048,"h":1374,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"}}}]},"extended_entities":{"media":[{"id":1552787257689620480,"id_str":"1552787257689620480","indices":[23,46],"media_url":"http:\/\/pbs.twimg.com\/media\/FYybyKpXwAAphdo.png","media_url_https":"https:\/\/pbs.twimg.com\/media\/FYybyKpXwAAphdo.png","url":"https:\/\/t.co\/mnG83IcZve","display_url":"pic.twitter.com\/mnG83IcZve","expanded_url":"https:\/\/twitter.com\/rtweet_test\/status\/1552787268439515136\/photo\/1","type":"photo","sizes":{"medium":{"w":1200,"h":805,"resize":"fit"},"small":{"w":680,"h":456,"resize":"fit"},"large":{"w":2048,"h":1374,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"}}},{"id":1552787263641247749,"id_str":"1552787263641247749","indices":[23,46],"media_url":"http:\/\/pbs.twimg.com\/media\/FYybyg0WYAUblpH.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/FYybyg0WYAUblpH.jpg","url":"https:\/\/t.co\/mnG83IcZve","display_url":"pic.twitter.com\/mnG83IcZve","expanded_url":"https:\/\/twitter.com\/rtweet_test\/status\/1552787268439515136\/photo\/1","type":"photo","sizes":{"large":{"w":2048,"h":1374,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":680,"h":456,"resize":"fit"},"medium":{"w":1200,"h":805,"resize":"fit"}}}]},"source":"\u003ca | ||
href=\"https:\/\/github.com\/ropensci\/rtweet\" rel=\"nofollow\"\u003ertweet_test_ci\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1365671359137873920,"id_str":"1365671359137873920","name":"rtweet-test","screen_name":"rtweet_test","location":"","description":"Testing | ||
bot for rtweet","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":4,"friends_count":2,"listed_count":0,"created_at":"Sat | ||
Feb 27 14:33:58 +0000 2021","favourites_count":12,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":999,"lang":null,"contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"F5F8FA","profile_background_image_url":null,"profile_background_image_url_https":null,"profile_background_tile":false,"profile_image_url":"http:\/\/abs.twimg.com\/sticky\/default_profile_images\/default_profile_normal.png","profile_image_url_https":"https:\/\/abs.twimg.com\/sticky\/default_profile_images\/default_profile_normal.png","profile_link_color":"1DA1F2","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":true,"default_profile":true,"default_profile_image":true,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"none","withheld_in_countries":[]},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":0,"favorite_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}' | ||
recorded_at: 2022-07-28 22:45:09 GMT | ||
recorded_with: vcr/1.0.2, webmockr/0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters