lib/twitter/rest/direct_messages.rb
# Sends a new direct message to the specified user from the authenticating user
#
# @see https://dev.twitter.com/rest/reference/post/direct_messages/new
# @rate_limited No
# @authentication Requires user context
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @return [Twitter::DirectMessage] The sent message.
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param text [String] The text of your direct message, up to 10,000 characters.
# @param options [Hash] A customizable set of options.
Sends a new direct message to the specified user from the authenticating user
Sends a new direct message to the specified user from the authenticating user
def create_direct_message(user, text, options = {})
        options = options.dup
        merge_user!(options, user)
        options[:text] = text
        perform_post_with_object('/1.1/direct_messages/new.json', options, Twitter::DirectMessage)
      end
def create_direct_message ( user , text , options = { } ) options = options . dup merge_user! ( options , user ) options [ :text ] = text perform_post_with_object ( '/1.1/direct_messages/new.json' , options , Twitter :: DirectMessage ) end
Sends a new direct message to the specified user from the authenticating user
Sends a new direct message to the specified user from the authenticating user
The sent message.
The sent message .
Twitter::DirectMessage
[Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
[ Twitter :: Error :: Unauthorized ] Error raised when supplied user credentials are not valid .
user
A Twitter user ID, screen name, URI, or object.
A Twitter user ID screen name URI or object .
text
The text of your direct message, up to 10,000 characters.
The text of your direct message up to 10 000 characters .
options
A customizable set of options.
A customizable set of options .
see
None
rate_limited
None
authentication
Requires user context
Requires user context