Skip to content

Commit

Permalink
Fully remove Rash
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jun 8, 2011
1 parent 130d792 commit 3b39696
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 69 deletions.
16 changes: 8 additions & 8 deletions lib/twitter/client/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Account
# @rate_limited true
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The authenticated user.
# @return [Hashie::Mash] The authenticated user.
# @raise [Twitter::Unauthorized] Error raised when supplied user credentials are not valid.
# @see http://dev.twitter.com/doc/get/account/verify_credentials
# @example Return the requesting user if authentication was successful
Expand All @@ -27,7 +27,7 @@ def verify_credentials(options={})
# This will return the requesting IP's rate limit status. If you want the authenticating user's rate limit status you must authenticate.
# @rate_limited true
# @param options [Hash] A customizable set of options.
# @return [Hashie::Rash]
# @return [Hashie::Mash]
# @see http://dev.twitter.com/doc/get/account/rate_limit_status
# @example Return the remaining number of API requests available to the requesting user
# Twitter.rate_limit_status
Expand All @@ -42,7 +42,7 @@ def rate_limit_status(options={})
# @authenticated true
# @rate_limited false
# @param options [Hash] A customizable set of options.
# @return [Hashie::Rash]
# @return [Hashie::Mash]
# @see http://dev.twitter.com/doc/post/account/end_session
# @example End the session of the authenticating user
# Twitter.end_session
Expand All @@ -59,7 +59,7 @@ def end_session(options={})
# @param device [String] Must be one of: 'sms', 'none'.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The authenticated user.
# @return [Hashie::Mash] The authenticated user.
# @see http://dev.twitter.com/doc/post/account/update_delivery_device
# @example Turn SMS updates on for the authenticating user
# Twitter.update_delivery_device('sms')
Expand All @@ -80,7 +80,7 @@ def update_delivery_device(device, options={})
# @option options [String] :profile_sidebar_fill_color Profile sidebar's background color.
# @option options [String] :profile_sidebar_border_color Profile sidebar's border color.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The authenticated user.
# @return [Hashie::Mash] The authenticated user.
# @see http://dev.twitter.com/doc/post/account/update_profile_colors
# @example Set authenticating user's profile background to black
# Twitter.update_profile_colors(:profile_background_color => '000000')
Expand All @@ -98,7 +98,7 @@ def update_profile_colors(options={})
# @param image [String] The avatar image for the profile. 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.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The authenticated user.
# @return [Hashie::Mash] The authenticated user.
# @see http://dev.twitter.com/doc/post/account/update_profile_image
# @example Update the authenticating user's profile image
# Twitter.update_profile_image(File.new("me.jpeg"))
Expand All @@ -116,7 +116,7 @@ def update_profile_image(image, options={})
# @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.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The authenticated user.
# @return [Hashie::Mash] The authenticated user.
# @see http://dev.twitter.com/doc/post/account/update_profile_background_image
# @example Update the authenticating user's profile background image
# Twitter.update_profile_background_image(File.new("we_concept_bg2.png"))
Expand All @@ -137,7 +137,7 @@ def update_profile_background_image(image, options={})
# @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.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The authenticated user.
# @return [Hashie::Mash] The authenticated user.
# @see http://dev.twitter.com/doc/post/account/update_profile
# @example Set authenticating user's name to Erik Michaels-Ober
# Twitter.update_profile(:name => "Erik Michaels-Ober")
Expand Down
4 changes: 2 additions & 2 deletions lib/twitter/client/block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Block
# @param user [Integer, String] A Twitter user ID or screen name.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The blocked user.
# @return [Hashie::Mash] The blocked user.
# @see http://dev.twitter.com/doc/post/blocks/create
# @example Block and unfriend @sferik as the authenticating user
# Twitter.block("sferik")
Expand All @@ -31,7 +31,7 @@ def block(user, options={})
# @param user [Integer, String] A Twitter user ID or screen name.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The un-blocked user.
# @return [Hashie::Mash] The un-blocked user.
# @see http://dev.twitter.com/doc/post/blocks/destroy
# @example Un-block @sferik as the authenticating user
# Twitter.unblock("sferik")
Expand Down
4 changes: 2 additions & 2 deletions lib/twitter/client/direct_messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def direct_messages_sent(options={})
# @param text [String] The text of your direct message, up to 140 characters.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The sent message.
# @return [Hashie::Mash] The sent message.
# @see http://dev.twitter.com/doc/post/direct_messages/new
# @example Send a direct message to @sferik from the authenticating user
# Twitter.direct_message_create("sferik", "I'm sending you this message via the Twitter Ruby Gem!")
Expand All @@ -71,7 +71,7 @@ def direct_message_create(user, text, options={})
# @param id [Integer] The ID of the direct message to delete.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The deleted message.
# @return [Hashie::Mash] The deleted message.
# @see http://dev.twitter.com/doc/post/direct_messages/destroy/:id
# @example Destroys the direct message with the ID 1825785544
# Twitter.direct_message_destroy(1825785544)
Expand Down
4 changes: 2 additions & 2 deletions lib/twitter/client/favorites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def favorites(*args)
# @param id [Integer] The numerical ID of the desired status.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The favorited status.
# @return [Hashie::Mash] The favorited status.
# @see http://dev.twitter.com/doc/post/favorites/create/:id
# @example Favorite the status with the ID 25938088801
# Twitter.favorite_create(25938088801)
Expand All @@ -56,7 +56,7 @@ def favorite_create(id, options={})
# @param id [Integer] The numerical ID of the desired status.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The un-favorited status.
# @return [Hashie::Mash] The un-favorited status.
# @see http://dev.twitter.com/doc/post/favorites/destroy/:id
# @example Un-favorite the status with the ID 25938088801
# Twitter.favorite_destroy(25938088801)
Expand Down
4 changes: 2 additions & 2 deletions lib/twitter/client/friends_and_followers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def friend_ids(*args)
user = args.first
merge_user_into_options!(user, options)
response = get('friends/ids', options)
format.to_s.downcase == 'xml' ? Hashie::Rash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
format.to_s.downcase == 'xml' ? Hashie::Mash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
end

