Exemplo n.º 1
0
        public static bool IsBlocked(string targetScreenName)
        {
            ListBlockedUsersOptions blockedListOpts = new ListBlockedUsersOptions();
            var blockedList = User.Account.ListBlockedUsers(blockedListOpts);

            for (int index = 0; index < blockedList.Count; index++)
            {
                if (blockedList[index].ScreenName.ToLower().CompareTo(targetScreenName) == 0)
                {
                    return true;
                }
            }
            return false;
        }
		public virtual void ListBlockedUsers(ListBlockedUsersOptions options, Action<TwitterCursorList<TwitterUser>, TwitterResponse> action)
		{
			var include_entities = options.IncludeEntities;
			var skip_status = options.SkipStatus;
			var cursor = options.Cursor;
			
			WithHammock(action, "blocks/list", FormatAsString, "?include_entities=", include_entities, "&skip_status=", skip_status, "&cursor=", cursor);
		}
		public virtual IAsyncResult BeginListBlockedUsers(ListBlockedUsersOptions options)
		{
			var include_entities = options.IncludeEntities;
			var skip_status = options.SkipStatus;
			var cursor = options.Cursor;
				

			return BeginWithHammock<TwitterCursorList<TwitterUser>>(WebMethod.Get, "blocks/list", FormatAsString, "?include_entities=", include_entities, "&skip_status=", skip_status, "&cursor=", cursor);
		}
		public virtual Task<TwitterResponse<TwitterCursorList<TwitterUser>>> ListBlockedUsersAsync(ListBlockedUsersOptions options)
		{
			var include_entities = options.IncludeEntities;
			var skip_status = options.SkipStatus;
			var cursor = options.Cursor;
				
			
			return ExecuteRequest<TwitterCursorList<TwitterUser>>("blocks/list", FormatAsString, "?include_entities=", include_entities, "&skip_status=", skip_status, "&cursor=", cursor);
		}
		public virtual Task<TwitterAsyncResult<TwitterCursorList<TwitterUser>>> ListBlockedUsersAsync(ListBlockedUsersOptions options)
		{
			var include_entities = options.IncludeEntities;
			var skip_status = options.SkipStatus;
			var cursor = options.Cursor;
			
			return WithHammockTask<TwitterCursorList<TwitterUser>>(_client, "blocks/list", FormatAsString, "?include_entities=", include_entities, "&skip_status=", skip_status, "&cursor=", cursor);
		}