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

1694 lines
79 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::Users</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/users_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/twitter/rest/users.rb">lib/twitter/rest/users.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-block">#block</a></li>
<li><a href="#method-i-block-3F">#block?</a></li>
<li><a href="#method-i-blocked">#blocked</a></li>
<li><a href="#method-i-blocked_ids">#blocked_ids</a></li>
<li><a href="#method-i-contributees">#contributees</a></li>
<li><a href="#method-i-contributors">#contributors</a></li>
<li><a href="#method-i-current_user">#current_user</a></li>
<li><a href="#method-i-mute">#mute</a></li>
<li><a href="#method-i-muted">#muted</a></li>
<li><a href="#method-i-muted_ids">#muted_ids</a></li>
<li><a href="#method-i-profile_banner">#profile_banner</a></li>
<li><a href="#method-i-remove_profile_banner">#remove_profile_banner</a></li>
<li><a href="#method-i-settings">#settings</a></li>
<li><a href="#method-i-unblock">#unblock</a></li>
<li><a href="#method-i-unmute">#unmute</a></li>
<li><a href="#method-i-update_delivery_device">#update_delivery_device</a></li>
<li><a href="#method-i-update_profile">#update_profile</a></li>
<li><a href="#method-i-update_profile_background_image">#update_profile_background_image</a></li>
<li><a href="#method-i-update_profile_banner">#update_profile_banner</a></li>
<li><a href="#method-i-update_profile_colors">#update_profile_colors</a></li>
<li><a href="#method-i-update_profile_image">#update_profile_image</a></li>
<li><a href="#method-i-user">#user</a></li>
<li><a href="#method-i-user-3F">#user?</a></li>
<li><a href="#method-i-user_search">#user_search</a></li>
<li><a href="#method-i-users">#users</a></li>
<li><a href="#method-i-verify_credentials">#verify_credentials</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::Users</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_USERS_PER_REQUEST">MAX_USERS_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="block-method" class="method-detail ">
<a name="method-i-block"></a>
<div class="method-heading">
<span class="method-name">block</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Blocks the users specified by the authenticating user</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/blocks/create">dev.twitter.com/docs/api/1.1/post/blocks/create</a>
@note Destroys a friendship to the blocked user if it exists. @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::User&gt;] The blocked users. @overload block(*users)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.</pre>
<p>@overload block(*users, options)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.
@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="block-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 194</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">block</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">parallel_users_from_response</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/blocks/create.json'</span>, <span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- block-source -->
</div>
</div><!-- block-method -->
<div id="block-3F-method" class="method-detail ">
<a name="method-i-block-3F"></a>
<div class="method-heading">
<span class="method-name">block?</span><span
class="method-args">(user, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns true if the authenticating user is blocking a target user</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/blocks/ids">dev.twitter.com/docs/api/1.1/get/blocks/ids</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 [Boolean] true if the
authenticating user is blocking the target user, otherwise false. @param
user [Integer, String, URI, Twitter::User] A <a
href="../../Twitter.html">Twitter</a> user ID, screen name, URI, or object.
@param options [Hash] A customizable set of options.</p>
<div class="method-source-code" id="block-3F-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 169</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">block?</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">user_id</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">user</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">Integer</span>
<span class="ruby-identifier">user</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>, <span class="ruby-constant">URI</span>, <span class="ruby-constant">Addressable</span><span class="ruby-operator">::</span><span class="ruby-constant">URI</span>
<span class="ruby-identifier">user</span>(<span class="ruby-identifier">user</span>).<span class="ruby-identifier">id</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>
<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
<span class="ruby-keyword">end</span>
<span class="ruby-identifier">blocked_ids</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">collect</span>(&amp;<span class="ruby-value">:to_i</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">user_id</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- block-3F-source -->
</div>
</div><!-- block-3F-method -->
<div id="blocked-method" class="method-detail ">
<a name="method-i-blocked"></a>
<div class="method-heading">
<span class="method-name">blocked</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns an array of user objects that the authenticating user is blocking</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/blocks/list">dev.twitter.com/docs/api/1.1/get/blocks/list</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::User&gt;] <a href="../User.html">User</a> objects that
the authenticating user is blocking. @param options [Hash] A customizable
set of options. @option options [Boolean, String, Integer] :skip_status Do
not include users <a href="Tweets.html">Tweets</a> when set to true, t
or 1.</p>
<div class="method-source-code" id="blocked-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 140</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">blocked</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_cursor</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/blocks/list.json'</span>, <span class="ruby-identifier">options</span>, <span class="ruby-value">:users</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- blocked-source -->
</div>
</div><!-- blocked-method -->
<div id="blocked_ids-method" class="method-detail ">
<a name="method-i-blocked_ids"></a>
<div class="method-heading">
<span class="method-name">blocked_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 an array of numeric user IDs the authenticating user is blocking</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/blocks/ids">dev.twitter.com/docs/api/1.1/get/blocks/ids</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::Cursor]
Numeric user IDs the authenticating user is blocking. @overload <a
href="Users.html#method-i-blocked_ids">blocked_ids</a>(options = {})</p>
<pre>@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="blocked_ids-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 154</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">blocked_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">merge_user!</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">pop</span>)
<span class="ruby-identifier">perform_with_cursor</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/blocks/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><!-- blocked_ids-source -->
</div>
</div><!-- blocked_ids-method -->
<div id="contributees-method" class="method-detail ">
<a name="method-i-contributees"></a>
<div class="method-heading">
<span class="method-name">contributees</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns an array of users that the specified user can contribute to</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/users/contributees">dev.twitter.com/docs/api/1.1/get/users/contributees</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::User&gt;] @overload contributees(options = {})</p>
<pre>@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.</pre>
<p>@overload contributees(user, options = {})</p>
<pre>@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.</pre>
<div class="method-source-code" id="contributees-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 305</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">contributees</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">users_from_response</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/users/contributees.json'</span>, <span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- contributees-source -->
</div>
</div><!-- contributees-method -->
<div id="contributors-method" class="method-detail ">
<a name="method-i-contributors"></a>
<div class="method-heading">
<span class="method-name">contributors</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns an array of users who can contribute to the specified account</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/users/contributors">dev.twitter.com/docs/api/1.1/get/users/contributors</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::User&gt;] @overload contributors(options = {})</p>
<pre>@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.</pre>
<p>@overload contributors(user, options = {})</p>
<pre>@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.</pre>
<div class="method-source-code" id="contributors-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 323</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">contributors</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">users_from_response</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/users/contributors.json'</span>, <span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- contributors-source -->
</div>
</div><!-- contributors-method -->
<div id="current_user-method" class="method-detail method-alias">
<a name="method-i-current_user"></a>
<div class="method-heading">
<span class="method-name">current_user</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
</div>
<div class="aliases">
Alias for: <a href="Users.html#method-i-verify_credentials">verify_credentials</a>
</div>
</div><!-- current_user-method -->
<div id="mute-method" class="method-detail ">
<a name="method-i-mute"></a>
<div class="method-heading">
<span class="method-name">mute</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Mutes the users specified by the authenticating user</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/mutes/users/create">dev.twitter.com/docs/api/1.1/post/mutes/users/create</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::User&gt;] The muted users. @overload mute(*users)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.</pre>
<p>@overload mute(*users, options)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.
@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="mute-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 392</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">mute</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">parallel_users_from_response</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/mutes/users/create.json'</span>, <span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- mute-source -->
</div>
</div><!-- mute-method -->
<div id="muted-method" class="method-detail ">
<a name="method-i-muted"></a>
<div class="method-heading">
<span class="method-name">muted</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns an array of user objects that the authenticating user is muting</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/mutes/users/list">dev.twitter.com/docs/api/1.1/get/mutes/users/list</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::User&gt;] <a href="../User.html">User</a> objects that
the authenticating user is muting. @param options [Hash] A customizable set
of options. @option options [Boolean, String, Integer] :skip_status Do not
include users <a href="Tweets.html">Tweets</a> when set to true, t or 1.</p>
<div class="method-source-code" id="muted-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 421</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">muted</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_cursor</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/mutes/users/list.json'</span>, <span class="ruby-identifier">options</span>, <span class="ruby-value">:users</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- muted-source -->
</div>
</div><!-- muted-method -->
<div id="muted_ids-method" class="method-detail ">
<a name="method-i-muted_ids"></a>
<div class="method-heading">
<span class="method-name">muted_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 an array of numeric user IDs the authenticating user is muting</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/mutes/users/ids">dev.twitter.com/docs/api/1.1/get/mutes/users/ids</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::Cursor]
Numeric user IDs the authenticating user is muting @overload <a
href="Users.html#method-i-muted_ids">muted_ids</a>(options = {})</p>
<pre>@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="muted_ids-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 435</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">muted_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">merge_user!</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">pop</span>)
<span class="ruby-identifier">perform_with_cursor</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/mutes/users/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><!-- muted_ids-source -->
</div>
</div><!-- muted_ids-method -->
<div id="profile_banner-method" class="method-detail ">
<a name="method-i-profile_banner"></a>
<div class="method-heading">
<span class="method-name">profile_banner</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns the available size variations of the specified users profile
banner.</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/users/profile_banner">dev.twitter.com/docs/api/1.1/get/users/profile_banner</a>
@note If the user has not uploaded a profile banner, a HTTP 404 will be
served instead. @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::ProfileBanner] @overload <a
href="Users.html#method-i-profile_banner">profile_banner</a>(options = {})
@overload <a
href="Users.html#method-i-profile_banner">profile_banner</a>(user, options
= {})</p>
<pre>@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.</pre>
<div class="method-source-code" id="profile_banner-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 374</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">profile_banner</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">merge_user!</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">user_id</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>[<span class="ruby-value">:user_id</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>[<span class="ruby-value">:screen_name</span>]
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/users/profile_banner.json'</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">ProfileBanner</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- profile_banner-source -->
</div>
</div><!-- profile_banner-method -->
<div id="remove_profile_banner-method" class="method-detail ">
<a name="method-i-remove_profile_banner"></a>
<div class="method-heading">
<span class="method-name">remove_profile_banner</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Removes the authenticating users profile banner image</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/remove_profile_banner">dev.twitter.com/docs/api/1.1/post/account/remove_profile_banner</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 [nil] @param options
[Hash] A customizable set of options.</p>
<div class="method-source-code" id="remove_profile_banner-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 335</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">remove_profile_banner</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">post</span>(<span class="ruby-string">'/1.1/account/remove_profile_banner.json'</span>, <span class="ruby-identifier">options</span>).<span class="ruby-identifier">body</span>
<span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- remove_profile_banner-source -->
</div>
</div><!-- remove_profile_banner-method -->
<div id="settings-method" class="method-detail ">
<a name="method-i-settings"></a>
<div class="method-heading">
<span class="method-name">settings</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users settings. Or, if no options supplied,
returns settings (including current trend, geo and sleep time information)
for the authenticating user.</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/settings">dev.twitter.com/docs/api/1.1/post/account/settings</a>
@see <a
href="https://dev.twitter.com/docs/api/1.1/get/account/settings">dev.twitter.com/docs/api/1.1/get/account/settings</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::Settings]
@param options [Hash] A customizable set of options. @option options
[Integer] :trend_location_woeid The Yahoo! Where On Earth ID to use as the
users default trend location. Global information is available by using 1
as the WOEID. The woeid must be one of the locations returned by {<a
href="https://dev.twitter.com/docs/api/1.1/get/trends/available">dev.twitter.com/docs/api/1.1/get/trends/available</a>
GET trends/available}. @option options [Boolean, String, Integer]
:sleep_time_enabled When set to true, t or 1, will enable sleep time for
the user. Sleep time is the time when push or SMS notifications should not
be sent to the user. @option options [Integer] :start_sleep_time The hour
that sleep time should begin if it is enabled. The value for this parameter
should be provided in {<a
href="http://en.wikipedia.org/wiki/ISO_8601">en.wikipedia.org/wiki/ISO_8601</a>
ISO8601} format (i.e. 00-23). The time is considered to be in the same
timezone as the users time_zone setting. @option options [Integer]
:end_sleep_time The hour that sleep time should end if it is enabled. The
value for this parameter should be provided in {<a
href="http://en.wikipedia.org/wiki/ISO_8601">en.wikipedia.org/wiki/ISO_8601</a>
ISO8601} format (i.e. 00-23). The time is considered to be in the same
timezone as the users time_zone setting. @option options [String]
:time_zone The timezone dates and times should be displayed in for the
user. The timezone must be one of the {<a
href="http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html">api.rubyonrails.org/classes/ActiveSupport/TimeZone.html</a>
Rails TimeZone} names. @option options [String] :lang The language which <a
href="../../Twitter.html">Twitter</a> should render in for this user. The
language must be specified by the appropriate two letter ISO 639-1
representation. Currently supported languages are provided by {<a
href="https://dev.twitter.com/docs/api/1.1/get/help/languages">dev.twitter.com/docs/api/1.1/get/help/languages</a>
GET help/languages}.</p>
<div class="method-source-code" id="settings-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 33</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">settings</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">request_method</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">zero?</span> <span class="ruby-operator">?</span> <span class="ruby-value">:get</span> <span class="ruby-operator">:</span> <span class="ruby-value">:post</span>
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request_method</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-string">'/1.1/account/settings.json'</span>, <span class="ruby-identifier">options</span>).<span class="ruby-identifier">body</span>
<span class="ruby-comment"># https://dev.twitter.com/issues/59</span>
<span class="ruby-identifier">response</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value">:trend_location</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:trend_location</span>, []).<span class="ruby-identifier">first</span>)
<span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">Settings</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">response</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- settings-source -->
</div>
</div><!-- settings-method -->
<div id="unblock-method" class="method-detail ">
<a name="method-i-unblock"></a>
<div class="method-heading">
<span class="method-name">unblock</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Un-blocks the users specified by the authenticating user</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/blocks/destroy">dev.twitter.com/docs/api/1.1/post/blocks/destroy</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::User&gt;] The un-blocked users. @overload
unblock(*users)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.</pre>
<p>@overload unblock(*users, options)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.
@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="unblock-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 210</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unblock</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">parallel_users_from_response</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/blocks/destroy.json'</span>, <span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- unblock-source -->
</div>
</div><!-- unblock-method -->
<div id="unmute-method" class="method-detail ">
<a name="method-i-unmute"></a>
<div class="method-heading">
<span class="method-name">unmute</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Un-mutes the user specified by the authenticating user.</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/mutes/users/destroy">dev.twitter.com/docs/api/1.1/post/mutes/users/destroy</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::User&gt;] The un-muted users. @overload unmute(*users)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.</pre>
<p>@overload unmute(*users, options)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.
@param options [Hash] A customizable set of options.</pre>
<div class="method-source-code" id="unmute-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 408</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unmute</span>(*<span class="ruby-identifier">args</span>)
<span class="ruby-identifier">parallel_users_from_response</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/mutes/users/destroy.json'</span>, <span class="ruby-identifier">args</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- unmute-source -->
</div>
</div><!-- unmute-method -->
<div id="update_delivery_device-method" class="method-detail ">
<a name="method-i-update_delivery_device"></a>
<div class="method-heading">
<span class="method-name">update_delivery_device</span><span
class="method-args">(device, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Sets which device <a href="../../Twitter.html">Twitter</a> delivers updates
to for the authenticating user</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/update_delivery_device">dev.twitter.com/docs/api/1.1/post/account/update_delivery_device</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 [Twitter::User] The
authenticated user. @param device [String] Must be one of: sms, none.
@param options [Hash] A customizable set of options.</p>
<div class="method-source-code" id="update_delivery_device-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 64</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_delivery_device</span>(<span class="ruby-identifier">device</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/account/update_delivery_device.json'</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:device</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">device</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update_delivery_device-source -->
</div>
</div><!-- update_delivery_device-method -->
<div id="update_profile-method" class="method-detail ">
<a name="method-i-update_profile"></a>
<div class="method-heading">
<span class="method-name">update_profile</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Sets values that users are able to set under the “Account” tab of their
settings page</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/update_profile">dev.twitter.com/docs/api/1.1/post/account/update_profile</a>
@note Only the options specified will be updated. @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::User] The authenticated user. @param options
[Hash] A customizable set of options. @option options [String] :name Full
name associated with the profile. Maximum of 20 characters. @option options
[String] :url URL associated with the profile. Will be prepended with
“http://” if not present. Maximum of 100 characters. @option options
[String] :location The city or country describing where the user of the
account is located. The contents are not normalized or geocoded in any way.
Maximum of 30 characters. @option options [String] :description A
description of the user owning the account. Maximum of 160 characters.</p>
<div class="method-source-code" id="update_profile-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 81</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_profile</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/account/update_profile.json'</span>, <span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update_profile-source -->
</div>
</div><!-- update_profile-method -->
<div id="update_profile_background_image-method" class="method-detail ">
<a name="method-i-update_profile_background_image"></a>
<div class="method-heading">
<span class="method-name">update_profile_background_image</span><span
class="method-args">(image, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users profile background image</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/update_profile_background_image">dev.twitter.com/docs/api/1.1/post/account/update_profile_background_image</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 [Twitter::User] The
authenticated user. @param image [File] The background image for the
profile, base64-encoded. Must be a valid GIF, JPG, or PNG image of less
than 800 kilobytes in size. Images with width larger than 2048 pixels will
be forcibly scaled down. The image must be provided as raw multipart data,
not a URL. @param options [Hash] A customizable set of options. @option
options [Boolean] :tile Whether or not to tile the background image. If set
to true the background image will be displayed tiled. The image will not be
tiled otherwise.</p>
<div class="method-source-code" id="update_profile_background_image-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 95</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_profile_background_image</span>(<span class="ruby-identifier">image</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/account/update_profile_background_image.json'</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:image</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">image</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update_profile_background_image-source -->
</div>
</div><!-- update_profile_background_image-method -->
<div id="update_profile_banner-method" class="method-detail ">
<a name="method-i-update_profile_banner"></a>
<div class="method-heading">
<span class="method-name">update_profile_banner</span><span
class="method-args">(banner, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users profile banner image</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/update_profile_banner">dev.twitter.com/docs/api/1.1/post/account/update_profile_banner</a>
@note Uploads a profile banner on behalf of the authenticating user. For
best results, upload an &lt;5MB image that is exactly 1252px by 626px.
Images will be resized for a number of display options. <a
href="Users.html">Users</a> with an uploaded profile banner will have a
profile_banner_url node in their <a href="Users.html">Users</a> objects.
More information about sizing variations can be found in <a
href="../User.html">User</a> <a href="../Profile.html">Profile</a> Images
and Banners. @note <a href="../Profile.html">Profile</a> banner images are
processed asynchronously. The profile_banner_url and its variant sizes will
not necessary be available directly after upload. @rate_limited No
@authentication Requires user context @raise [Twitter::Error::BadRequest]
<a href="../Error.html">Error</a> raised when either an image was not
provided or the image data could not be processed. @raise
[Twitter::Error::Unauthorized] <a href="../Error.html">Error</a> raised
when supplied user credentials are not valid. @raise
[Twitter::Error::UnprocessableEntity] <a href="../Error.html">Error</a>
raised when the image could not be resized or is too large. @return [nil]
@param banner [File] The Base64-encoded or raw image data being uploaded as
the users new profile banner. @param options [Hash] A customizable set of
options. @option options [Integer] :width The width of the preferred
section of the image being uploaded in pixels. Use with height,
offset_left, and offset_top to select the desired region of the image to
use. @option options [Integer] :height The height of the preferred section
of the image being uploaded in pixels. Use with width, offset_left, and
offset_top to select the desired region of the image to use. @option
options [Integer] :offset_left The number of pixels by which to offset the
uploaded image from the left. Use with height, width, and offset_top to
select the desired region of the image to use. @option options [Integer]
:offset_top The number of pixels by which to offset the uploaded image from
the top. Use with height, width, and offset_left to select the desired
region of the image to use.</p>
<div class="method-source-code" id="update_profile_banner-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 358</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_profile_banner</span>(<span class="ruby-identifier">banner</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">post</span>(<span class="ruby-string">'/1.1/account/update_profile_banner.json'</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:banner</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">banner</span>)).<span class="ruby-identifier">body</span>
<span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- update_profile_banner-source -->
</div>
</div><!-- update_profile_banner-method -->
<div id="update_profile_colors-method" class="method-detail ">
<a name="method-i-update_profile_colors"></a>
<div class="method-heading">
<span class="method-name">update_profile_colors</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Sets one or more hex values that control the color scheme of the
authenticating users profile</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/update_profile_colors">dev.twitter.com/docs/api/1.1/post/account/update_profile_colors</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 [Twitter::User] The
authenticated user. @param options [Hash] A customizable set of options.
@option options [String] :profile_background_color <a
href="../Profile.html">Profile</a> background color. @option options
[String] :profile_text_color <a href="../Profile.html">Profile</a> text
color. @option options [String] :profile_link_color <a
href="../Profile.html">Profile</a> link color. @option options [String]
:profile_sidebar_fill_color <a href="../Profile.html">Profile</a> sidebars
background color. @option options [String] :profile_sidebar_border_color <a
href="../Profile.html">Profile</a> sidebars border color.</p>
<div class="method-source-code" id="update_profile_colors-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 112</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_profile_colors</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/account/update_profile_colors.json'</span>, <span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update_profile_colors-source -->
</div>
</div><!-- update_profile_colors-method -->
<div id="update_profile_image-method" class="method-detail ">
<a name="method-i-update_profile_image"></a>
<div class="method-heading">
<span class="method-name">update_profile_image</span><span
class="method-args">(image, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Updates the authenticating users profile image</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/post/account/update_profile_image">dev.twitter.com/docs/api/1.1/post/account/update_profile_image</a>
@note Updates the authenticating users profile image. Note that this
method expects raw multipart data, not a URL to an image. @note This method
asynchronously processes the uploaded file before updating the users
profile image URL. You can either update your local cache the next time you
request the users information, or, at least 5 seconds after uploading the
image, ask for the updated URL using GET users/show. @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::User] The authenticated user. @param image
[File] The avatar image for the profile, base64-encoded. Must be a valid
GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with
width larger than 500 pixels will be scaled down. Animated GIFs will be
converted to a static GIF of the first frame, removing the animation.
@param options [Hash] A customizable set of options.</p>
<div class="method-source-code" id="update_profile_image-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 127</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update_profile_image</span>(<span class="ruby-identifier">image</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:post</span>, <span class="ruby-string">'/1.1/account/update_profile_image.json'</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:image</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">image</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- update_profile_image-source -->
</div>
</div><!-- update_profile_image-method -->
<div id="user-method" class="method-detail ">
<a name="method-i-user"></a>
<div class="method-heading">
<span class="method-name">user</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/users/show">dev.twitter.com/docs/api/1.1/get/users/show</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::User] The
requested user. @overload user(options = {})</p>
<pre>Returns extended information for the authenticated user
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include user's Tweets when set to true, 't' or 1.</pre>
<p>@overload user(user, options = {})</p>
<pre>Returns extended information for a given user
@param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
@param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include user's Tweets when set to true, 't' or 1.</pre>
<div class="method-source-code" id="user-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 251</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">user</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-keyword">if</span> <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">user_id?</span>
<span class="ruby-identifier">merge_user!</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">user_id</span>)
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/users/show.json'</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">User</span>)
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">verify_credentials</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><!-- user-source -->
</div>
</div><!-- user-method -->
<div id="user-3F-method" class="method-detail ">
<a name="method-i-user-3F"></a>
<div class="method-heading">
<span class="method-name">user?</span><span
class="method-args">(user, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns true if the specified user exists</p>
<p>@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 [Boolean] true if the
user exists, otherwise false. @param user [Integer, String, Twitter::User]
A <a href="../../Twitter.html">Twitter</a> user ID, screen name, URI, or
object.</p>
<div class="method-source-code" id="user-3F-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 268</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">user?</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">merge_user!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">user</span>)
<span class="ruby-identifier">get</span>(<span class="ruby-string">'/1.1/users/show.json'</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword">true</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">NotFound</span>
<span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- user-3F-source -->
</div>
</div><!-- user-3F-method -->
<div id="user_search-method" class="method-detail ">
<a name="method-i-user_search"></a>
<div class="method-heading">
<span class="method-name">user_search</span><span
class="method-args">(query, options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns users that match the given query</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/users/search">dev.twitter.com/docs/api/1.1/get/users/search</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::User&gt;] @param query [String] The search query to run
against people search. @param options [Hash] A customizable set of options.
@option options [Integer] :count The number of people to retrieve. Maxiumum
of 20 allowed per page. @option options [Integer] :page Specifies the page
of results to retrieve.</p>
<div class="method-source-code" id="user_search-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 287</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">user_search</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_objects</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/users/search.json'</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:q</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">query</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- user_search-source -->
</div>
</div><!-- user_search-method -->
<div id="users-method" class="method-detail ">
<a name="method-i-users"></a>
<div class="method-heading">
<span class="method-name">users</span><span
class="method-args">(*args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns extended information for up to 100 users</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/users/lookup">dev.twitter.com/docs/api/1.1/get/users/lookup</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
[Array&lt;Twitter::User&gt;] The requested users. @overload users(*users)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, or objects.</pre>
<p>@overload users(*users, options)</p>
<pre>@param users [Enumerable&lt;Integer, String, Twitter::User&gt;] A collection of Twitter user IDs, screen names, 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'.</pre>
<div class="method-source-code" id="users-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 227</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">users</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_USERS_PER_REQUEST</span>)) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">users</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/users/lookup.json'</span>, <span class="ruby-identifier">merge_users</span>(<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">options</span>, <span class="ruby-identifier">users</span>), <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- users-source -->
</div>
</div><!-- users-method -->
<div id="verify_credentials-method" class="method-detail ">
<a name="method-i-verify_credentials"></a>
<div class="method-heading">
<span class="method-name">verify_credentials</span><span
class="method-args">(options = {})</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Returns the requesting user if authentication was successful, otherwise
raises {Twitter::Error::Unauthorized}</p>
<p>@see <a
href="https://dev.twitter.com/docs/api/1.1/get/account/verify_credentials">dev.twitter.com/docs/api/1.1/get/account/verify_credentials</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::User] The
authenticated user. @param options [Hash] A customizable set of options.
@option options [Boolean, String, Integer] :skip_status Do not include
users <a href="Tweets.html">Tweets</a> when set to true, t or 1.</p>
<div class="method-source-code" id="verify_credentials-source">
<pre>
<span class="ruby-comment"># File lib/twitter/rest/users.rb, line 50</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">verify_credentials</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">perform_with_object</span>(<span class="ruby-value">:get</span>, <span class="ruby-string">'/1.1/account/verify_credentials.json'</span>, <span class="ruby-identifier">options</span>, <span class="ruby-constant">Twitter</span><span class="ruby-operator">::</span><span class="ruby-constant">User</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- verify_credentials-source -->
</div>
<div class="aliases">
Also aliased as: <a href="Users.html#method-i-current_user">current_user</a>
</div>
</div><!-- verify_credentials-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>