# @overload follower_ids(options={})
Expand Down Expand Up @@ -65,7 +65,7 @@ def follower_ids(*args)
user = args.first
merge_user_into_options!(user, options)
response = get('followers/ids', options)
format.to_s.downcase == 'xml' ? Hashie::Rash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
format.to_s.downcase == 'xml' ? Hashie::Mash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
end
end
end
Expand Down
14 changes: 7 additions & 7 deletions lib/twitter/client/friendship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Friendship
# @param options [Hash] A customizable set of options.
# @option options [Boolean] :follow (false) Enable notifications for the target user.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The followed user.
# @return [Hashie::Mash] The followed user.
# @see http://dev.twitter.com/doc/post/friendships/create
# @example Follow @sferik
# Twitter.follow("sferik")
Expand All @@ -33,7 +33,7 @@ def follow(user, options={})
# @param user [Integer, String] A Twitter user ID or screen name.
# @param options [Hash] A customizable set of options.
# @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
# @return [Hashie::Rash] The unfollowed user.
# @return [Hashie::Mash] The unfollowed user.
# @see http://dev.twitter.com/doc/post/friendships/destroy
# @example Unfollow @sferik
# Twitter.unfollow("sferik")
Expand Down Expand Up @@ -90,7 +90,7 @@ def friendship_exists?(user_a, user_b, options={})
# @option options [String] :source_screen_name The screen_name of the subject user.
# @option options [Integer] :target_id The ID of the target user.
# @option options [String] :target_screen_name The screen_name of the target user.
# @return [Hashie::Rash]
# @return [Hashie::Mash]
# @see http://dev.twitter.com/doc/get/friendships/show
# @example Return the relationship between @sferik and @pengwynn
# Twitter.friendship(:source_screen_name => "sferik", :target_screen_name => "pengwynn")
Expand All @@ -107,14 +107,14 @@ def friendship(options={})
# @rate_limited true
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @return [Hashie::Rash]
# @return [Hashie::Mash]
# @see http://dev.twitter.com/doc/get/friendships/incoming
# @example Return an array of numeric IDs for every user who has a pending request to follow the authenticating user
# Twitter.friendships_incoming
def friendships_incoming(options={})
options = {:cursor => -1}.merge(options)
response = get('friendships/incoming', options)
format.to_s.downcase == 'xml' ? Hashie::Rash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
format.to_s.downcase == 'xml' ? Hashie::Mash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
end

# Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request
Expand All @@ -124,14 +124,14 @@ def friendships_incoming(options={})
# @rate_limited true
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @return [Hashie::Rash]
# @return [Hashie::Mash]
# @see http://dev.twitter.com/doc/get/friendships/outgoing
# @example Return an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request
# Twitter.friendships_outgoing
def friendships_outgoing(options={})
options = {:cursor => -1}.merge(options)
response = get('friendships/outgoing', options)
format.to_s.downcase == 'xml' ? Hashie::Rash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
format.to_s.downcase == 'xml' ? Hashie::Mash.new(:ids => response['id_list']['ids']['id'].map{|id| id.to_i}) : response
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/twitter/client/geo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def reverse_geocode(options={})
# @rate_limited true
# @param place_id [String] A place in the world. These IDs can be retrieved from {Twitter::Client::Geo#reverse_geocode}.
# @param options [Hash] A customizable set of options.
# @return [Hashie::Rash] The requested place.
# @return [Hashie::Mash] The requested place.
# @see http://dev.twitter.com/doc/get/geo/id/:place_id
# @example Return all the information about Twitter HQ
# Twitter.place("247f43d441defc03")
Expand All @@ -94,7 +94,7 @@ def place(place_id, options={})
# @option options [Float] :lat The latitude to search around. 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 isn't a corresponding :long option.
# @option options [Float] :long The longitude to search around. The valid range 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 [String] :"attribute:street_address" This option searches for places which have this given street address. There are other well-known and application-specific attributes available. Custom attributes are also permitted.
# @return [Hashie::Rash] The created place.
# @return [Hashie::Mash] The created place.
# @see http://dev.twitter.com/doc/post/geo/place
# @example Create a new place
# Twitter.place_create(:name => "@sferik's Apartment", :token => "22ff5b1f7159032cf69218c4d8bb78bc", :contained_within => "41bcb736f84a799e", :lat => "37.783699", :long => "-122.393581")
Expand Down
Loading

0 comments on commit 3b39696

Please sign in to comment.