mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 03:30:34 +00:00
[WIP] Protected branches updates - granular methods (#1443)
* Add get method for required status checks * Add api urls for required status checks * change name of apir url for required status checks * fix xml comment * add update method for required status checks * add delete method for required status checks * fix api url * fix xml comment * add api url for required status cehcks contexts * add get method for required status checks contexts * add replace method for required status checks contexts * add add method for required status checks contexts * add new overload for delete method * add delete method for required status checks contexts; fix overloads for delete * add api url for restrictions * add get method for restrictions * add delete method for restrictions * add api url for teams restrictions * add get method for team restrictions; fix delete method restrictions * fix overhead for get team restrictions * fix httpmethod for update required status checks * add set method for team restrictions * add add method for team restrictions * add delete method for team restrictions * add api url for user restrictions * add get method for user restrictions * add set method for user restrictions * add add method for user restrictions * add delete method for user restrictions * Add unit test; fix api urls * Add ExcludeFromTest class * add exclude attribute to methods * Add attribute usage * Add parameter to interface * add observable unit tests * rename excludefromtest exclude all the tests for the new api endpoints because they broke the pagination and syncobsverable tests. * rename excludefromattribute * refactor observable methods * [WIP] Add integration tests * finish integration test * fix renamed branch protection restrictions * add team and user collections * rename set to update * rename test methods * optimize integration tests * made some tidy ups - fixup comment wording Edit => Replace - remove spurious characters from description - remove un-needed exclude attributes * remove ForOrgRepo tests * remove unused org contexts * dispose contexts * remove obsolete GetRedirect * add clarifying comment to restriction methods
This commit is contained in:
committed by
Ryan Gribble
parent
6a21ce5df6
commit
93ae832311
@@ -490,6 +490,22 @@ namespace Octokit
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP DELETE request.
|
||||
/// Attempts to map the response body to an object of type <typeparamref name="T"/>
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type to map the response to</typeparam>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <param name="data">The object to serialize as the body of the request</param>
|
||||
/// <param name="accepts">Specifies accept response media type</param>
|
||||
public Task<IApiResponse<T>> Delete<T>(Uri uri, object data, string accepts)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
Ensure.ArgumentNotNull(accepts, "accepts");
|
||||
|
||||
return SendData<T>(uri, HttpMethod.Delete, data, accepts, null, CancellationToken.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Base address for the connection.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user