File: spam_reporting.rb

package info (click to toggle)
ruby-twitter 7.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,856 kB
  • sloc: ruby: 10,919; makefile: 6
file content (26 lines) | stat: -rw-r--r-- 1,095 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'twitter/rest/utils'
require 'twitter/user'

module Twitter
  module REST
    module SpamReporting
      include Twitter::REST::Utils

      # The users specified are blocked by the authenticated user and reported as spammers
      #
      # @see https://dev.twitter.com/rest/reference/post/users/report_spam
      # @rate_limited Yes
      # @authentication Requires user context
      # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
      # @return [Array<Twitter::User>] The reported users.
      # @overload report_spam(*users)
      #   @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
      # @overload report_spam(*users, options)
      #   @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
      #   @param options [Hash] A customizable set of options.
      def report_spam(*args)
        parallel_users_from_response(:post, '/1.1/users/report_spam.json', args)
      end
    end
  end
end