From cf6a91f8df833dce5bffc7a0292402860e7d4da7 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Tue, 11 Jun 2013 15:02:46 -0700 Subject: [PATCH] Remove undocumented methods, retired in the APIpocalypse See: https://dev.twitter.com/blog/api-v1-retirement-final-dates --- lib/twitter/api/undocumented.rb | 32 --------------------------- spec/twitter/api/undocumented_spec.rb | 28 ----------------------- 2 files changed, 60 deletions(-) diff --git a/lib/twitter/api/undocumented.rb b/lib/twitter/api/undocumented.rb index 5b4c3363d..a08c52e46 100644 --- a/lib/twitter/api/undocumented.rb +++ b/lib/twitter/api/undocumented.rb @@ -10,38 +10,6 @@ module API module Undocumented include Twitter::API::Utils - # Returns activity about me - # - # @note Undocumented - # @rate_limited Yes - # @authentication Requires user context - # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. - # @return [Array] An array of actions - # @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 [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - # @example Return activity about me - # Twitter.activity_about_me - def activity_about_me(options={}) - objects_from_response(Twitter::ActionFactory, :get, "/i/activity/about_me.json", options) - end - - # Returns activity by friends - # - # @note Undocumented - # @rate_limited Yes - # @authentication Requires user context - # @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid./ - # @return [Array] An array of actions - # @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 [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - # @example Return activity by friends - # Twitter.activity_by_friends - def activity_by_friends(options={}) - objects_from_response(Twitter::ActionFactory, :get, "/i/activity/by_friends.json", options) - end - # @note Undocumented # @rate_limited Yes # @authentication Requires user context diff --git a/spec/twitter/api/undocumented_spec.rb b/spec/twitter/api/undocumented_spec.rb index 491d98d31..8a5eb67c1 100644 --- a/spec/twitter/api/undocumented_spec.rb +++ b/spec/twitter/api/undocumented_spec.rb @@ -6,34 +6,6 @@ @client = Twitter::Client.new end - describe "#activity_about_me" do - before do - stub_get("/i/activity/about_me.json").to_return(:body => fixture("about_me.json"), :headers => {:content_type => "application/json; charset=utf-8"}) - end - it "requests the correct resource" do - @client.activity_about_me - expect(a_get("/i/activity/about_me.json")).to have_been_made - end - it "returns activity about me" do - activity_about_me = @client.activity_about_me - expect(activity_about_me.first).to be_a Twitter::Action::Mention - end - end - - describe "#activity_by_friends" do - before do - stub_get("/i/activity/by_friends.json").to_return(:body => fixture("by_friends.json"), :headers => {:content_type => "application/json; charset=utf-8"}) - end - it "requests the correct resource" do - @client.activity_by_friends - expect(a_get("/i/activity/by_friends.json")).to have_been_made - end - it "returns activity by friends" do - activity_by_friends = @client.activity_by_friends - expect(activity_by_friends.first).to be_a Twitter::Action::Favorite - end - end - describe "#following_followers_of" do context "with a screen_name passed" do before do