mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 19:46:07 +00:00
use HTTP verbs for clarity: POST edition
This commit is contained in:
@@ -160,7 +160,7 @@ namespace Octokit
|
||||
{
|
||||
Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
|
||||
|
||||
return await Client.Create<Authorization>(_authorizationsEndpoint, newAuthorization);
|
||||
return await Client.Post<Authorization>(_authorizationsEndpoint, newAuthorization);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNull(data, "data");
|
||||
|
||||
var endpoint = "/repos/{0}/{1}/releases".FormatUri(owner, name);
|
||||
return await Client.Create<Release>(endpoint, data);
|
||||
return await Client.Post<Release>(endpoint, data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Octokit
|
||||
throw new ArgumentException("The new repository's name must not be null.");
|
||||
|
||||
var endpoint = new Uri("user/repos", UriKind.Relative);
|
||||
return await Client.Create<Repository>(endpoint, newRepository);
|
||||
return await Client.Post<Repository>(endpoint, newRepository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -41,7 +41,7 @@ namespace Octokit
|
||||
throw new ArgumentException("The new repository's name must not be null.");
|
||||
|
||||
var endpoint = "orgs/{0}/repos".FormatUri(organizationLogin);
|
||||
return await Client.Create<Repository>(endpoint, newRepository);
|
||||
return await Client.Post<Repository>(endpoint, newRepository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNull(key, "key");
|
||||
|
||||
var endpoint = new Uri("/user/keys", UriKind.Relative);
|
||||
return await Client.Create<SshKey>(endpoint, key);
|
||||
return await Client.Post<SshKey>(endpoint, key);
|
||||
}
|
||||
|
||||
public async Task<SshKey> Update(int id, SshKeyUpdate key)
|
||||
|
||||
Reference in New Issue
Block a user