Exemplo n.º 1
0
        // Memberships
        public IEnumerable <ITwitterListDTO> GetUserListMemberships(IGetUserListMembershipsQueryParameters queryParameters)
        {
            var parameters = queryParameters.Parameters;
            var query      = _listsQueryGenerator.GetUserListMembershipsQuery(queryParameters);

            return(_twitterAccessor.ExecuteCursorGETQuery <ITwitterListDTO, ITwitterListCursorQueryResultDTO>(query, parameters));
        }
        public string GetUserListMembershipsQuery(IGetUserListMembershipsQueryParameters parameters)
        {
            _userQueryValidator.ThrowIfUserCannotBeIdentified(parameters.UserIdentifier);

            var userIdentifierParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(parameters.UserIdentifier);
            var additionalParameters    = parameters.Parameters;

            var baseQuery    = string.Format(Resources.List_GetUserMemberships, userIdentifierParameter);
            var queryBuilder = new StringBuilder(baseQuery);

            queryBuilder.AddParameterToQuery("count", additionalParameters.MaximumNumberOfResults);
            queryBuilder.AddParameterToQuery("filter_to_owned_lists", additionalParameters.FilterToOwnLists);

            return(queryBuilder.ToString());
        }
Exemplo n.º 3
0
 public static IEnumerable <ITwitterList> GetUserListMemberships(IGetUserListMembershipsQueryParameters parameters)
 {
     return(TwitterListController.GetUserListsMemberships(parameters));
 }
Exemplo n.º 4
0
        public IEnumerable <ITwitterList> GetUserListsMemberships(IGetUserListMembershipsQueryParameters parameters)
        {
            var twitterListDtos = _twitterListQueryExecutor.GetUserListMemberships(parameters);

            return(_twitterListsFactory.CreateListsFromDTOs(twitterListDtos));
        }