diff --git a/Examplinvi/Program.cs b/Examplinvi/Program.cs index b40a0a0ff..4c533a3b8 100644 --- a/Examplinvi/Program.cs +++ b/Examplinvi/Program.cs @@ -4,7 +4,6 @@ using System.IO; using System.Linq; using System.Reflection; -using FakeItEasy; using Tweetinvi; using Tweetinvi.Core; using Tweetinvi.Core.Authentication; @@ -17,7 +16,6 @@ using Tweetinvi.Core.Interfaces.Streaminvi; using Tweetinvi.Core.Parameters; using Tweetinvi.Json; -using Tweetinvi.WebLogic; using SavedSearch = Tweetinvi.SavedSearch; using Stream = Tweetinvi.Stream; @@ -32,19 +30,8 @@ namespace Examplinvi class Program { - static string extendedTweet = "{}"; - static void Main() { - // WORKING AREA : linvi - //TweetinviContainer.BeforeRegistrationComplete += (sender, args) => - //{ - // var requestHandler = A.Fake(); - // A.CallTo(() => requestHandler.ExecuteQuery(A.Ignored, A.Ignored, null, null, null)).Returns(_extendedTweet); - - // args.TweetinviContainer.RegisterInstance(typeof(ITwitterRequestHandler), requestHandler); - //}; - Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"); TweetinviEvents.QueryBeforeExecute += (sender, args) => @@ -52,13 +39,6 @@ static void Main() Console.WriteLine(args.QueryURL); }; - TweetinviConfig.ApplicationSettings.TweetMode = null; - var tweet = Tweet.PublishTweet("hello"); - - // END WORKING AREA - - - var authenticatedUser = User.GetAuthenticatedUser(); GenerateCredentialExamples(); @@ -85,180 +65,6 @@ static void Main() Console.ReadLine(); } - static string _extendedTweet = @"{ - 'created_at': 'Mon Mar 07 15:13:47 +0000 2016', - 'id': 706860403981099008, - 'id_str': '706860403981099008', - 'full_text': 'Peek-a-boo! https://t.co/R3P6waHxRa', - 'display_text_range': [ - 0, - 35 - ], - 'entities': { - 'hashtags': [], - 'symbols': [], - 'user_mentions': [], - 'urls': [], - 'media': [ - { - 'id': 706860403746181121, - 'id_str': '706860403746181121', - 'indices': [ - 12, - 35 - ], - 'media_url': 'http://pbs.twimg.com/media/Cc9FyscUkAEQaOw.jpg', - 'media_url_https': 'https://pbs.twimg.com/media/Cc9FyscUkAEQaOw.jpg', - 'url': 'https://t.co/R3P6waHxRa', - 'display_url': 'pic.twitter.com/R3P6waHxRa', - 'expanded_url': 'http://twitter.com/jeremycloud/status/706860403981099008/photo/1', - 'type': 'photo', - 'sizes': { - 'medium': { - 'w': 600, - 'h': 398, - 'resize': 'fit' - }, - 'small': { - 'w': 340, - 'h': 226, - 'resize': 'fit' - }, - 'thumb': { - 'w': 150, - 'h': 150, - 'resize': 'crop' - }, - 'large': { - 'w': 1024, - 'h': 680, - 'resize': 'fit' - } - } - } - ] - }, - 'extended_entities': { - 'media': [ - { - 'id': 706860403746181121, - 'id_str': '706860403746181121', - 'indices': [ - 12, - 35 - ], - 'media_url': 'http://pbs.twimg.com/media/Cc9FyscUkAEQaOw.jpg', - 'media_url_https': 'https://pbs.twimg.com/media/Cc9FyscUkAEQaOw.jpg', - 'url': 'https://t.co/R3P6waHxRa', - 'display_url': 'pic.twitter.com/R3P6waHxRa', - 'expanded_url': 'http://twitter.com/jeremycloud/status/706860403981099008/photo/1', - 'type': 'photo', - 'sizes': { - 'medium': { - 'w': 600, - 'h': 398, - 'resize': 'fit' - }, - 'small': { - 'w': 340, - 'h': 226, - 'resize': 'fit' - }, - 'thumb': { - 'w': 150, - 'h': 150, - 'resize': 'crop' - }, - 'large': { - 'w': 1024, - 'h': 680, - 'resize': 'fit' - } - } - } - ] - }, - 'truncated': false, - 'source': 'OS X', - 'in_reply_to_status_id': null, - 'in_reply_to_status_id_str': null, - 'in_reply_to_user_id': null, - 'in_reply_to_user_id_str': null, - 'in_reply_to_screen_name': null, - 'user': { - 'id': 15062340, - 'id_str': '15062340', - 'name': '/dev/cloud/jeremy', - 'screen_name': 'jeremycloud', - 'location': 'Madison, Wisconsin', - 'description': 'Professional yak shaver. Amateur bike shedder.', - 'url': 'https://t.co/FcYeBkOpVY', - 'entities': { - 'url': { - 'urls': [ - { - 'url': 'https://t.co/FcYeBkOpVY', - 'expanded_url': 'http://about.me/jeremy.cloud', - 'display_url': 'about.me/jeremy.cloud', - 'indices': [ - 0, - 23 - ] - } - ] - }, - 'description': { - 'urls': [] - } - }, - 'protected': false, - 'followers_count': 4324, - 'friends_count': 410, - 'listed_count': 103, - 'created_at': 'Mon Jun 09 17:00:58 +0000 2008', - 'favourites_count': 815, - 'utc_offset': -18000, - 'time_zone': 'Central Time (US & Canada)', - 'geo_enabled': true, - 'verified': false, - 'statuses_count': 2218, - 'lang': 'en', - 'contributors_enabled': false, - 'is_translator': false, - 'is_translation_enabled': false, - 'profile_background_color': '000000', - 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', - 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', - 'profile_background_tile': false, - 'profile_image_url': 'http://pbs.twimg.com/profile_images/436903139183054849/i_MbCcoW_normal.jpeg', - 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/436903139183054849/i_MbCcoW_normal.jpeg', - 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/15062340/1447451621', - 'profile_link_color': '4A913C', - 'profile_sidebar_border_color': '000000', - 'profile_sidebar_fill_color': '000000', - 'profile_text_color': '000000', - 'profile_use_background_image': false, - 'has_extended_profile': true, - 'default_profile': false, - 'default_profile_image': false, - 'following': true, - 'follow_request_sent': false, - 'notifications': false - }, - 'geo': null, - 'coordinates': null, - 'place': null, - 'contributors': null, - 'is_quote_status': false, - 'retweet_count': 0, - 'favorite_count': 8, - 'favorited': false, - 'retweeted': false, - 'possibly_sensitive': false, - 'possibly_sensitive_appealable': false, - 'lang': 'en' -}"; - #region Examples Store // ReSharper disable LocalizableElement