public async Task<DeleteConnectionResponse> DeleteConnectionAsync(DeleteConnectionRequest request) { byte[] bytes = null; bytes = await HttpOperation .WithUrl(Urls.For.GetConnection(request.Relation, request.Id, request.CurrentLocation, request.DebugEnabled, request.Verbosity, request.Fields)) .WithAppacitiveSession(request.SessionToken) .WithEnvironment(request.Environment) .WithUserToken(request.UserToken) .DeleteAsync(); var response = DeleteConnectionResponse.Parse(bytes); return response; }
/// <summary> /// Deletes the provided APConnection object. /// </summary> /// <param name="type">The type (relation name) of the connection.</param> /// <param name="id">The id of the connection.</param> /// <param name="options">Request specific api options. These will override the global settings for the app for this request.</param> public async static Task DeleteAsync(string type, string id, ApiOptions options = null) { var request = new DeleteConnectionRequest { Relation = type, Id = id }; ApiOptions.Apply(request, options); var response = await request.ExecuteAsync(); if (response.Status.IsSuccessful == false) throw response.Status.ToFault(); }