public Task <ApiRequest <string> > Get(UserAccessToken accessToken, string key = null, IEnumerable <string> keys = null, int?userId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["key"] = key, ["keys"] = RequestHelpers.ParseEnumerable(keys), ["user_id"] = userId?.ToString(), }; return(RequestManager.CreateRequestAsync <string>("storage.get", accessToken, request)); }
public Task <ApiRequest <int?> > Copy(UserAccessToken accessToken, int?ownerId = null, int?photoId = null, string accessKey = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["photo_id"] = photoId?.ToString(), ["access_key"] = accessKey, }; return(RequestManager.CreateRequestAsync <int?>("photos.copy", accessToken, request)); }
public Task <ApiRequest <IEnumerable <OrdersOrder> > > GetById(UserAccessToken accessToken, int?orderId = null, IEnumerable <int?> orderIds = null, bool?testMode = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["order_id"] = orderId?.ToString(), ["order_ids"] = RequestHelpers.ParseEnumerable(orderIds), ["test_mode"] = RequestHelpers.ParseBoolean(testMode), }; return(RequestManager.CreateRequestAsync <IEnumerable <OrdersOrder> >("orders.getById", accessToken, request)); }
public Task <ApiRequest <IEnumerable <PhotosPhotoFull> > > GetByIdExtended(UserAccessToken accessToken, IEnumerable <string> photos = null, bool?extended = null, bool?photoSizes = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["photos"] = RequestHelpers.ParseEnumerable(photos), ["extended"] = RequestHelpers.ParseBoolean(extended), ["photo_sizes"] = RequestHelpers.ParseBoolean(photoSizes), }; return(RequestManager.CreateRequestAsync <IEnumerable <PhotosPhotoFull> >("photos.getById", accessToken, request)); }
public Task <ApiRequest <IEnumerable <PhotosPhoto> > > SaveMessagesPhoto(UserAccessToken accessToken, string photo = null, int?server = null, string hash = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["photo"] = photo, ["server"] = server?.ToString(), ["hash"] = hash, }; return(RequestManager.CreateRequestAsync <IEnumerable <PhotosPhoto> >("photos.saveMessagesPhoto", accessToken, request)); }
public Task <ApiRequest <IEnumerable <MessagesChat> > > GetChatChatIds(UserAccessToken accessToken, int?chatId, IEnumerable <int?> chatIds, string nameCase) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["chat_id"] = chatId?.ToString(), ["chat_ids"] = RequestHelpers.ParseEnumerable(chatIds), ["name_case"] = nameCase, }; return(RequestManager.CreateRequestAsync <IEnumerable <MessagesChat> >("messages.getChat", accessToken, request)); }
public Task <ApiRequest <IEnumerable <string> > > SearchDialogs(UserAccessToken accessToken, string q, int?limit, IEnumerable <string> fields) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["q"] = q, ["limit"] = limit?.ToString(), ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <IEnumerable <string> >("messages.searchDialogs", accessToken, request)); }
public Task <ApiRequest <LikesDeleteResponse> > Delete(UserAccessToken accessToken, string type = null, int?ownerId = null, int?itemId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["type"] = type, ["owner_id"] = ownerId?.ToString(), ["item_id"] = itemId?.ToString(), }; return(RequestManager.CreateRequestAsync <LikesDeleteResponse>("likes.delete", accessToken, request)); }
public Task <ApiRequest <IEnumerable <PagesWikipageVersion> > > GetHistory(UserAccessToken accessToken, int?pageId = null, int?groupId = null, int?userId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["page_id"] = pageId?.ToString(), ["group_id"] = groupId?.ToString(), ["user_id"] = userId?.ToString(), }; return(RequestManager.CreateRequestAsync <IEnumerable <PagesWikipageVersion> >("pages.getHistory", accessToken, request)); }
public Task <ApiRequest <IEnumerable <AdsTargetGroup> > > GetTargetGroups(UserAccessToken accessToken, int?accountId = null, int?clientId = null, bool?extended = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["account_id"] = accountId?.ToString(), ["client_id"] = clientId?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), }; return(RequestManager.CreateRequestAsync <IEnumerable <AdsTargetGroup> >("ads.getTargetGroups", accessToken, request)); }
public Task <ApiRequest <int?> > Add(UserAccessToken accessToken, int?userId = null, string text = null, bool?follow = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["user_id"] = userId?.ToString(), ["text"] = text, ["follow"] = RequestHelpers.ParseBoolean(follow), }; return(RequestManager.CreateRequestAsync <int?>("friends.add", accessToken, request)); }
public Task <ApiRequest <bool?> > DeleteTargetGroup(UserAccessToken accessToken, int?accountId = null, int?clientId = null, int?targetGroupId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["account_id"] = accountId?.ToString(), ["client_id"] = clientId?.ToString(), ["target_group_id"] = targetGroupId?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("ads.deleteTargetGroup", accessToken, request)); }
public Task <ApiRequest <AppsGetFriendsListResponse> > GetFriendsList(UserAccessToken accessToken, int?count = null, string type = null, IEnumerable <string> fields = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["count"] = count?.ToString(), ["type"] = type, ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <AppsGetFriendsListResponse>("apps.getFriendsList", accessToken, request)); }
public Task <ApiRequest <PollsPoll> > GetById(UserAccessToken accessToken, int?ownerId = null, bool?isBoard = null, int?pollId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["is_board"] = RequestHelpers.ParseBoolean(isBoard), ["poll_id"] = pollId?.ToString(), }; return(RequestManager.CreateRequestAsync <PollsPoll>("polls.getById", accessToken, request)); }
public Task <ApiRequest <bool?> > ReportPost(UserAccessToken accessToken, int?ownerId, int?postId, int?reason) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["post_id"] = postId?.ToString(), ["reason"] = reason?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("wall.reportPost", accessToken, request)); }
public Task <ApiRequest <LeadsComplete> > Complete(UserAccessToken accessToken, string vkSid = null, string secret = null, string comment = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["vk_sid"] = vkSid, ["secret"] = secret, ["comment"] = comment, }; return(RequestManager.CreateRequestAsync <LeadsComplete>("leads.complete", accessToken, request)); }
public Task <ApiRequest <bool?> > MarkAsRead(UserAccessToken accessToken, IEnumerable <int?> messageIds, string peerId, int?startMessageId) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["message_ids"] = RequestHelpers.ParseEnumerable(messageIds), ["peer_id"] = peerId, ["start_message_id"] = startMessageId?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("messages.markAsRead", accessToken, request)); }
public Task <ApiRequest <DocsAddResponse> > Add(UserAccessToken accessToken, int?ownerId = null, int?docId = null, string accessKey = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["doc_id"] = docId?.ToString(), ["access_key"] = accessKey, }; return(RequestManager.CreateRequestAsync <DocsAddResponse>("docs.add", accessToken, request)); }
public Task <ApiRequest <bool?> > SetActivity(UserAccessToken accessToken, string userId, string type, int?peerId) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["user_id"] = userId, ["type"] = type, ["peer_id"] = peerId?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("messages.setActivity", accessToken, request)); }
public Task <ApiRequest <DocsSearchResponse> > Search(UserAccessToken accessToken, string q = null, int?count = null, int?offset = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["q"] = q, ["count"] = count?.ToString(), ["offset"] = offset?.ToString(), }; return(RequestManager.CreateRequestAsync <DocsSearchResponse>("docs.search", accessToken, request)); }
public Task <ApiRequest <DatabaseGetChairsResponse> > GetChairs(UserAccessToken accessToken, int?facultyId = null, int?offset = null, int?count = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["faculty_id"] = facultyId?.ToString(), ["offset"] = offset?.ToString(), ["count"] = count?.ToString(), }; return(RequestManager.CreateRequestAsync <DatabaseGetChairsResponse>("database.getChairs", accessToken, request)); }
public Task <ApiRequest <IEnumerable <DocsDoc> > > Save(UserAccessToken accessToken, string file = null, string title = null, string tags = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["file"] = file, ["title"] = title, ["tags"] = tags, }; return(RequestManager.CreateRequestAsync <IEnumerable <DocsDoc> >("docs.save", accessToken, request)); }
public Task <ApiRequest <PhotosSaveOwnerPhotoResponse> > SaveOwnerPhoto(UserAccessToken accessToken, string server = null, string hash = null, string photo = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["server"] = server, ["hash"] = hash, ["photo"] = photo, }; return(RequestManager.CreateRequestAsync <PhotosSaveOwnerPhotoResponse>("photos.saveOwnerPhoto", accessToken, request)); }
public Task <ApiRequest <DocsGetResponse> > Get(UserAccessToken accessToken, int?count = null, int?offset = null, int?ownerId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["count"] = count?.ToString(), ["offset"] = offset?.ToString(), ["owner_id"] = ownerId?.ToString(), }; return(RequestManager.CreateRequestAsync <DocsGetResponse>("docs.get", accessToken, request)); }
public Task <ApiRequest <bool?> > ReportComment(UserAccessToken accessToken, int?ownerId = null, int?commentId = null, int?reason = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["comment_id"] = commentId?.ToString(), ["reason"] = reason?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("photos.reportComment", accessToken, request)); }
public Task <ApiRequest <IEnumerable <WallWallpostFull> > > GetById(UserAccessToken accessToken, IEnumerable <string> posts, int?copyHistoryDepth, IEnumerable <string> fields) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["posts"] = RequestHelpers.ParseEnumerable(posts), ["copy_history_depth"] = copyHistoryDepth?.ToString(), ["fields"] = RequestHelpers.ParseEnumerable(fields), }; return(RequestManager.CreateRequestAsync <IEnumerable <WallWallpostFull> >("wall.getById", accessToken, request)); }
public Task <ApiRequest <bool?> > Set(UserAccessToken accessToken, string key = null, string value = null, int?userId = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["key"] = key, ["value"] = value, ["user_id"] = userId?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("storage.set", accessToken, request)); }
public Task <ApiRequest <bool?> > ReorderAlbums(UserAccessToken accessToken, int?ownerId = null, int?albumId = null, int?before = null, int?after = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["album_id"] = albumId?.ToString(), ["before"] = before?.ToString(), ["after"] = after?.ToString(), }; return(RequestManager.CreateRequestAsync <bool?>("market.reorderAlbums", accessToken, request)); }
public Task <ApiRequest <MarketAddAlbumResponse> > AddAlbum(UserAccessToken accessToken, int?ownerId = null, string title = null, int?photoId = null, bool?mainAlbum = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["title"] = title, ["photo_id"] = photoId?.ToString(), ["main_album"] = RequestHelpers.ParseBoolean(mainAlbum), }; return(RequestManager.CreateRequestAsync <MarketAddAlbumResponse>("market.addAlbum", accessToken, request)); }
public Task <ApiRequest <MarketGetExtendedResponse> > GetExtended(UserAccessToken accessToken, int?ownerId = null, int?count = null, int?offset = null, bool?extended = null) { var request = new Dictionary <string, string> { ["access_token"] = accessToken?.Value, ["owner_id"] = ownerId?.ToString(), ["count"] = count?.ToString(), ["offset"] = offset?.ToString(), ["extended"] = RequestHelpers.ParseBoolean(extended), }; return(RequestManager.CreateRequestAsync <MarketGetExtendedResponse>("market.get", accessToken, request)); }