Esempio n. 1
0
        public MemberShare GetShare(int vkGroupId, string memberId, int itemId, LikeShareType itemType)
        {
            var item = this.cachingStrategy.GetItem <MemberShare>(vkGroupId.ToString(), memberId, itemType.ToString(), itemId.ToString());

            if (item != null)
            {
                return(item);
            }

            this.cachingStrategy.InitCacheIfNeeded(this.GetInitSharesCacheKey(vkGroupId), () => this.GetMemberShares(vkGroupId), this.GetShareKey);
            return(this.cachingStrategy.GetItem <MemberShare>(vkGroupId.ToString(), memberId, itemType.ToString(), itemId.ToString()));
        }
Esempio n. 2
0
        public Responses.LikeShareFeed.response GetShares(string groupId, string relatedObjectId, LikeShareType type, int offsetCounter)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string> {
                { "owner_id", "-" + groupId }, { "item_id", relatedObjectId }, { "type", type.ToString().ToLower() }, { "filter", "copies" }, { "friends_only", "0" }, { "offset", offsetCounter.ToString() }, { "count", "1000" }
            };
            string sharesList = this.vkAccessor.ExecuteCall("likes.getList.xml", parameters);

            Ix.Palantir.Vkontakte.API.Responses.LikeShareFeed.response shares = this.responseMapper.MapResponse <Ix.Palantir.Vkontakte.API.Responses.LikeShareFeed.response>(sharesList);
            shares.Feed = sharesList;

            return(shares);
        }