public Task <ApiRequest <PhotosGetCommentsExtendedResponse> > GetCommentsExtended(UserAccessToken accessToken, int?ownerId = null, int?photoId = null, bool?needLikes = null, int?startCommentId = null, int?offset = null, int?count = null, string sort = null, string accessKey = null, bool?extended = null, IEnumerable <string> fields = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["photo_id"] = photoId?.ToString(), ["need_likes"] = RequestHelpers.ParseBoolean(needLikes), ["start_comment_id"] = startCommentId?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["sort"] = sort, ["access_key"] = accessKey, ["extended"] = RequestHelpers.ParseBoolean(extended), ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <PhotosGetCommentsExtendedResponse>("photos.getComments", accessToken, request)); }
public Task <ApiRequest <AuthSignupResponse> > Signup(string firstName = null, string lastName = null, string birthday = null, int?clientId = null, string clientSecret = null, string phone = null, string password = null, bool?testMode = null, bool?voice = null, int?sex = null, string sid = null) { var request = new Dictionary <string, string> { ["first_name"] = firstName, ["last_name"] = lastName, ["birthday"] = birthday, ["client_id"] = clientId?.ToString(), ["client_secret"] = clientSecret, ["phone"] = phone, ["password"] = password, ["test_mode"] = RequestHelpers.ParseBoolean(testMode), ["voice"] = RequestHelpers.ParseBoolean(voice), ["sex"] = sex?.ToString(), ["sid"] = sid, }; return(RequestManager.CreateRequestAsync <AuthSignupResponse>("auth.signup", null, request)); }
public Task <ApiRequest <LikesGetListExtendedResponse> > GetListExtended(UserAccessToken accessToken, string type = null, int?ownerId = null, int?itemId = null, string pageUrl = null, string filter = null, bool?friendsOnly = null, bool?extended = null, int?offset = null, int?count = null, bool?skipOwn = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["type"] = type, ["owner_id"] = ownerId?.ToString(), ["item_id"] = itemId?.ToString(), ["page_url"] = pageUrl, ["filter"] = filter, ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["extended"] = RequestHelpers.ParseBoolean(extended), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["skip_own"] = RequestHelpers.ParseBoolean(skipOwn), }; return(RequestManager.CreateRequestAsync <LikesGetListExtendedResponse>("likes.getList", accessToken, request)); }
public Task <ApiRequest <PhotosGetExtendedResponse> > GetExtended(ServiceAccessToken accessToken, int?ownerId = null, string albumId = null, IEnumerable <string> photoIds = null, bool?rev = null, bool?extended = null, string feedType = null, DateTime?feed = null, bool?photoSizes = null, int?offset = null, int?count = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["album_id"] = albumId, ["photo_ids"] = RequestHelpers.ParseEnumerable(photoIds), ["rev"] = RequestHelpers.ParseBoolean(rev), ["extended"] = RequestHelpers.ParseBoolean(extended), ["feed_type"] = feedType, ["feed"] = RequestHelpers.ParseDateTime(feed), ["photo_sizes"] = RequestHelpers.ParseBoolean(photoSizes), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), }; return(RequestManager.CreateRequestAsync <PhotosGetExtendedResponse>("photos.get", accessToken, request)); }
public Task <ApiRequest <VideoSearchResponse> > Search(UserAccessToken accessToken, string q = null, int?sort = null, int?hd = null, bool?adult = null, IEnumerable <string> filters = null, bool?searchOwn = null, int?offset = null, int?longer = null, int?shorter = null, int?count = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["q"] = q, ["sort"] = sort?.ToString(), ["hd"] = hd?.ToString(), ["adult"] = RequestHelpers.ParseBoolean(adult), ["filters"] = RequestHelpers.ParseEnumerable(filters), ["search_own"] = RequestHelpers.ParseBoolean(searchOwn), ["offset"] = offset?.ToString(), ["longer"] = longer?.ToString(), ["shorter"] = shorter?.ToString(), ["count"] = count?.ToString(), }; return(RequestManager.CreateRequestAsync <VideoSearchResponse>("video.search", accessToken, request)); }
public Task <ApiRequest <AppsGetCatalogResponse> > GetCatalog(string sort = null, int?offset = null, int?count = null, string platform = null, bool?extended = null, bool?returnFriends = null, IEnumerable <string> fields = null, string nameCase = null, string q = null, int?genreId = null, string filter = null) { var request = new Dictionary <string, string> { ["sort"] = sort, ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["platform"] = platform, ["extended"] = RequestHelpers.ParseBoolean(extended), ["return_friends"] = RequestHelpers.ParseBoolean(returnFriends), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["name_case"] = nameCase, ["q"] = q, ["genre_id"] = genreId?.ToString(), ["filter"] = filter, }; return(RequestManager.CreateRequestAsync <AppsGetCatalogResponse>("apps.getCatalog", null, request)); }
public Task <ApiRequest <UsersSearchResponse> > Search(UserAccessToken accessToken, string q = null, int?sort = null, int?offset = null, int?count = null, IEnumerable <string> fields = null, int?city = null, int?country = null, string hometown = null, int?universityCountry = null, int?university = null, int?universityYear = null, int?universityFaculty = null, int?universityChair = null, int?sex = null, int?status = null, int?ageFrom = null, int?ageTo = null, int?birthDay = null, int?birthMonth = null, int?birthYear = null, bool?online = null, bool?hasPhoto = null, int?schoolCountry = null, int?schoolCity = null, int?schoolClass = null, int?school = null, int?schoolYear = null, string religion = null, string interests = null, string company = null, string position = null, int?groupId = null, IEnumerable <string> fromList = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["q"] = q, ["sort"] = sort?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["city"] = city?.ToString(), ["country"] = country?.ToString(), ["hometown"] = hometown, ["university_country"] = universityCountry?.ToString(), ["university"] = university?.ToString(), ["university_year"] = universityYear?.ToString(), ["university_faculty"] = universityFaculty?.ToString(), ["university_chair"] = universityChair?.ToString(), ["sex"] = sex?.ToString(), ["status"] = status?.ToString(), ["age_from"] = ageFrom?.ToString(), ["age_to"] = ageTo?.ToString(), ["birth_day"] = birthDay?.ToString(), ["birth_month"] = birthMonth?.ToString(), ["birth_year"] = birthYear?.ToString(), ["online"] = RequestHelpers.ParseBoolean(online), ["has_photo"] = RequestHelpers.ParseBoolean(hasPhoto), ["school_country"] = schoolCountry?.ToString(), ["school_city"] = schoolCity?.ToString(), ["school_class"] = schoolClass?.ToString(), ["school"] = school?.ToString(), ["school_year"] = schoolYear?.ToString(), ["religion"] = religion, ["interests"] = interests, ["company"] = company, ["position"] = position, ["group_id"] = groupId?.ToString(), ["from_list"] = RequestHelpers.ParseEnumerable(fromList), }; return(RequestManager.CreateRequestAsync <UsersSearchResponse>("users.search", accessToken, request)); }
/// <summary> /// Searches market items in a community's catalog. /// </summary> public Task <ApiRequest <MarketSearchExtendedResponse> > SearchApi(int?ownerId = null, int?albumId = null, string q = null, int?priceFrom = null, int?priceTo = null, IEnumerable <int> tags = null, int?sort = null, int?rev = null, int?offset = null, int?count = null, bool?extended = null, int?status = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["album_id"] = albumId?.ToString(), ["q"] = q, ["price_from"] = priceFrom?.ToString(), ["price_to"] = priceTo?.ToString(), ["tags"] = RequestHelpers.ParseEnumerable(tags), ["sort"] = sort?.ToString(), ["rev"] = rev?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), ["status"] = status?.ToString(), }; return(RequestManager.CreateRequestAsync <MarketSearchExtendedResponse>("market.search", null, request)); }
/// <summary> /// Allows to edit hidden post. /// </summary> public Task <ApiRequest <bool?> > EditAdsStealthApi(int?ownerId = null, int?postId = null, string message = null, IEnumerable <string> attachments = null, bool?signed = null, double?lat = null, double? @long = null, int?placeId = null, string linkButton = null, string linkTitle = null, string linkImage = null, string linkVideo = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["post_id"] = postId?.ToString(), ["message"] = message, ["attachments"] = RequestHelpers.ParseEnumerable(attachments), ["signed"] = RequestHelpers.ParseBoolean(signed), ["lat"] = lat?.ToString(), ["long"] = @long?.ToString(), ["place_id"] = placeId?.ToString(), ["link_button"] = linkButton, ["link_title"] = linkTitle, ["link_image"] = linkImage, ["link_video"] = linkVideo, }; return(RequestManager.CreateRequestAsync <bool?>("wall.editAdsStealth", null, request)); }
public Task <ApiRequest <VideoSaveResult> > Save(UserAccessToken accessToken, string name = null, string description = null, bool?isPrivate = null, bool?wallpost = null, string link = null, int?groupId = null, int?albumId = null, IEnumerable <string> privacyView = null, IEnumerable <string> privacyComment = null, bool?noComments = null, bool?repeat = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["name"] = name, ["description"] = description, ["is_private"] = RequestHelpers.ParseBoolean(isPrivate), ["wallpost"] = RequestHelpers.ParseBoolean(wallpost), ["link"] = link, ["group_id"] = groupId?.ToString(), ["album_id"] = albumId?.ToString(), ["privacy_view"] = RequestHelpers.ParseEnumerable(privacyView), ["privacy_comment"] = RequestHelpers.ParseEnumerable(privacyComment), ["no_comments"] = RequestHelpers.ParseBoolean(noComments), ["repeat"] = RequestHelpers.ParseBoolean(repeat), }; return(RequestManager.CreateRequestAsync <VideoSaveResult>("video.save", accessToken, request)); }
/// <summary> /// Returns a list of comments on a post on a user wall or community wall. /// </summary> public Task <ApiRequest <WallGetCommentsExtendedResponse> > GetCommentsApi(int?ownerId = null, int?postId = null, bool?needLikes = null, int?startCommentId = null, int?offset = null, int?count = null, string sort = null, int?previewLength = null, bool?extended = null, IEnumerable <BaseUserGroupFields> fields = null, int?commentId = null, int?threadItemsCount = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["post_id"] = postId?.ToString(), ["need_likes"] = RequestHelpers.ParseBoolean(needLikes), ["start_comment_id"] = startCommentId?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["sort"] = sort, ["preview_length"] = previewLength?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["comment_id"] = commentId?.ToString(), ["thread_items_count"] = threadItemsCount?.ToString(), }; return(RequestManager.CreateRequestAsync <WallGetCommentsExtendedResponse>("wall.getComments", null, request)); }
/// <summary> /// Returns updates in user's private messages. /// </summary> public Task <ApiRequest <MessagesGetLongPollHistoryResponse> > GetLongPollHistoryApi(int?ts = null, int?pts = null, int?previewLength = null, bool?onlines = null, IEnumerable <UsersFields> fields = null, int?eventsLimit = null, int?msgsLimit = null, int?maxMsgId = null, int?groupId = null, int?lpVersion = null, int?lastN = null, bool?credentials = null) { var request = new Dictionary <string, string> { ["ts"] = ts?.ToString(), ["pts"] = pts?.ToString(), ["preview_length"] = previewLength?.ToString(), ["onlines"] = RequestHelpers.ParseBoolean(onlines), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["events_limit"] = eventsLimit?.ToString(), ["msgs_limit"] = msgsLimit?.ToString(), ["max_msg_id"] = maxMsgId?.ToString(), ["group_id"] = groupId?.ToString(), ["lp_version"] = lpVersion?.ToString(), ["last_n"] = lastN?.ToString(), ["credentials"] = RequestHelpers.ParseBoolean(credentials), }; return(RequestManager.CreateRequestAsync <MessagesGetLongPollHistoryResponse>("messages.getLongPollHistory", null, request)); }
public Task <ApiRequest <GroupsAddress> > AddAddressApi(int?groupId = null, string title = null, string address = null, string additionalAddress = null, int?countryId = null, int?cityId = null, int?metroId = null, double?latitude = null, double?longitude = null, string phone = null, string workInfoStatus = null, string timetable = null, bool?isMainAddress = null) { var request = new Dictionary <string, string> { ["group_id"] = groupId?.ToString(), ["title"] = title, ["address"] = address, ["additional_address"] = additionalAddress, ["country_id"] = countryId?.ToString(), ["city_id"] = cityId?.ToString(), ["metro_id"] = metroId?.ToString(), ["latitude"] = latitude?.ToString(), ["longitude"] = longitude?.ToString(), ["phone"] = phone, ["work_info_status"] = workInfoStatus, ["timetable"] = timetable, ["is_main_address"] = RequestHelpers.ParseBoolean(isMainAddress), }; return(RequestManager.CreateRequestAsync <GroupsAddress>("groups.addAddress", null, request)); }
public Task <ApiRequest <bool?> > Edit(UserAccessToken accessToken, int?ownerId, int?postId, bool?friendsOnly, string message, IEnumerable <string> attachments, string services, bool?signed, DateTime?publishDate, double?lat, double? @long, int?placeId, bool?markAsAds) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["post_id"] = postId?.ToString(), ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["message"] = message, ["attachments"] = RequestHelpers.ParseEnumerable(attachments), ["services"] = services, ["signed"] = RequestHelpers.ParseBoolean(signed), ["publish_date"] = RequestHelpers.ParseDateTime(publishDate), ["lat"] = lat?.ToString(), ["long"] = @long?.ToString(), ["place_id"] = placeId?.ToString(), ["mark_as_ads"] = RequestHelpers.ParseBoolean(markAsAds), }; return(RequestManager.CreateRequestAsync <bool?>("wall.edit", accessToken, request)); }
public Task <ApiRequest <IEnumerable <SearchHint> > > GetHints( UserAccessToken accessToken, string q, int?offset, int?limit, IEnumerable <string> filters, IEnumerable <string> fields, bool?searchGlobal) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["q"] = q, ["offset"] = offset?.ToString(), ["limit"] = limit?.ToString(), ["filters"] = RequestHelpers.ParseEnumerable(filters), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["search_global"] = RequestHelpers.ParseBoolean(searchGlobal), }; return(RequestManager.CreateRequestAsync <IEnumerable <SearchHint> >("search.getHints", accessToken, request)); }
public Task <ApiRequest <WallGetResponse> > Get( UserAccessToken accessToken, int?ownerId, string domain, int?offset, int?count, string filter, IEnumerable <string> fields) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["domain"] = domain, ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["filter"] = filter, ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <WallGetResponse>("wall.get", accessToken, request)); }
public Task <ApiRequest <FriendsGetRequestsResponse> > GetRequests( UserAccessToken accessToken, int?offset, int?count, bool? @out, int?sort, bool?needViewed, bool?suggested) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["out"] = RequestHelpers.ParseBoolean(@out), ["sort"] = sort?.ToString(), ["need_viewed"] = RequestHelpers.ParseBoolean(needViewed), ["suggested"] = RequestHelpers.ParseBoolean(suggested), }; return(RequestManager.CreateRequestAsync <FriendsGetRequestsResponse>("friends.getRequests", accessToken, request)); }
/// <summary> /// Edits a post on a user wall or community wall. /// </summary> public Task <ApiRequest <WallEditResponse> > EditApi(int?ownerId = null, int?postId = null, bool?friendsOnly = null, string message = null, IEnumerable <string> attachments = null, string services = null, bool?signed = null, int?publishDate = null, double?lat = null, double? @long = null, int?placeId = null, bool?markAsAds = null, bool?closeComments = null, int?posterBkgId = null, int?posterBkgOwnerId = null, string posterBkgAccessHash = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["post_id"] = postId?.ToString(), ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["message"] = message, ["attachments"] = RequestHelpers.ParseEnumerable(attachments), ["services"] = services, ["signed"] = RequestHelpers.ParseBoolean(signed), ["publish_date"] = publishDate?.ToString(), ["lat"] = lat?.ToString(), ["long"] = @long?.ToString(), ["place_id"] = placeId?.ToString(), ["mark_as_ads"] = RequestHelpers.ParseBoolean(markAsAds), ["close_comments"] = RequestHelpers.ParseBoolean(closeComments), ["poster_bkg_id"] = posterBkgId?.ToString(), ["poster_bkg_owner_id"] = posterBkgOwnerId?.ToString(), ["poster_bkg_access_hash"] = posterBkgAccessHash, }; return(RequestManager.CreateRequestAsync <WallEditResponse>("wall.edit", null, request)); }
/// <summary> /// Adds a new post on a user wall or community wall. Can also be used to publish suggested or scheduled posts. /// </summary> public Task <ApiRequest <WallPostResponse> > PostApi(int?ownerId = null, bool?friendsOnly = null, bool?fromGroup = null, string message = null, IEnumerable <string> attachments = null, string services = null, bool?signed = null, int?publishDate = null, double?lat = null, double? @long = null, int?placeId = null, int?postId = null, string guid = null, bool?markAsAds = null, bool?closeComments = null, bool?muteNotifications = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["from_group"] = RequestHelpers.ParseBoolean(fromGroup), ["message"] = message, ["attachments"] = RequestHelpers.ParseEnumerable(attachments), ["services"] = services, ["signed"] = RequestHelpers.ParseBoolean(signed), ["publish_date"] = publishDate?.ToString(), ["lat"] = lat?.ToString(), ["long"] = @long?.ToString(), ["place_id"] = placeId?.ToString(), ["post_id"] = postId?.ToString(), ["guid"] = guid, ["mark_as_ads"] = RequestHelpers.ParseBoolean(markAsAds), ["close_comments"] = RequestHelpers.ParseBoolean(closeComments), ["mute_notifications"] = RequestHelpers.ParseBoolean(muteNotifications), }; return(RequestManager.CreateRequestAsync <WallPostResponse>("wall.post", null, request)); }
public Task <ApiRequest <int?> > Send( GroupAccessToken accessToken, int?userId, int?randomId, int?peerId, string domain, int?chatId, IEnumerable <int?> userIds, string message, double?lat, double? @long, string attachment, string forwardMessages, int?stickerId, bool?notification) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["user_id"] = userId?.ToString(), ["random_id"] = randomId?.ToString(), ["peer_id"] = peerId?.ToString(), ["domain"] = domain, ["chat_id"] = chatId?.ToString(), ["user_ids"] = RequestHelpers.ParseEnumerable(userIds), ["message"] = message, ["lat"] = lat?.ToString(), ["long"] = @long?.ToString(), ["attachment"] = attachment, ["forward_messages"] = forwardMessages, ["sticker_id"] = stickerId?.ToString(), ["notification"] = RequestHelpers.ParseBoolean(notification), }; return(RequestManager.CreateRequestAsync <int?>("messages.send", accessToken, request)); }