public async Task <PhotosSaveWallPhotoResponse> SaveAsync(int groupID, string uploadResponse, CancellationToken ct) { var query = buildAQuery(groupID, uploadResponse); var response = await _api.ExecuteMethodAsync("photos.saveWallPhoto", query, ct).ConfigureAwait(false); return(JsonConvert.DeserializeObject <PhotosSaveWallPhotoResponse>(response)); }
public async Task <UploadServerInfo> GetAsync(int groupId, CancellationToken ct) { groupId = Math.Abs(groupId); var response = await _api.ExecuteMethodAsync("photos.getWallUploadServer", QueryParameters.New().Add("group_id", groupId), ct).ConfigureAwait(false); return(JsonConvert.DeserializeObject <PhotosGetWallUploadServerResponse>(response)?.Content); }
public async Task <WallGetResponse> GetAsync(QueryParameters parameters, CancellationToken ct, bool ignoraCache = false) { var response = ignoraCache ? await _api.ExecuteMethodIgnoreCacheAsync("wall.get", parameters, ct).ConfigureAwait(false) : await _api.ExecuteMethodAsync("wall.get", parameters, ct).ConfigureAwait(false); return(JsonConvert.DeserializeObject <WallGetResponse>(response)); }
public async Task <string> Get(string photo) { var parameters = QueryParameters.New() .Add("photos", photo); var result = await _api.ExecuteMethodAsync("photos.getById", parameters, CancellationToken.None); return(result); }
public async Task <GroupsGetResponse> GetAsync(QueryParameters parameters, CancellationToken ct) { var query = buildAQuery(); query.Append(parameters); var response = await _api.ExecuteMethodAsync("groups.get", query, ct).ConfigureAwait(false); return(JsonConvert.DeserializeObject <GroupsGetResponse>(response)); }
public async Task <int> TrackAsync(CancellationToken ct) { var response = await _api.ExecuteMethodAsync("stats.trackVisitor", QueryParameters.No(), ct).ConfigureAwait(false); return(JsonConvert.DeserializeObject <StatsTrackVisitorResponse>(response).Response); }
public async Task <UsersGetResponse> GetAsync(QueryParameters query, CancellationToken ct) { var response = await _api.ExecuteMethodAsync("users.get", query, ct).ConfigureAwait(false); return(JsonConvert.DeserializeObject <UsersGetResponse>(response)); }