コード例 #1
0
ファイル: ListsClient.cs プロジェクト: anilerol/tweetinvi
        public async Task <bool> CheckIfUserIsSubscriberOfList(ICheckIfUserIsSubscriberOfListParameters parameters)
        {
            try
            {
                await _twitterListsRequester.CheckIfUserIsSubscriberOfList(parameters).ConfigureAwait(false);

                return(true);
            }
            catch (TwitterException e)
            {
                if (e.StatusCode == 404)
                {
                    // This is a special case where the request actually throws expectedly
                    // When a user is not a member of a list this operation returns a 404.
                    return(false);
                }

                throw;
            }
        }