twitter 8.1.0 → 8.3.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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +1 -1
  3. data/README.md +173 -11
  4. data/lib/twitter/arguments.rb +14 -1
  5. data/lib/twitter/base.rb +72 -11
  6. data/lib/twitter/basic_user.rb +7 -1
  7. data/lib/twitter/client.rb +94 -3
  8. data/lib/twitter/creatable.rb +11 -2
  9. data/lib/twitter/cursor.rb +58 -11
  10. data/lib/twitter/direct_message.rb +32 -4
  11. data/lib/twitter/direct_message_event.rb +34 -10
  12. data/lib/twitter/direct_messages/welcome_message.rb +22 -1
  13. data/lib/twitter/direct_messages/welcome_message_rule.rb +7 -0
  14. data/lib/twitter/direct_messages/welcome_message_rule_wrapper.rb +26 -3
  15. data/lib/twitter/direct_messages/welcome_message_wrapper.rb +36 -11
  16. data/lib/twitter/entities.rb +84 -8
  17. data/lib/twitter/entity/hashtag.rb +7 -1
  18. data/lib/twitter/entity/symbol.rb +7 -1
  19. data/lib/twitter/entity/uri.rb +2 -1
  20. data/lib/twitter/entity/user_mention.rb +20 -1
  21. data/lib/twitter/entity.rb +7 -1
  22. data/lib/twitter/enumerable.rb +20 -3
  23. data/lib/twitter/error.rb +137 -61
  24. data/lib/twitter/factory.rb +9 -5
  25. data/lib/twitter/geo/point.rb +37 -5
  26. data/lib/twitter/geo/polygon.rb +1 -0
  27. data/lib/twitter/geo.rb +16 -2
  28. data/lib/twitter/geo_factory.rb +7 -3
  29. data/lib/twitter/geo_results.rb +39 -8
  30. data/lib/twitter/headers.rb +44 -7
  31. data/lib/twitter/identity.rb +13 -3
  32. data/lib/twitter/language.rb +21 -1
  33. data/lib/twitter/list.rb +101 -11
  34. data/lib/twitter/media/animated_gif.rb +1 -0
  35. data/lib/twitter/media/photo.rb +19 -3
  36. data/lib/twitter/media/video.rb +21 -3
  37. data/lib/twitter/media/video_info.rb +15 -1
  38. data/lib/twitter/media_factory.rb +7 -3
  39. data/lib/twitter/metadata.rb +14 -1
  40. data/lib/twitter/null_object.rb +16 -14
  41. data/lib/twitter/oembed.rb +56 -2
  42. data/lib/twitter/place.rb +74 -6
  43. data/lib/twitter/premium_search_results.rb +87 -18
  44. data/lib/twitter/profile.rb +100 -44
  45. data/lib/twitter/profile_banner.rb +9 -4
  46. data/lib/twitter/rate_limit.rb +32 -3
  47. data/lib/twitter/relationship.rb +8 -5
  48. data/lib/twitter/rest/account_activity.rb +55 -26
  49. data/lib/twitter/rest/api.rb +2 -0
  50. data/lib/twitter/rest/client.rb +18 -0
  51. data/lib/twitter/rest/direct_messages/welcome_messages.rb +89 -18
  52. data/lib/twitter/rest/direct_messages.rb +158 -94
  53. data/lib/twitter/rest/favorites.rb +57 -21
  54. data/lib/twitter/rest/form_encoder.rb +57 -17
  55. data/lib/twitter/rest/friends_and_followers.rb +101 -35
  56. data/lib/twitter/rest/help.rb +13 -3
  57. data/lib/twitter/rest/lists.rb +133 -45
  58. data/lib/twitter/rest/oauth.rb +23 -17
  59. data/lib/twitter/rest/places_and_geo.rb +44 -28
  60. data/lib/twitter/rest/premium_search.rb +18 -13
  61. data/lib/twitter/rest/request.rb +171 -53
  62. data/lib/twitter/rest/saved_searches.rb +22 -7
  63. data/lib/twitter/rest/search.rb +20 -16
  64. data/lib/twitter/rest/spam_reporting.rb +5 -1
  65. data/lib/twitter/rest/suggested_users.rb +14 -5
  66. data/lib/twitter/rest/timelines.rb +92 -52
  67. data/lib/twitter/rest/trends.rb +31 -12
  68. data/lib/twitter/rest/tweets.rb +145 -88
  69. data/lib/twitter/rest/undocumented.rb +11 -2
  70. data/lib/twitter/rest/upload_utils.rb +42 -26
  71. data/lib/twitter/rest/users.rb +150 -71
  72. data/lib/twitter/rest/utils.rb +135 -39
  73. data/lib/twitter/saved_search.rb +23 -2
  74. data/lib/twitter/search_results.rb +62 -17
  75. data/lib/twitter/settings.rb +37 -11
  76. data/lib/twitter/size.rb +37 -3
  77. data/lib/twitter/source_user.rb +4 -3
  78. data/lib/twitter/streaming/client.rb +60 -8
  79. data/lib/twitter/streaming/connection.rb +55 -8
  80. data/lib/twitter/streaming/deleted_tweet.rb +8 -0
  81. data/lib/twitter/streaming/event.rb +43 -1
  82. data/lib/twitter/streaming/friend_list.rb +1 -0
  83. data/lib/twitter/streaming/message_parser.rb +20 -10
  84. data/lib/twitter/streaming/response.rb +31 -5
  85. data/lib/twitter/streaming/stall_warning.rb +23 -0
  86. data/lib/twitter/suggestion.rb +25 -1
  87. data/lib/twitter/target_user.rb +2 -1
  88. data/lib/twitter/trend.rb +29 -1
  89. data/lib/twitter/trend_results.rb +50 -7
  90. data/lib/twitter/tweet.rb +180 -21
  91. data/lib/twitter/user.rb +289 -53
  92. data/lib/twitter/utils.rb +12 -13
  93. data/lib/twitter/variant.rb +12 -1
  94. data/lib/twitter/version.rb +66 -29
  95. data/lib/twitter.rb +6 -1
  96. metadata +29 -73
  97. data/.yardopts +0 -16
  98. data/CHANGELOG.md +0 -1035
  99. data/CONTRIBUTING.md +0 -49
  100. data/twitter.gemspec +0 -57
