twitter-status-bot/.gems/doc/twitter-5.11.0/rdoc/Twitter/REST/Tweets.html

1209 lines
62 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<title>Module: Twitter::REST::Tweets</title>
<link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
<script src="../../js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
</head>
<body id="top" class="module">
<div id="metadata">
<div id="home-metadata">
<div id="home-section" class="section">
<h3 class="section-header">
<a href="../../index.html">Home</a>
<a href="../../index.html#classes">Classes</a>
<a href="../../index.html#methods">Methods</a>
</h3>
</div>
</div>
<div id="file-metadata">
<div id="file-list-section" class="section">
<h3 class="section-header">In Files</h3>
<div class="section-body">
<ul>
<li><a href="../../lib/twitter/rest/tweets_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/twitter/rest/tweets.rb">lib/twitter/rest/tweets.rb</a></li>
</ul>
</div>
</div>
</div>
<div id="class-metadata">
<!-- Method Quickref -->
<div id="method-list-section" class="section">
<h3 class="section-header">Methods</h3>
<ul class="link-list">
<li><a href="#method-i-destroy_status">#destroy_status</a></li>
<li><a href="#method-i-destroy_tweet">#destroy_tweet</a></li>
<li><a href="#method-i-oembed">#oembed</a></li>
<li><a href="#method-i-oembeds">#oembeds</a></li>
<li><a href="#method-i-retweet">#retweet</a></li>
<li><a href="#method-i-retweet-21">#retweet!</a></li>
<li><a href="#method-i-retweeters_ids">#retweeters_ids</a></li>
<li><a href="#method-i-retweeters_of">#retweeters_of</a></li>
<li><a href="#method-i-retweets">#retweets</a></li>
<li><a href="#method-i-status">#status</a></li>
<li><a href="#method-i-statuses">#statuses</a></li>
<li><a href="#method-i-update">#update</a></li>
<li><a href="#method-i-update-21">#update!</a></li>
<li><a href="#method-i-update_with_media">#update_with_media</a></li>
</ul>
</div>
<!-- Included Modules -->
<div id="includes-section" class="section">
<h3 class="section-header">Included Modules</h3>
<ul class="link-list">
<li><a class="include" href="Utils.html">Twitter::REST::Utils</a></li>
<li><a class="include" href="../Utils.html">Twitter::Utils</a></li>
</ul>
</div>
</div>
<div id="project-metadata">
<div id="classindex-section" class="section project-section">
<h3 class="section-header">Class/Module Index
<span class="search-toggle"><img src="../../images/find.png"
height="16" width="16" alt="[+]"
title="show/hide quicksearch" /></span></h3>
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
<fieldset>
<legend>Quicksearch</legend>
<input type="text" name="quicksearch" value=""
class="quicksearch-field" />
</fieldset>
</form>
<ul class="link-list">
<li><a href="../../Twitter.html">Twitter</a></li>
<li><a href="../../Twitter/Arguments.html">Twitter::Arguments</a></li>
<li><a href="../../Twitter/Base.html">Twitter::Base</a></li>
<li><a href="../../Twitter/BasicUser.html">Twitter::BasicUser</a></li>
<li><a href="../../Twitter/Client.html">Twitter::Client</a></li>
<li><a href="../../Twitter/Configuration.html">Twitter::Configuration</a></li>
<li><a href="../../Twitter/Creatable.html">Twitter::Creatable</a></li>
<li><a href="../../Twitter/Cursor.html">Twitter::Cursor</a></li>
<li><a href="../../Twitter/DirectMessage.html">Twitter::DirectMessage</a></li>
<li><a href="../../Twitter/Entities.html">Twitter::Entities</a></li>
<li><a href="../../Twitter/Entity.html">Twitter::Entity</a></li>
<li><a href="../../Twitter/Entity/Hashtag.html">Twitter::Entity::Hashtag</a></li>
<li><a href="../../Twitter/Entity/Symbol.html">Twitter::Entity::Symbol</a></li>
<li><a href="../../Twitter/Entity/URI.html">Twitter::Entity::URI</a></li>
<li><a href="../../Twitter/Entity/URI.html">Twitter::Entity::URL</a></li>
<li><a href="../../Twitter/Entity/UserMention.html">Twitter::Entity::UserMention</a></li>
<li><a href="../../Twitter/Enumerable.html">Twitter::Enumerable</a></li>
<li><a href="../../Twitter/Error.html">Twitter::Error</a></li>
<li><a href="../../Twitter/Error/AlreadyFavorited.html">Twitter::Error::AlreadyFavorited</a></li>
<li><a href="../../Twitter/Error/AlreadyRetweeted.html">Twitter::Error::AlreadyRetweeted</a></li>
<li><a href="../../Twitter/Error/BadGateway.html">Twitter::Error::BadGateway</a></li>
<li><a href="../../Twitter/Error/BadRequest.html">Twitter::Error::BadRequest</a></li>
<li><a href="../../Twitter/Error/ClientError.html">Twitter::Error::ClientError</a></li>
<li><a href="../../Twitter/Error/Code.html">Twitter::Error::Code</a></li>
<li><a href="../../Twitter/Error/ConfigurationError.html">Twitter::Error::ConfigurationError</a></li>
<li><a href="../../Twitter/Error/DuplicateStatus.html">Twitter::Error::DuplicateStatus</a></li>
<li><a href="../../Twitter/Error/Forbidden.html">Twitter::Error::Forbidden</a></li>
<li><a href="../../Twitter/Error/GatewayTimeout.html">Twitter::Error::GatewayTimeout</a></li>
<li><a href="../../Twitter/Error/InternalServerError.html">Twitter::Error::InternalServerError</a></li>
<li><a href="../../Twitter/Error/NotAcceptable.html">Twitter::Error::NotAcceptable</a></li>
<li><a href="../../Twitter/Error/NotFound.html">Twitter::Error::NotFound</a></li>
<li><a href="../../Twitter/Error/RequestTimeout.html">Twitter::Error::RequestTimeout</a></li>
<li><a href="../../Twitter/Error/ServerError.html">Twitter::Error::ServerError</a></li>
<li><a href="../../Twitter/Error/ServiceUnavailable.html">Twitter::Error::ServiceUnavailable</a></li>
<li><a href="../../Twitter/Error/TooManyRequests.html">Twitter::Error::TooManyRequests</a></li>
<li><a href="../../Twitter/Error/UnacceptableIO.html">Twitter::Error::UnacceptableIO</a></li>
<li><a href="../../Twitter/Error/Unauthorized.html">Twitter::Error::Unauthorized</a></li>
<li><a href="../../Twitter/Error/UnprocessableEntity.html">Twitter::Error::UnprocessableEntity</a></li>
<li><a href="../../Twitter/Factory.html">Twitter::Factory</a></li>
<li><a href="../../Twitter/Geo.html">Twitter::Geo</a></li>
<li><a href="../../Twitter/Geo/Point.html">Twitter::Geo::Point</a></li>
<li><a href="../../Twitter/Geo/Polygon.html">Twitter::Geo::Polygon</a></li>
<li><a href="../../Twitter/GeoFactory.html">Twitter::GeoFactory</a></li>
<li><a href="../../Twitter/GeoResults.html">Twitter::GeoResults</a></li>
<li><a href="../../Twitter/Identity.html">Twitter::Identity</a></li>
<li><a href="../../Twitter/Language.html">Twitter::Language</a></li>
<li><a href="../../Twitter/List.html">Twitter::List</a></li>
<li><a href="../../Twitter/Media.html">Twitter::Media</a></li>
<li><a href="../../Twitter/Media/Photo.html">Twitter::Media::Photo</a></li>
<li><a href="../../Twitter/MediaFactory.html">Twitter::MediaFactory</a></li>
<li><a href="../../Twitter/Metadata.html">Twitter::Metadata</a></li>
<li><a href="../../Twitter/OEmbed.html">Twitter::OEmbed</a></li>
<li><a href="../../Twitter/Place.html">Twitter::Place</a></li>
<li><a href="../../Twitter/Profile.html">Twitter::Profile</a></li>
<li><a href="../../Twitter/ProfileBanner.html">Twitter::ProfileBanner</a></li>
<li><a href="../../Twitter/REST.html">Twitter::REST</a></li>
<li><a href="../../Twitter/REST/API.html">Twitter::REST::API</a></li>
<li><a href="../../Twitter/REST/Client.html">Twitter::REST::Client</a></li>
<li><a href="../../Twitter/REST/DirectMessages.html">Twitter::REST::DirectMessages</a></li>
<li><a href="../../Twitter/REST/Favorites.html">Twitter::REST::Favorites</a></li>
<li><a href="../../Twitter/REST/FriendsAndFollowers.html">Twitter::REST::FriendsAndFollowers</a></li>
<li><a href="../../Twitter/REST/Help.html">Twitter::REST::Help</a></li>
<li><a href="../../Twitter/REST/Lists.html">Twitter::REST::Lists</a></li>
<li><a href="../../Twitter/REST/Media.html">Twitter::REST::Media</a></li>
<li><a href="../../Twitter/REST/OAuth.html">Twitter::REST::OAuth</a></li>
<li><a href="../../Twitter/REST/PlacesAndGeo.html">Twitter::REST::PlacesAndGeo</a></li>
<li><a href="../../Twitter/REST/Request.html">Twitter::REST::Request</a></li>
<li><a href="../../Twitter/REST/Request/MultipartWithFile.html">Twitter::REST::Request::MultipartWithFile</a></li>
<li><a href="../../Twitter/REST/Response.html">Twitter::REST::Response</a></li>
<li><a href="../../Twitter/REST/Response/ParseErrorJson.html">Twitter::REST::Response::ParseErrorJson</a></li>
<li><a href="../../Twitter/REST/Response/ParseJson.html">Twitter::REST::Response::ParseJson</a></li>
<li><a href="../../Twitter/REST/Response/RaiseError.html">Twitter::REST::Response::RaiseError</a></li>
<li><a href="../../Twitter/REST/SavedSearches.html">Twitter::REST::SavedSearches</a></li>
<li><a href="../../Twitter/REST/Search.html">Twitter::REST::Search</a></li>
<li><a href="../../Twitter/REST/SpamReporting.html">Twitter::REST::SpamReporting</a></li>
<li><a href="../../Twitter/REST/SuggestedUsers.html">Twitter::REST::SuggestedUsers</a></li>
<li><a href="../../Twitter/REST/Timelines.html">Twitter::REST::Timelines</a></li>
<li><a href="../../Twitter/REST/Trends.html">Twitter::REST::Trends</a></li>
<li><a href="../../Twitter/REST/Tweets.html">Twitter::REST::Tweets</a></li>
<li><a href="../../Twitter/REST/Undocumented.html">Twitter::REST::Undocumented</a></li>
<li><a href="../../Twitter/REST/Users.html">Twitter::REST::Users</a></li>
<li><a href="../../Twitter/REST/Utils.html">Twitter::REST::Utils</a></li>
<li><a href="../../Twitter/RateLimit.html">Twitter::RateLimit</a></li>
<li><a href="../../Twitter/Relationship.html">Twitter::Relationship</a></li>
<li><a href="../../Twitter/Request.html">Twitter::Request</a></li>
<li><a href="../../Twitter/SavedSearch.html">Twitter::SavedSearch</a></li>
<li><a href="../../Twitter/SearchResults.html">Twitter::SearchResults</a></li>
<li><a href="../../Twitter/Settings.html">Twitter::Settings</a></li>
<li><a href="../../Twitter/Size.html">Twitter::Size</a></li>
<li><a href="../../Twitter/SourceUser.html">Twitter::SourceUser</a></li>
<li><a href="../../Twitter/Streaming.html">Twitter::Streaming</a></li>
<li><a href="../../Twitter/Streaming/Client.html">Twitter::Streaming::Client</a></li>
<li><a href="../../Twitter/Streaming/Connection.html">Twitter::Streaming::Connection</a></li>
<li><a href="../../Twitter/Streaming/DeletedTweet.html">Twitter::Streaming::DeletedTweet</a></li>
<li><a href="../../Twitter/Streaming/Event.html">Twitter::Streaming::Event</a></li>
<li><a href="../../Twitter/Streaming/FriendList.html">Twitter::Streaming::FriendList</a></li>
<li><a href="../../Twitter/Streaming/MessageParser.html">Twitter::Streaming::MessageParser</a></li>
<li><a href="../../Twitter/Streaming/Response.html">Twitter::Streaming::Response</a></li>
<li><a href="../../Twitter/Streaming/StallWarning.html">Twitter::Streaming::StallWarning</a></li>
<li><a href="../../Twitter/Suggestion.html">Twitter::Suggestion</a></li>
<li><a href="../../Twitter/TargetUser.html">Twitter::TargetUser</a></li>
<li><a href="../../Twitter/Token.html">Twitter::Token</a></li>
<li><a href="../../Twitter/Trend.html">Twitter::Trend</a></li>
<li><a href="../../Twitter/TrendResults.html">Twitter::TrendResults</a></li>
<li><a href="../../Twitter/Tweet.html">Twitter::Tweet</a></li>
<li><a href="../../Twitter/User.html">Twitter::User</a></li>
<li><a href="../../Twitter/Utils.html">Twitter::Utils</a></li>
<li><a href="../../Twitter/Utils/ClassMethods.html">Twitter::Utils::ClassMethods</a></li>
<li><a href="../../Twitter/Version.html">Twitter::Version</a></li>
</ul>
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
</div>
</div>
</div>
<div id="documentation">
<h1 class="module">Twitter::REST::Tweets</h1>
<div id="description" class="description">
</div><!-- description -->
<div id="5Buntitled-5D" class="documentation-section">
<!-- Constants -->
<div id="constants-list" class="section">
<h3 class="section-header">Constants</h3>
<dl>
<dt><a name="MAX_TWEETS_PER_REQUEST">MAX_TWEETS_PER_REQUEST</a></dt>
<dd class="description"></dd>
</dl>
</div>
<!-- Methods -->
<div id="public-instance-method-details" class="method-section section">
<h3 class="section-header">Public Instance Methods</h3>
<div id="destroy_status-method" class="method-detail ">
<a name="method-i-destroy_status"></a>
<div class="method-heading">
<span class="method-name">destroy_status</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Destroys the specified <a href="Tweets.html">Tweets</a></p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/destroy/:id">dev.twitter.com/docs/api/1.1/post/statuses/destroy/:id</a>
@note The authenticating user must be the author of the specified <a
href="Tweets.html">Tweets</a>. @rate_limited No @authentication Requires
user context @raise [Twitter::Error::Unauthorized] <a
href="../Error.html">Error</a> raised when supplied user credentials are
not valid. @return [Array&lt;Twitter::Tweet&gt;] The deleted <a
href="Tweets.html">Tweets</a>. @overload <a
href="Tweets.html#method-i-destroy_status">destroy_status</a>(*tweets)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.</pre>
<p>@overload <a
href="Tweets.html#method-i-destroy_status">destroy_status</a>(*tweets,
options)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.</pre>
<div class="method-source-code" id="destroy_status-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 99</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy_status</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span> = <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Arguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">pmap</span>(<span class="ruby-identifier">arguments</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tweet</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-node">&quot;/1.1/statuses/destroy/#{extract_id(tweet)}.json&quot;</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Tweet</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- destroy_status-source -->
</div>
<div class="aliases">
Also aliased as: <a href="Tweets.html#method-i-destroy_tweet">destroy_tweet</a>
</div>
</div><!-- destroy_status-method -->
<div id="destroy_tweet-method" class="method-detail method-alias">
<a name="method-i-destroy_tweet"></a>
<div class="method-heading">
<span class="method-name">destroy_tweet</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
</div>
<div class="aliases">
Alias for: <a href="Tweets.html#method-i-destroy_status">destroy_status</a>
</div>
</div><!-- destroy_tweet-method -->
<div id="oembed-method" class="method-detail ">
<a name="method-i-oembed"></a>
<div class="method-heading">
<span class="method-name">oembed</span><span
class="method-args">(tweet, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns oEmbed for a <a href="../Tweet.html">Tweet</a></p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/oembed">dev.twitter.com/docs/api/1.1/get/statuses/oembed</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return [Twitter::OEmbed] <a
href="../OEmbed.html">OEmbed</a> for the requested <a
href="../Tweet.html">Tweet</a>. @param tweet [Integer, String, URI,
Twitter::Tweet] A <a href="../Tweet.html">Tweet</a> ID, URI, or object.
@param options [Hash] A customizable set of options. @option options
[Integer] :maxwidth The maximum width in pixels that the embed should be
rendered at. This value is constrained to be between 250 and 550 pixels.
@option options [Boolean, String, Integer] :hide_media Specifies whether
the embedded <a href="../Tweet.html">Tweet</a> should automatically expand
images which were uploaded via {<a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media">dev.twitter.com/docs/api/1.1/post/statuses/update_with_media</a>
POST statuses/update_with_media}. When set to either true, t or 1 images
will not be expanded. Defaults to false. @option options [Boolean, String,
Integer] :hide_thread Specifies whether the embedded <a
href="../Tweet.html">Tweet</a> should automatically show the original
message in the case that the embedded <a href="../Tweet.html">Tweet</a> is
a reply. When set to either true, t or 1 the original <a
href="../Tweet.html">Tweet</a> will not be shown. Defaults to false.
@option options [Boolean, String, Integer] :omit_script Specifies whether
the embedded <a href="../Tweet.html">Tweet</a> HTML should include a
`&lt;script&gt;` element pointing to widgets.js. In cases where a page
already includes widgets.js, setting this value to true will prevent a
redundant script element from being included. When set to either true, t or
1 the `&lt;script&gt;` element will not be included in the embed HTML,
meaning that pages must include a reference to widgets.js manually.
Defaults to false. @option options [String] :align Specifies whether the
embedded <a href="../Tweet.html">Tweet</a> should be left aligned, right
aligned, or centered in the page. Valid values are left, right, center, and
none. Defaults to none, meaning no alignment styles are specified for the
<a href="../Tweet.html">Tweet</a>. @option options [String] :related A
value for the TWT related parameter, as described in {<a
href="https://dev.twitter.com/docs/intents">dev.twitter.com/docs/intents</a>
Web Intents}. This value will be forwarded to all Web Intents calls.
@option options [String] :lang <a href="../Language.html">Language</a> code
for the rendered embed. This will affect the text and localization of the
rendered HTML.</p>
<div class="method-source-code" id="oembed-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 253</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">oembed</span>(<span class="ruby-identifier">tweet</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">options</span>[<span class="ruby-value">:id</span>] = <span class="ruby-identifier">extract_id</span>(<span class="ruby-identifier">tweet</span>)
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/statuses/oembed.json'</span>, <span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">OEmbed</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- oembed-source -->
</div>
</div><!-- oembed-method -->
<div id="oembeds-method" class="method-detail ">
<a name="method-i-oembeds"></a>
<div class="method-heading">
<span class="method-name">oembeds</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns oEmbeds for <a href="Tweets.html">Tweets</a></p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/oembed">dev.twitter.com/docs/api/1.1/get/statuses/oembed</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return
[Array&lt;Twitter::OEmbed&gt;] OEmbeds for the requested <a
href="Tweets.html">Tweets</a>. @overload oembed(*tweets)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.</pre>
<p>@overload oembed(*tweets, options)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.
@param options [Hash] A customizable set of options.
@option options [Integer] :maxwidth The maximum width in pixels that the embed should be rendered at. This value is constrained to be between 250 and 550 pixels.
@option options [Boolean, String, Integer] :hide_media Specifies whether the embedded Tweet should automatically expand images which were uploaded via {https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media POST statuses/update_with_media}. When set to either true, t or 1 images will not be expanded. Defaults to false.
@option options [Boolean, String, Integer] :hide_thread Specifies whether the embedded Tweet should automatically show the original message in the case that the embedded Tweet is a reply. When set to either true, t or 1 the original Tweet will not be shown. Defaults to false.
@option options [Boolean, String, Integer] :omit_script Specifies whether the embedded Tweet HTML should include a `&lt;script&gt;` element pointing to widgets.js. In cases where a page already includes widgets.js, setting this value to true will prevent a redundant script element from being included. When set to either true, t or 1 the `&lt;script&gt;` element will not be included in the embed HTML, meaning that pages must include a reference to widgets.js manually. Defaults to false.
@option options [String] :align Specifies whether the embedded Tweet should be left aligned, right aligned, or centered in the page. Valid values are left, right, center, and none. Defaults to none, meaning no alignment styles are specified for the Tweet.
@option options [String] :related A value for the TWT related parameter, as described in {https://dev.twitter.com/docs/intents Web Intents}. This value will be forwarded to all Web Intents calls.
@option options [String] :lang Language code for the rendered embed. This will affect the text and localization of the rendered HTML.</pre>
<div class="method-source-code" id="oembeds-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 277</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">oembeds</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span> = <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Arguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">pmap</span>(<span class="ruby-identifier">arguments</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tweet</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">oembed</span>(<span class="ruby-identifier">extract_id</span>(<span class="ruby-identifier">tweet</span>), <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- oembeds-source -->
</div>
</div><!-- oembeds-method -->
<div id="retweet-method" class="method-detail ">
<a name="method-i-retweet"></a>
<div class="method-heading">
<span class="method-name">retweet</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Retweets the specified <a href="Tweets.html">Tweets</a> as the
authenticating user</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/retweet/:id">dev.twitter.com/docs/api/1.1/post/statuses/retweet/:id</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return
[Array&lt;Twitter::Tweet&gt;] The original tweets with retweet details
embedded. @overload retweet(*tweets)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.</pre>
<p>@overload retweet(*tweets, options)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.</pre>
<div class="method-source-code" id="retweet-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 176</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">retweet</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span> = <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Arguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">pmap</span>(<span class="ruby-identifier">arguments</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tweet</span><span class="ruby-operator">|</span>
<span class="ruby-keyword">begin</span>
<span class="ruby-identifier">post_retweet</span>(<span class="ruby-identifier">extract_id</span>(<span class="ruby-identifier">tweet</span>), <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>)
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span><span class="ruby-operator">::</span><span class="ruby-constant">AlreadyRetweeted</span>
<span class="ruby-keyword">next</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>.<span class="ruby-identifier">compact</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- retweet-source -->
</div>
</div><!-- retweet-method -->
<div id="retweet-21-method" class="method-detail ">
<a name="method-i-retweet-21"></a>
<div class="method-heading">
<span class="method-name">retweet!</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Retweets the specified <a href="Tweets.html">Tweets</a> as the
authenticating user and raises an error if one has already been retweeted</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/retweet/:id">dev.twitter.com/docs/api/1.1/post/statuses/retweet/:id</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::AlreadyRetweeted] <a href="../Error.html">Error</a> raised
when tweet has already been retweeted. @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return
[Array&lt;Twitter::Tweet&gt;] The original tweets with retweet details
embedded. @overload retweet!(*tweets)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.</pre>
<p>@overload retweet!(*tweets, options)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.</pre>
<div class="method-source-code" id="retweet-21-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 201</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">retweet!</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span> = <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Arguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">pmap</span>(<span class="ruby-identifier">arguments</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tweet</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">post_retweet</span>(<span class="ruby-identifier">extract_id</span>(<span class="ruby-identifier">tweet</span>), <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>)
<span class="ruby-keyword">end</span>.<span class="ruby-identifier">compact</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- retweet-21-source -->
</div>
</div><!-- retweet-21-method -->
<div id="retweeters_ids-method" class="method-detail ">
<a name="method-i-retweeters_ids"></a>
<div class="method-heading">
<span class="method-name">retweeters_ids</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns a collection of up to 100 user IDs belonging to users who have
retweeted the tweet specified by the id parameter.</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/retweeters/ids">dev.twitter.com/docs/api/1.1/get/statuses/retweeters/ids</a>
@rate_limited Yes @authentication Required @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return [Twitter::Cursor]
@overload <a
href="Tweets.html#method-i-retweeters_ids">retweeters_ids</a>(options)</p>
<pre>@param options [Hash] A customizable set of options.</pre>
<p>@overload <a
href="Tweets.html#method-i-retweeters_ids">retweeters_ids</a>(id, options =
{})</p>
<pre>@param tweet [Integer, String, URI, Twitter::Tweet] A Tweet ID, URI, or object.
@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="retweeters_ids-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 296</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">retweeters_ids</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span> = <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Arguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>[<span class="ruby-value">:id</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">extract_id</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">first</span>)
<span class="ruby-identifier">perform_with_cursor</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/statuses/retweeters/ids.json'</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-value">:ids</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- retweeters_ids-source -->
</div>
</div><!-- retweeters_ids-method -->
<div id="retweeters_of-method" class="method-detail ">
<a name="method-i-retweeters_of"></a>
<div class="method-heading">
<span class="method-name">retweeters_of</span><span
class="method-args">(tweet, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Show up to 100 users who retweeted the <a href="../Tweet.html">Tweet</a></p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/retweets/:id">dev.twitter.com/docs/api/1.1/get/statuses/retweets/:id</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return [Array] @param tweet
[Integer, String, URI, Twitter::Tweet] A <a href="../Tweet.html">Tweet</a>
ID, URI, or object. @param options [Hash] A customizable set of options.
@option options [Integer] :count Specifies the number of records to
retrieve. Must be less than or equal to 100. @option options [Boolean,
String, Integer] :trim_user Each tweet returned in a timeline will include
a user object with only the authors numerical ID when set to true, t or
1. @option options [Boolean] :ids_only (false) Only return user IDs
instead of full user objects.</p>
<div class="method-source-code" id="retweeters_of-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 43</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">retweeters_of</span>(<span class="ruby-identifier">tweet</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">ids_only</span> = <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:ids_only</span>)
<span class="ruby-identifier">retweeters</span> = <span class="ruby-identifier">retweets</span>(<span class="ruby-identifier">tweet</span>, <span class="ruby-identifier">options</span>).<span class="ruby-identifier">collect</span>(&amp;<span class="ruby-value">:user</span>)
<span class="ruby-identifier">ids_only</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">retweeters</span>.<span class="ruby-identifier">collect</span>(&amp;<span class="ruby-value">:id</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">retweeters</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- retweeters_of-source -->
</div>
</div><!-- retweeters_of-method -->
<div id="retweets-method" class="method-detail ">
<a name="method-i-retweets"></a>
<div class="method-heading">
<span class="method-name">retweets</span><span
class="method-args">(tweet, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns up to 100 of the first retweets of a given tweet</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/retweets/:id">dev.twitter.com/docs/api/1.1/get/statuses/retweets/:id</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @return
[Array&lt;Twitter::Tweet&gt;] @param tweet [Integer, String, URI,
Twitter::Tweet] A <a href="../Tweet.html">Tweet</a> ID, URI, or object.
@param options [Hash] A customizable set of options. @option options
[Integer] :count Specifies the number of records to retrieve. Must be less
than or equal to 100. @option options [Boolean, String, Integer] :trim_user
Each tweet returned in a timeline will include a user object with only the
authors numerical ID when set to true, t or 1.</p>
<div class="method-source-code" id="retweets-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 27</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">retweets</span>(<span class="ruby-identifier">tweet</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_objects</span>(<span class="ruby-value">:get</span>, <span class="ruby-node">&quot;/1.1/statuses/retweets/#{extract_id(tweet)}.json&quot;</span>, <span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Tweet</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- retweets-source -->
</div>
</div><!-- retweets-method -->
<div id="status-method" class="method-detail ">
<a name="method-i-status"></a>
<div class="method-heading">
<span class="method-name">status</span><span
class="method-args">(tweet, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns a <a href="../Tweet.html">Tweet</a></p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/show/:id">dev.twitter.com/docs/api/1.1/get/statuses/show/:id</a>
@rate_limited Yes @authentication Requires user context @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @raise
[Twitter::Error::Forbidden] <a href="../Error.html">Error</a> raised when
supplied status is over 140 characters. @return [Twitter::Tweet] The
requested <a href="../Tweet.html">Tweet</a>. @param tweet [Integer, String,
URI, Twitter::Tweet] A <a href="../Tweet.html">Tweet</a> ID, URI, or
object. @param options [Hash] A customizable set of options. @option
options [Boolean, String, Integer] :trim_user Each tweet returned in a
timeline will include a user object with only the authors numerical ID
when set to true, t or 1.</p>
<div class="method-source-code" id="status-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 60</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">status</span>(<span class="ruby-identifier">tweet</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:get</span>, <span class="ruby-node">&quot;/1.1/statuses/show/#{extract_id(tweet)}.json&quot;</span>, <span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Tweet</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- status-source -->
</div>
</div><!-- status-method -->
<div id="statuses-method" class="method-detail ">
<a name="method-i-statuses"></a>
<div class="method-heading">
<span class="method-name">statuses</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns <a href="Tweets.html">Tweets</a></p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/statuses/lookup">dev.twitter.com/docs/api/1.1/get/statuses/lookup</a>
@rate_limited Yes @authentication Required @return
[Array&lt;Twitter::Tweet&gt;] The requested <a
href="Tweets.html">Tweets</a>. @overload statuses(*tweets)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.</pre>
<p>@overload statuses(*tweets, options)</p>
<pre>@param tweets [Enumerable&lt;Integer, String, URI, Twitter::Tweet&gt;] A collection of Tweet IDs, URIs, or objects.
@param options [Hash] A customizable set of options.
@option options [Symbol, String] :method Requests users via a GET request instead of the standard POST request if set to ':get'.
@option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.</pre>
<div class="method-source-code" id="statuses-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">statuses</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">arguments</span> = <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Arguments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">request_method</span> = <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:method</span>) <span class="ruby-operator">||</span> <span class="ruby-value">:post</span>
<span class="ruby-identifier">flat_pmap</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">each_slice</span>(<span class="ruby-constant">MAX_TWEETS_PER_REQUEST</span>)) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tweets</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">perform_with_objects</span>(<span class="ruby-identifier">request_method</span>, <span class="ruby-string">'/1.1/statuses/lookup.json'</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tweets</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">u</span><span class="ruby-operator">|</span> <span class="ruby-identifier">extract_id</span>(<span class="ruby-identifier">u</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">','</span>)), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Tweet</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- statuses-source -->
</div>
</div><!-- statuses-method -->
<div id="update-method" class="method-detail ">
<a name="method-i-update"></a>
<div class="method-heading">
<span class="method-name">update</span><span
class="method-args">(status, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users status</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/update">dev.twitter.com/docs/api/1.1/post/statuses/update</a>
@note A status update with text identical to the authenticating users
current status will be ignored to prevent duplicates. @rate_limited No
@authentication Requires user context @raise [Twitter::Error::Unauthorized]
<a href="../Error.html">Error</a> raised when supplied user credentials are
not valid. @return [Twitter::Tweet] The created <a
href="../Tweet.html">Tweet</a>. @param status [String] The text of your
status update, up to 140 characters. @param options [Hash] A customizable
set of options. @option options [Boolean, String, Integer]
:possibly_sensitive Set to true for content which may not be suitable for
every audience. @option options [Twitter::Tweet] :in_reply_to_status An
existing status that the update is in reply to. @option options [Integer]
:in_reply_to_status_id The ID of an existing status that the update is in
reply to. @option options [Float] :lat The latitude of the location this
tweet refers to. This option will be ignored unless it is inside the range
-90.0 to +90.0 (North is positive) inclusive. It will also be ignored if
there isnt a corresponding :long option. @option options [Float] :long The
longitude of the location this tweet refers to. The valid ranges for
longitude is -180.0 to +180.0 (East is positive) inclusive. This option
will be ignored if outside that range, if it is not a number, if
geo_enabled is disabled, or if there not a corresponding :lat option.
@option options [Twitter::Place] :place A place in the world. These can be
retrieved from {<a
href="PlacesAndGeo.html#method-i-reverse_geocode">Twitter::REST::PlacesAndGeo#reverse_geocode</a>}.
@option options [String] :place_id A place in the world. These IDs can be
retrieved from {<a
href="PlacesAndGeo.html#method-i-reverse_geocode">Twitter::REST::PlacesAndGeo#reverse_geocode</a>}.
@option options [String] :media_ids A comma separated list of uploaded
media IDs to attach to the <a href="../Tweet.html">Tweet</a>. @option
options [String] :display_coordinates Whether or not to put a pin on the
exact coordinates a tweet has been sent from. @option options [Boolean,
String, Integer] :trim_user Each tweet returned in a timeline will include
a user object with only the authors numerical ID when set to true, t or
1.</p>
<div class="method-source-code" id="update-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 129</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">update!</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span><span class="ruby-operator">::</span><span class="ruby-constant">DuplicateStatus</span>
<span class="ruby-identifier">user_timeline</span>(<span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">first</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- update-source -->
</div>
</div><!-- update-method -->
<div id="update-21-method" class="method-detail ">
<a name="method-i-update-21"></a>
<div class="method-heading">
<span class="method-name">update!</span><span
class="method-args">(status, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users status</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/update">dev.twitter.com/docs/api/1.1/post/statuses/update</a>
@note A status update with text identical to the authenticating users
current status will be ignored to prevent duplicates. @rate_limited No
@authentication Requires user context @raise [Twitter::Error::Unauthorized]
<a href="../Error.html">Error</a> raised when supplied user credentials are
not valid. @raise [Twitter::Error::DuplicateStatus] <a
href="../Error.html">Error</a> raised when a duplicate status is posted.
@return [Twitter::Tweet] The created <a href="../Tweet.html">Tweet</a>.
@param status [String] The text of your status update, up to 140
characters. @param options [Hash] A customizable set of options. @option
options [Boolean, String, Integer] :possibly_sensitive Set to true for
content which may not be suitable for every audience. @option options
[Twitter::Tweet] :in_reply_to_status An existing status that the update is
in reply to. @option options [Integer] :in_reply_to_status_id The ID of an
existing status that the update is in reply to. @option options [Float]
:lat The latitude of the location this tweet refers to. This option will be
ignored unless it is inside the range -90.0 to +90.0 (North is positive)
inclusive. It will also be ignored if there isnt a corresponding :long
option. @option options [Float] :long The longitude of the location this
tweet refers to. The valid ranges for longitude is -180.0 to +180.0 (East
is positive) inclusive. This option will be ignored if outside that range,
if it is not a number, if geo_enabled is disabled, or if there not a
corresponding :lat option. @option options [Twitter::Place] :place A place
in the world. These can be retrieved from {<a
href="PlacesAndGeo.html#method-i-reverse_geocode">Twitter::REST::PlacesAndGeo#reverse_geocode</a>}.
@option options [String] :place_id A place in the world. These IDs can be
retrieved from {<a
href="PlacesAndGeo.html#method-i-reverse_geocode">Twitter::REST::PlacesAndGeo#reverse_geocode</a>}.
@option options [String] :media_ids A comma separated list of uploaded
media IDs to attach to the <a href="../Tweet.html">Tweet</a>. @option
options [String] :display_coordinates Whether or not to put a pin on the
exact coordinates a tweet has been sent from. @option options [Boolean,
String, Integer] :trim_user Each tweet returned in a timeline will include
a user object with only the authors numerical ID when set to true, t or
1.</p>
<div class="method-source-code" id="update-21-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 156</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update!</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">hash</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">hash</span>[<span class="ruby-value">:in_reply_to_status_id</span>] = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:in_reply_to_status</span>).<span class="ruby-identifier">id</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value">:in_reply_to_status</span>].<span class="ruby-identifier">nil?</span>
<span class="ruby-identifier">hash</span>[<span class="ruby-value">:place_id</span>] = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:place</span>).<span class="ruby-identifier">woeid</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value">:place</span>].<span class="ruby-identifier">nil?</span>
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/statuses/update.json'</span>, <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">status</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Tweet</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update-21-source -->
</div>
</div><!-- update-21-method -->
<div id="update_with_media-method" class="method-detail ">
<a name="method-i-update_with_media"></a>
<div class="method-heading">
<span class="method-name">update_with_media</span><span
class="method-args">(status, media, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users status with media</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media">dev.twitter.com/docs/api/1.1/post/statuses/update_with_media</a>
@note A status update with text/media identical to the authenticating
users current status will NOT be ignored @rate_limited No @authentication
Requires user context @raise [Twitter::Error::Unauthorized] <a
href="../Error.html">Error</a> raised when supplied user credentials are
not valid. @raise [Twitter::Error::UnacceptableIO] <a
href="../Error.html">Error</a> when the IO object for the media argument
does not have a to_io method. @return [Twitter::Tweet] The created <a
href="../Tweet.html">Tweet</a>. @param status [String] The text of your
status update, up to 140 characters. @param media [File, Hash] A File
object with your picture (PNG, JPEG or GIF) @param options [Hash] A
customizable set of options. @option options [Boolean, String, Integer]
:possibly_sensitive Set to true for content which may not be suitable for
every audience. @option options [Twitter::Tweet] :in_reply_to_status An
existing status that the update is in reply to. @option options [Integer]
:in_reply_to_status_id The ID of an existing <a
href="../Tweet.html">Tweet</a> that the update is in reply to. @option
options [Float] :lat The latitude of the location this tweet refers to.
This option will be ignored unless it is inside the range -90.0 to +90.0
(North is positive) inclusive. It will also be ignored if there isnt a
corresponding :long option. @option options [Float] :long The longitude of
the location this tweet refers to. The valid ranges for longitude is -180.0
to +180.0 (East is positive) inclusive. This option will be ignored if
outside that range, if it is not a number, if geo_enabled is disabled, or
if there not a corresponding :lat option. @option options [Twitter::Place]
:place A place in the world. These can be retrieved from {<a
href="PlacesAndGeo.html#method-i-reverse_geocode">Twitter::REST::PlacesAndGeo#reverse_geocode</a>}.
@option options [String] :place_id A place in the world. These IDs can be
retrieved from {<a
href="PlacesAndGeo.html#method-i-reverse_geocode">Twitter::REST::PlacesAndGeo#reverse_geocode</a>}.
@option options [String] :display_coordinates Whether or not to put a pin
on the exact coordinates a tweet has been sent from. @option options
[Boolean, String, Integer] :trim_user Each tweet returned in a timeline
will include a user object with only the authors numerical ID when set to
true, t or 1.</p>
<div class="method-source-code" id="update_with_media-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/tweets.rb, line 229</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_with_media</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">media</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">fail</span>(<span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span><span class="ruby-operator">::</span><span class="ruby-constant">UnacceptableIO</span>.<span class="ruby-identifier">new</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">media</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:to_io</span>)
<span class="ruby-identifier">hash</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">hash</span>[<span class="ruby-value">:in_reply_to_status_id</span>] = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:in_reply_to_status</span>).<span class="ruby-identifier">id</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value">:in_reply_to_status</span>].<span class="ruby-identifier">nil?</span>
<span class="ruby-identifier">hash</span>[<span class="ruby-value">:place_id</span>] = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:place</span>).<span class="ruby-identifier">woeid</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value">:place</span>].<span class="ruby-identifier">nil?</span>
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/statuses/update_with_media.json'</span>, <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-string">'media[]'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">media</span>, <span class="ruby-string">'status'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">status</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Tweet</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update_with_media-source -->
</div>
</div><!-- update_with_media-method -->
</div><!-- public-instance-method-details -->
</div><!-- 5Buntitled-5D -->
</div><!-- documentation -->
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
Rdoc Generator</a> 2</small>.</p>
</div>
</body>
</html>