public ReadOnlyCollection <long> GetList(LikesGetListParams @params, bool skipAuthorization = true) { @params.Extended = false; VkResponseArray response = _vk.Call("likes.getList", @params, skipAuthorization); return(response.ToReadOnlyCollectionOf <long>(x => x)); }
public LinkAccessType CheckLink([NotNull] string url) { var parameters = new VkParameters { { "url", url } }; return(_vk.Call("utils.checkLink", parameters, true)); }
public Status Get(long userId, long?groupId = null) { var parameters = new VkParameters { { "user_id", userId }, { "group_id", groupId } }; return(_vk.Call("status.get", parameters)); }
public bool CheckPhone(string phone, string clientSecret, long?clientId = null, bool?authByPhone = null) { var parameters = new VkParameters { { "phone", phone }, { "client_id", clientId }, { "client_secret", clientSecret }, { "auth_by_phone", authByPhone } }; return(_vk.Call("auth.checkPhone", parameters)); }
public VkCollection <Document> Get(int?count = null, int?offset = null, long?ownerId = null, DocFilter?filter = null) { VkErrors.ThrowIfNumberIsNegative(() => count); VkErrors.ThrowIfNumberIsNegative(() => offset); var parameters = new VkParameters { { "count", count }, { "offset", offset }, { "owner_id", ownerId }, { "type", filter } }; return(_vk.Call("docs.get", parameters).ToVkCollectionOf <Document>(r => r)); }
public ReadOnlyCollection <User> Search(out int itemsCount, UserSearchParams @params) { var response = _vk.Call("users.search", @params, true); itemsCount = response["count"]; return(response["items"].ToReadOnlyCollectionOf <User>(r => r)); }
private ReadOnlyCollection <StatsPeriod> Get(DateTime dateFrom, DateTime?dateTo = null, long?groupId = null, long?appId = null) { var parameters = new VkParameters { { "group_id", groupId }, { "app_id", appId }, { "date_from", dateFrom.ToString("yyyy-MM-dd") } }; if (dateTo != null) { parameters.Add("date_to", dateTo.Value.ToString("yyyy-MM-dd")); } var result = _vk.Call("stats.get", parameters); return(result.ToReadOnlyCollectionOf <StatsPeriod>(x => x)); }
public VkCollection <GiftItem> Get(long userId, int?count = null, int?offset = null) { VkErrors.ThrowIfNumberIsNegative(() => userId); var parameters = new VkParameters { { "user_id", userId }, { "count", count }, { "offset", offset } }; return(_vk.Call("gifts.get", parameters).ToVkCollectionOf <GiftItem>(x => x)); }
public ReadOnlyCollection <Document> Get(out int totalCount, int?count = null, int?offset = null, long?ownerId = null, DocFilter?filter = null) { VkErrors.ThrowIfNumberIsNegative(() => count); VkErrors.ThrowIfNumberIsNegative(() => offset); var parameters = new VkParameters { { "count", count }, { "offset", offset }, { "owner_id", ownerId }, { "type", filter } }; var response = _vk.Call("docs.get", parameters); totalCount = response["count"]; VkResponseArray items = response["items"]; return(items.ToReadOnlyCollectionOf <Document>(r => r)); }
public ReadOnlyCollection <App> GetCatalog(out long totalCount, AppGetCatalogParams @params) { var response = _vk.Call("apps.getCatalog", @params, [email protected]); totalCount = response["count"]; return(response["items"].ToReadOnlyCollectionOf <App>(x => x)); }
public ReadOnlyCollection <GiftItem> Get(out int totalCount, long userId, int?count = null, int?offset = null) { VkErrors.ThrowIfNumberIsNegative(() => userId); var parameters = new VkParameters { { "user_id", userId }, { "count", count }, { "offset", offset } }; var response = _vk.Call("gifts.get", parameters); totalCount = response["count"]; return(response["items"].ToReadOnlyCollectionOf <GiftItem>(x => x)); }
public ReadOnlyCollection <User> Get(FriendsGetParams @params) { var response = _vk.Call("friends.get", @params); return(response.ToReadOnlyCollectionOf <User>(x => @params.Fields != null ? x : new User { Id = x })); }
public VkCollection <User> Get(FriendsGetParams @params, bool skipAuthorization = true) { return(_vk.Call("friends.get", @params, skipAuthorization).ToVkCollectionOf(x => @params.Fields != null ? x : new User { Id = x })); }
public ReadOnlyCollection <User> GetUsers(int?count = null, int?offset = null) { VkErrors.ThrowIfNumberIsNegative(() => count); VkErrors.ThrowIfNumberIsNegative(() => offset); var parameters = new VkParameters { { "count", count }, { "offset", offset } }; VkResponseArray response = _vk.Call("fave.getUsers", parameters); return(response.ToReadOnlyCollectionOf <User>(x => x)); }
/// <summary> /// Универсальный метод, который позволяет запускать последовательность других методов, сохраняя и фильтруя промежуточные результаты. /// </summary> /// <param name="code"> /// Код алгоритма в VKScript - формате, похожем на JavaSсript или ActionScript (предполагается совместимость с ECMAScript). /// Алгоритм должен завершаться командой return %выражение%. Операторы должны быть разделены точкой с запятой. /// </param> /// <returns> /// Возвращает данные, запрошенные алгоритмом. /// При работе с методом execute структура ответа в XML ближе к JSON и может незначительно отличаться от стандартного представления других методов. /// </returns> /// <remarks> /// Страница документации ВКонтакте <see href="http://vk.com/dev/execute" />. /// </remarks> public VkResponse Execute(string code) { return(_vk.Call("execute", new VkParameters { { "code", HttpUtility.UrlEncode(code) } })); }
public VkCollection <Market> Get(long ownerId, long?albumId = null, int?count = null, int?offset = null, bool extended = false) { var parameters = new VkParameters { { "owner_id", ownerId }, { "album_id", albumId }, { "count", count }, { "offset", offset }, { "extended", extended } }; return(_vk.Call("market.get", parameters).ToVkCollectionOf <Market>(x => x)); }
public WallGetObject Get(WallGetParams @params, bool skipAuthorization = true) { if (@params.Filter != null && @params.Filter == WallFilter.Suggests && @params.OwnerId >= 0) { throw new ArgumentException("OwnerID must be negative in case filter equal to Suggests", "ownerId"); } return(_vk.Call("wall.get", @params, skipAuthorization)); //, @params.Filter != WallFilter.Suggests && @params.Filter != WallFilter.Postponed); }
/// <summary> /// Возвращает список приложений, доступных для пользователей сайта через каталог приложений. /// </summary> /// <param name="params">Параметры запроса.</param> /// <param name="skipAuthorization">Если <c>true<c/>, то пропустить авторизацию</param> /// <returns> /// После успешного выполнения возвращает общее число найденных приложений и массив объектов приложений. /// </returns> /// <remarks> /// К методу можно делать не более 60 запросов в минуту с одного IP или id. /// Страница документации ВКонтакте <seealso cref="http://vk.com/dev/apps.getCatalog" />. /// </remarks> public VkCollection <App> GetCatalog(AppGetCatalogParams @params, bool skipAuthorization = true) { return(_vk.Call("apps.getCatalog", @params, skipAuthorization).ToVkCollectionOf <App>(x => x)); }
public MessagesGetObject Get(MessagesGetParams @params) { return(_vk.Call("messages.get", @params)); }
public ReadOnlyCollection <Country> GetCountries(bool?needAll = null, List <Iso3166> codes = null, int?count = null, int?offset = null) { VkErrors.ThrowIfNumberIsNegative(() => offset); VkErrors.ThrowIfNumberIsNegative(() => count); var parameters = new VkParameters { { "code", codes }, { "offset", offset }, { "count", count }, { "need_all", needAll } }; return(_vk.Call("database.getCountries", parameters, true).ToReadOnlyCollectionOf <Country>(x => x)); }
public Page Get(PagesGetParams @params) { return(_vk.Call("pages.get", @params)); }
public VkCollection <User> Search(UserSearchParams @params) { return(_vk.Call("users.search", @params, false).ToVkCollectionOf <User>(r => r)); }
public NewsFeed Get(NewsFeedGetParams @params) { var response = _vk.Call("newsfeed.get", @params); var result = new NewsFeed { Items = response["items"].ToReadOnlyCollectionOf <NewsItem>(x => x), Profiles = response["profiles"].ToReadOnlyCollectionOf <User>(x => x), Groups = response["groups"].ToReadOnlyCollectionOf <Group>(x => x), NewOffset = response["new_offset"], NextFrom = response["next_from"] }; return(result); }
public VkCollection <Topic> GetTopics(BoardGetTopicsParams @params, bool skipAuthorization = true) { return(_vk.Call("board.getTopics", @params, skipAuthorization).ToVkCollectionOf <Topic>(x => x)); }
public long GetCount(long ownerId) { var parameters = new VkParameters { { "owner_id", ownerId } }; return(_vk.Call("audio.getCount", parameters)); }
public Counters GetCounters(CountersFilter filter) { return(_vk.Call("account.getCounters", new VkParameters { { "filter", filter } }, false)); }
public bool Join(long?groupId, bool?notSure = null) { var parameters = new VkParameters { { "group_id", groupId }, { "not_sure", notSure } }; return(_vk.Call("groups.join", parameters)); }
public VkCollection <User> GetUsers(int?count = null, int?offset = null) { VkErrors.ThrowIfNumberIsNegative(() => count); VkErrors.ThrowIfNumberIsNegative(() => offset); var parameters = new VkParameters { { "count", count }, { "offset", offset } }; return(_vk.Call("fave.getUsers", parameters).ToVkCollectionOf <User>(x => x)); }