data/CONTRIBUTING.md DELETED
@@ -1,49 +0,0 @@
1
- ## Contributing
2
- In the spirit of [free software][free-sw], **everyone** is encouraged to help
3
- improve this project. Here are some ways *you* can contribute:
4
-
5
- [free-sw]: http://www.fsf.org/licensing/essays/free-sw.html
6
-
7
- * Use alpha, beta, and pre-release versions.
8
- * Report bugs.
9
- * Suggest new features.
10
- * Write or edit documentation.
11
- * Write specifications.
12
- * Write code (**no patch is too small**: fix typos, add comments, clean up
13
- inconsistent whitespace).
14
- * Refactor code.
15
- * Fix [issues][].
16
- * Review patches.
17
- * Financially pledge using [gittip][].
18
-
19
- [issues]: https://github.com/sferik/twitter/issues
20
- [gittip]: https://www.gittip.com/sferik/
21
-
22
- ## Submitting an Issue
23
- We use the [GitHub issue tracker][issues] to track bugs and features. Before
24
- submitting a bug report or feature request, check to make sure it hasn't
25
- already been submitted. When submitting a bug report, please include a [Gist][]
26
- that includes a stack trace and any details that may be necessary to reproduce
27
- the bug, including your gem version, Ruby version, and operating system.
28
- Ideally, a bug report should include a pull request with failing specs.
29
-
30
- [gist]: https://gist.github.com/
31
-
32
- ## Submitting a Pull Request
33
- 1. [Fork the repository.][fork]
34
- 2. [Create a topic branch.][branch]
35
- 3. Add specs for your unimplemented feature or bug fix.
36
- 4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
37
- 5. Implement your feature or bug fix.
38
- 6. Run `bundle exec rake`. If your specs fail, return to step 5.
39
- 7. Run `open coverage/index.html`. If your changes are not completely covered
40
- by your tests, return to step 3.
41
- 8. Add documentation for your feature or bug fix.
42
- 9. Run `bundle exec rake verify_measurements`. If your changes are not 100%
43
- documented, go back to step 8.
44
- 10. Commit and push your changes.
45
- 11. [Submit a pull request.][pr]
46
-
47
- [fork]: http://help.github.com/fork-a-repo/
48
- [branch]: http://learn.github.com/p/branching.html
49
- [pr]: http://help.github.com/send-pull-requests/
data/twitter.gemspec DELETED
@@ -1,57 +0,0 @@
1
- lib = File.expand_path("lib", __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "twitter/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.add_dependency "addressable", "~> 2.8"
7
- spec.add_dependency "buftok", "~> 0.3.0"
8
- spec.add_dependency "equalizer", "~> 0.0.11"
9
- spec.add_dependency "http", "~> 5.2"
10
- spec.add_dependency "http-form_data", "~> 2.3"
11
- spec.add_dependency "llhttp-ffi", "~> 0.5.0"
12
- spec.add_dependency "memoizable", "~> 0.4.0"
13
- spec.add_dependency "multipart-post", "~> 2.4"
14
- spec.add_dependency "naught", "~> 1.1"
15
- spec.add_dependency "simple_oauth", "~> 0.3.0"
16
- spec.authors = ["Erik Berlin", "John Nunemaker", "Wynn Netherland", "Steve Richert", "Steve Agalloco"]
17
- spec.description = "A Ruby interface to the Twitter API."
18
- spec.email = %w[sferik@gmail.com]
19
- spec.files = %w[.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md twitter.gemspec] + Dir["lib/**/*.rb"]
20
- spec.homepage = "https://sferik.github.io/twitter/"
21
- spec.licenses = %w[MIT]
22
- spec.metadata["rubygems_mfa_required"] = "true"
23
- spec.name = "twitter"
24
- spec.post_install_message = "📣 Attention Twitter Ruby Gem User!
25
- If you're seeing this message, that means you're using the old Twitter Ruby gem
26
- which is no longer maintained and will not support Twitter API v2.
27
-
28
- 🎉 Here's the good news:
29
- We recommend switching to the X gem, which supports both API v1.1 and v2. It's
30
- a robust, modern libary that is designed to ensure you'll be able to easily
31
- integrate forthcoming API changes.
32
-
33
- 🔗 For more details, visit: https://sferik.github.io/x-ruby/
34
-
35
- 🤔 Please consider sponsoring
36
- The X gem is free to use, but with new API pricing tiers, it actually costs
37
- money to develop and maintain. By contributing to the project, you help:
38
-
39
- 1. 🛠 Maintain the library: Keeping it up-to-date and secure.
40
- 2. 🌈 Add new features: Enhancements that make your life easier.
41
- 3. 💬 Provide support: Faster responses to issues and feature requests.
42
- ⭐️ Bonus: Sponsors will get priority influence over the project roadmap.
43
- Your company's logo will also be displayed on the project's GitHub page.
44
-
45
- 🔗 To sponsor, visit: https://github.com/sponsors/sferik
46
-
47
- Building and maintaining an open-source project like this takes a considerable
48
- amount of time and effort. Your sponsorship can help sustain this project. Even
49
- a small monthly donation makes a big difference!
50
-
51
- 💖 Thanks for considering sponsorship. Together we can make the X gem even better!
52
- "
53
- spec.require_paths = %w[lib]
54
- spec.required_ruby_version = ">= 3.1.4"
55
- spec.summary = spec.description
56
- spec.version = Twitter::Version
57
- end