Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Activity#about_me and Activity#by_friends methods

  • Loading branch information...
commit 35e96108c450e76611137feed841f595d7214533 1 parent 327724b
@sferik authored
Showing with 44 additions and 2 deletions.
  1. +4 −2 lib/twitter/client.rb
  2. +40 −0 lib/twitter/client/activity.rb
View
6 lib/twitter/client.rb
@@ -8,11 +8,12 @@ class Client < API
# order to avoid a superclass mismatch error, allowing those modules to be
# Client-namespaced.
require 'twitter/client/account'
+ require 'twitter/client/activity'
require 'twitter/client/block'
require 'twitter/client/direct_messages'
require 'twitter/client/favorites'
- require 'twitter/client/friendship'
require 'twitter/client/friends_and_followers'
+ require 'twitter/client/friendship'
require 'twitter/client/geo'
require 'twitter/client/help'
require 'twitter/client/legal'
@@ -36,11 +37,12 @@ class Client < API
include Twitter::Client::Utils
include Twitter::Client::Account
+ include Twitter::Client::Activity
include Twitter::Client::Block
include Twitter::Client::DirectMessages
include Twitter::Client::Favorites
- include Twitter::Client::Friendship
include Twitter::Client::FriendsAndFollowers
+ include Twitter::Client::Friendship
include Twitter::Client::Geo
include Twitter::Client::Help
include Twitter::Client::Legal
View
40 lib/twitter/client/activity.rb
@@ -0,0 +1,40 @@
+module Twitter
+ class Client
+ # Defines methods related to URLs
+ module Activity
+ # Returns activity about me
+ #
+ # @note Undocumented
+ # @rate_limited Yes
+ # @requires_authentication Yes
+ # @response_format `json`
+ # @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] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
+ # @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
+ # @return [Array] An array of actions
+ # @example Return activity about me
+ # Twitter.about_me
+ def about_me(options={})
+ get("i/activity/about_me", options, :json)
+ end
+
+ # Returns activity by friends
+ #
+ # @note Undocumented
+ # @rate_limited Yes
+ # @requires_authentication Yes
+ # @response_format `json`
+ # @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] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
+ # @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
+ # @return [Array] An array of actions
+ # @example Return activity by friends
+ # Twitter.by_friends
+ def by_friends(options={})
+ get("i/activity/by_friends", options, :json)
+ end
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.