/// <summary> /// Adds a new comment on the photo. /// </summary> public Task <ApiRequest <int?> > CreateCommentApi(int?ownerId = null, int?photoId = null, string message = null, IEnumerable <string> attachments = null, bool?fromGroup = null, int?replyToComment = null, int?stickerId = null, string accessKey = null, string guid = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["photo_id"] = photoId?.ToString(), ["message"] = message, ["attachments"] = RequestHelpers.ParseEnumerable(attachments), ["from_group"] = RequestHelpers.ParseBoolean(fromGroup), ["reply_to_comment"] = replyToComment?.ToString(), ["sticker_id"] = stickerId?.ToString(), ["access_key"] = accessKey, ["guid"] = guid, }; return(RequestManager.CreateRequestAsync <int?>("photos.createComment", null, request)); }
public Task <ApiRequest <MessagesGetLongPollHistoryResponse> > GetLongPollHistory(GroupAccessToken accessToken, int?ts, int?pts, int?previewLength, bool?onlines, IEnumerable <string> fields, int?eventsLimit, int?msgsLimit, int?maxMsgId) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["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(), }; return(RequestManager.CreateRequestAsync <MessagesGetLongPollHistoryResponse>("messages.getLongPollHistory", accessToken, request)); }
public Task <ApiRequest <WallSearchExtendedResponse> > SearchExtended(ServiceAccessToken accessToken, int?ownerId, string domain, string query, bool?ownersOnly, int?count, int?offset, bool?extended, IEnumerable <string> fields) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["domain"] = domain, ["query"] = query, ["owners_only"] = RequestHelpers.ParseBoolean(ownersOnly), ["count"] = count?.ToString(), ["offset"] = offset?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <WallSearchExtendedResponse>("wall.search", accessToken, request)); }
/// <summary> /// Returns a list of the current user's private messages that match search criteria. /// </summary> public Task <ApiRequest <MessagesSearchResponse> > SearchApi(string q = null, int?peerId = null, int?date = null, int?previewLength = null, int?offset = null, int?count = null, bool?extended = null, IEnumerable <string> fields = null, int?groupId = null) { var request = new Dictionary <string, string> { ["q"] = q, ["peer_id"] = peerId?.ToString(), ["date"] = date?.ToString(), ["preview_length"] = previewLength?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["group_id"] = groupId?.ToString(), }; return(RequestManager.CreateRequestAsync <MessagesSearchResponse>("messages.search", null, request)); }
/// <summary> /// Returns statistics of a community or an application. /// </summary> public Task <ApiRequest <IEnumerable <StatsPeriod> > > GetApi(int?groupId = null, int?appId = null, int?timestampFrom = null, int?timestampTo = null, string interval = null, int?intervalsCount = null, IEnumerable <string> filters = null, IEnumerable <string> statsGroups = null, bool?extended = null) { var request = new Dictionary <string, string> { ["group_id"] = groupId?.ToString(), ["app_id"] = appId?.ToString(), ["timestamp_from"] = timestampFrom?.ToString(), ["timestamp_to"] = timestampTo?.ToString(), ["interval"] = interval, ["intervals_count"] = intervalsCount?.ToString(), ["filters"] = RequestHelpers.ParseEnumerable(filters), ["stats_groups"] = RequestHelpers.ParseEnumerable(statsGroups), ["extended"] = RequestHelpers.ParseBoolean(extended), }; return(RequestManager.CreateRequestAsync <IEnumerable <StatsPeriod> >("stats.get", null, request)); }
/// <summary> /// Returns message history for the specified user or group chat. /// </summary> public Task <ApiRequest <MessagesGetHistoryResponse> > GetHistoryApi(int?offset = null, int?count = null, int?userId = null, int?peerId = null, int?startMessageId = null, int?rev = null, bool?extended = null, IEnumerable <UsersFields> fields = null, int?groupId = null) { var request = new Dictionary <string, string> { ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["user_id"] = userId?.ToString(), ["peer_id"] = peerId?.ToString(), ["start_message_id"] = startMessageId?.ToString(), ["rev"] = rev?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["group_id"] = groupId?.ToString(), }; return(RequestManager.CreateRequestAsync <MessagesGetHistoryResponse>("messages.getHistory", null, request)); }
/// <summary> /// Returns media files from the dialog or group chat. /// </summary> public Task <ApiRequest <MessagesGetHistoryAttachmentsResponse> > GetHistoryAttachmentsApi(int?peerId = null, string mediaType = null, string startFrom = null, int?count = null, bool?photoSizes = null, IEnumerable <UsersFields> fields = null, int?groupId = null, bool?preserveOrder = null, int?maxForwardsLevel = null) { var request = new Dictionary <string, string> { ["peer_id"] = peerId?.ToString(), ["media_type"] = mediaType, ["start_from"] = startFrom, ["count"] = count?.ToString(), ["photo_sizes"] = RequestHelpers.ParseBoolean(photoSizes), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["group_id"] = groupId?.ToString(), ["preserve_order"] = RequestHelpers.ParseBoolean(preserveOrder), ["max_forwards_level"] = maxForwardsLevel?.ToString(), }; return(RequestManager.CreateRequestAsync <MessagesGetHistoryAttachmentsResponse>("messages.getHistoryAttachments", null, request)); }
public Task <ApiRequest <LikesGetListResponse> > GetList(string type = null, int?ownerId = null, int?itemId = null, string pageUrl = null, string filter = null, bool?friendsOnly = null, int?offset = null, int?count = null, bool?skipOwn = null) { var request = new Dictionary <string, string> { ["type"] = type, ["owner_id"] = ownerId?.ToString(), ["item_id"] = itemId?.ToString(), ["page_url"] = pageUrl, ["filter"] = filter, ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["skip_own"] = RequestHelpers.ParseBoolean(skipOwn), }; return(RequestManager.CreateRequestAsync <LikesGetListResponse>("likes.getList", null, request)); }
/// <summary> /// Returns a list of IDs of users who selected specific answers in the poll. /// </summary> public Task <ApiRequest <IEnumerable <PollsVoters> > > GetVotersApi(int?ownerId = null, int?pollId = null, IEnumerable <int> answerIds = null, bool?isBoard = null, bool?friendsOnly = null, int?offset = null, int?count = null, IEnumerable <UsersFields> fields = null, string nameCase = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["poll_id"] = pollId?.ToString(), ["answer_ids"] = RequestHelpers.ParseEnumerable(answerIds), ["is_board"] = RequestHelpers.ParseBoolean(isBoard), ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["name_case"] = nameCase, }; return(RequestManager.CreateRequestAsync <IEnumerable <PollsVoters> >("polls.getVoters", null, request)); }
/// <summary> /// Returns comments list for an item. /// </summary> public Task <ApiRequest <MarketGetCommentsResponse> > GetCommentsApi(int?ownerId = null, int?itemId = null, bool?needLikes = null, int?startCommentId = null, int?offset = null, int?count = null, string sort = null, bool?extended = null, IEnumerable <UsersFields> fields = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["item_id"] = itemId?.ToString(), ["need_likes"] = RequestHelpers.ParseBoolean(needLikes), ["start_comment_id"] = startCommentId?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["sort"] = sort, ["extended"] = RequestHelpers.ParseBoolean(extended), ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <MarketGetCommentsResponse>("market.getComments", null, request)); }
public Task <ApiRequest <WallGetCommentsResponse> > GetComments(ServiceAccessToken accessToken, int?ownerId, int?postId, bool?needLikes, int?startCommentId, int?offset, int?count, string sort, int?previewLength) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["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(), }; return(RequestManager.CreateRequestAsync <WallGetCommentsResponse>("wall.getComments", accessToken, request)); }
public Task <ApiRequest <WallGetCommentsExtendedResponse> > GetCommentsExtended(int?ownerId, int?postId, bool?needLikes, int?startCommentId, int?offset, int?count, string sort, int?previewLength, bool?extended) { 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), }; return(RequestManager.CreateRequestAsync <WallGetCommentsExtendedResponse>("wall.getComments", null, request)); }
public Task <ApiRequest <PlacesGetCheckinsResponse> > GetCheckins(UserAccessToken accessToken, double?latitude = null, double?longitude = null, int?place = null, int?userId = null, DateTime?offset = null, DateTime?count = null, DateTime?timestamp = null, bool?friendsOnly = null, bool?needPlaces = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["latitude"] = latitude?.ToString(), ["longitude"] = longitude?.ToString(), ["place"] = place?.ToString(), ["user_id"] = userId?.ToString(), ["offset"] = RequestHelpers.ParseDateTime(offset), ["count"] = RequestHelpers.ParseDateTime(count), ["timestamp"] = RequestHelpers.ParseDateTime(timestamp), ["friends_only"] = RequestHelpers.ParseBoolean(friendsOnly), ["need_places"] = RequestHelpers.ParseBoolean(needPlaces), }; return(RequestManager.CreateRequestAsync <PlacesGetCheckinsResponse>("places.getCheckins", accessToken, request)); }
/// <summary> /// Returns information about the current user's incoming and outgoing friend requests. /// </summary> public Task <ApiRequest <FriendsGetRequestsExtendedResponse> > GetRequestsApi(int?offset = null, int?count = null, bool?extended = null, bool?needMutual = null, bool? @out = null, int?sort = null, bool?needViewed = null, bool?suggested = null, string @ref = null, IEnumerable <UsersFields> fields = null) { var request = new Dictionary <string, string> { ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), ["need_mutual"] = RequestHelpers.ParseBoolean(needMutual), ["out"] = RequestHelpers.ParseBoolean(@out), ["sort"] = sort?.ToString(), ["need_viewed"] = RequestHelpers.ParseBoolean(needViewed), ["suggested"] = RequestHelpers.ParseBoolean(suggested), ["ref"] = @ref, ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <FriendsGetRequestsExtendedResponse>("friends.getRequests", null, request)); }
/// <summary> /// Edits the message. /// </summary> public Task <ApiRequest <bool?> > EditApi(int?peerId = null, string message = null, int?messageId = null, double?lat = null, double? @long = null, string attachment = null, bool?keepForwardMessages = null, bool?keepSnippets = null, int?groupId = null, bool?dontParseLinks = null) { var request = new Dictionary <string, string> { ["peer_id"] = peerId?.ToString(), ["message"] = message, ["message_id"] = messageId?.ToString(), ["lat"] = lat?.ToString(), ["long"] = @long?.ToString(), ["attachment"] = attachment, ["keep_forward_messages"] = RequestHelpers.ParseBoolean(keepForwardMessages), ["keep_snippets"] = RequestHelpers.ParseBoolean(keepSnippets), ["group_id"] = groupId?.ToString(), ["dont_parse_links"] = RequestHelpers.ParseBoolean(dontParseLinks), }; return(RequestManager.CreateRequestAsync <bool?>("messages.edit", null, request)); }
/// <summary> /// Ads a new item to the market. /// </summary> public Task <ApiRequest <MarketAddResponse> > AddApi(int?ownerId = null, string name = null, string description = null, int?categoryId = null, double?price = null, double?oldPrice = null, bool?deleted = null, int?mainPhotoId = null, IEnumerable <int> photoIds = null, string url = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["name"] = name, ["description"] = description, ["category_id"] = categoryId?.ToString(), ["price"] = price?.ToString(), ["old_price"] = oldPrice?.ToString(), ["deleted"] = RequestHelpers.ParseBoolean(deleted), ["main_photo_id"] = mainPhotoId?.ToString(), ["photo_ids"] = RequestHelpers.ParseEnumerable(photoIds), ["url"] = url, }; return(RequestManager.CreateRequestAsync <MarketAddResponse>("market.add", null, request)); }
public Task <ApiRequest <MarketSearchExtendedResponse> > SearchExtended(UserAccessToken accessToken, int?ownerId = null, string q = null, int?priceFrom = null, int?priceTo = null, IEnumerable <int?> tags = null, int?rev = null, int?offset = null, int?count = null, bool?extended = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["q"] = q, ["price_from"] = priceFrom?.ToString(), ["price_to"] = priceTo?.ToString(), ["tags"] = RequestHelpers.ParseEnumerable(tags), ["rev"] = rev?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), }; return(RequestManager.CreateRequestAsync <MarketSearchExtendedResponse>("market.search", accessToken, request)); }
public Task <ApiRequest <bool?> > Edit(UserAccessToken accessToken, int?ownerId = null, int?itemId = null, string name = null, string description = null, int?categoryId = null, double?price = null, bool?deleted = null, int?mainPhotoId = null, IEnumerable <int?> photoIds = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["item_id"] = itemId?.ToString(), ["name"] = name, ["description"] = description, ["category_id"] = categoryId?.ToString(), ["price"] = price?.ToString(), ["deleted"] = RequestHelpers.ParseBoolean(deleted), ["main_photo_id"] = mainPhotoId?.ToString(), ["photo_ids"] = RequestHelpers.ParseEnumerable(photoIds), }; return(RequestManager.CreateRequestAsync <bool?>("market.edit", accessToken, request)); }
/// <summary> /// Returns a list of a user's or community's photos. /// </summary> public Task <ApiRequest <PhotosGetExtendedResponse> > GetApi(int?ownerId = null, string albumId = null, IEnumerable <string> photoIds = null, bool?rev = null, bool?extended = null, string feedType = null, int?feed = null, bool?photoSizes = null, int?offset = null, int?count = null) { var request = new Dictionary <string, string> { ["owner_id"] = ownerId?.ToString(), ["album_id"] = albumId, ["photo_ids"] = RequestHelpers.ParseEnumerable(photoIds), ["rev"] = RequestHelpers.ParseBoolean(rev), ["extended"] = RequestHelpers.ParseBoolean(extended), ["feed_type"] = feedType, ["feed"] = feed?.ToString(), ["photo_sizes"] = RequestHelpers.ParseBoolean(photoSizes), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), }; return(RequestManager.CreateRequestAsync <PhotosGetExtendedResponse>("photos.get", null, request)); }
public Task <ApiRequest <NewsfeedGetResponse> > Get(UserAccessToken accessToken, IEnumerable <string> filters, bool?returnBanned, DateTime?startTime, DateTime?endTime, int?maxPhotos, IEnumerable <string> sourceIds, string startFrom, int?count, IEnumerable <string> fields) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["filters"] = RequestHelpers.ParseEnumerable(filters), ["return_banned"] = RequestHelpers.ParseBoolean(returnBanned), ["start_time"] = RequestHelpers.ParseDateTime(startTime), ["end_time"] = RequestHelpers.ParseDateTime(endTime), ["max_photos"] = maxPhotos?.ToString(), ["source_ids"] = RequestHelpers.ParseEnumerable(sourceIds), ["start_from"] = startFrom, ["count"] = count?.ToString(), ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <NewsfeedGetResponse>("newsfeed.get", accessToken, request)); }
/// <summary> /// Returns data required to show newsfeed for the current user. /// </summary> public Task <ApiRequest <NewsfeedGetResponse> > GetApi(IEnumerable <NewsfeedFilters> filters = null, bool?returnBanned = null, int?startTime = null, int?endTime = null, int?maxPhotos = null, string sourceIds = null, string startFrom = null, int?count = null, IEnumerable <BaseUserGroupFields> fields = null, string section = null) { var request = new Dictionary <string, string> { ["filters"] = RequestHelpers.ParseEnumerable(filters), ["return_banned"] = RequestHelpers.ParseBoolean(returnBanned), ["start_time"] = startTime?.ToString(), ["end_time"] = endTime?.ToString(), ["max_photos"] = maxPhotos?.ToString(), ["source_ids"] = sourceIds, ["start_from"] = startFrom, ["count"] = count?.ToString(), ["fields"] = RequestHelpers.ParseEnumerable(fields), ["section"] = section, }; return(RequestManager.CreateRequestAsync <NewsfeedGetResponse>("newsfeed.get", null, request)); }
public Task <ApiRequest <NewsfeedSearchExtendedResponse> > SearchExtended(ServiceAccessToken accessToken, string q, bool?extended, int?count, double?latitude, double?longitude, DateTime?startTime, DateTime?endTime, string startFrom, IEnumerable <string> fields) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["q"] = q, ["extended"] = RequestHelpers.ParseBoolean(extended), ["count"] = count?.ToString(), ["latitude"] = latitude?.ToString(), ["longitude"] = longitude?.ToString(), ["start_time"] = RequestHelpers.ParseDateTime(startTime), ["end_time"] = RequestHelpers.ParseDateTime(endTime), ["start_from"] = startFrom, ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <NewsfeedSearchExtendedResponse>("newsfeed.search", accessToken, request)); }
public Task <ApiRequest <PhotosGetResponse> > Get(UserAccessToken accessToken, int?ownerId = null, string albumId = null, IEnumerable <string> photoIds = null, bool?rev = 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), ["feed_type"] = feedType, ["feed"] = RequestHelpers.ParseDateTime(feed), ["photo_sizes"] = RequestHelpers.ParseBoolean(photoSizes), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), }; return(RequestManager.CreateRequestAsync <PhotosGetResponse>("photos.get", accessToken, request)); }
public Task <ApiRequest <PhotosGetCommentsResponse> > GetComments(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, 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, ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <PhotosGetCommentsResponse>("photos.getComments", 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 <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 <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 <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)); }
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> /// 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)); }