Re-ordered methods to follow API docs.

This commit is contained in:
Devesh Khandelwal
2016-03-17 17:22:32 +05:30
parent 36a64d63b8
commit 7634a4d8f4
4 changed files with 65 additions and 65 deletions
@@ -14,17 +14,18 @@ namespace Octokit.Reactive
public interface IObservableEnterpriseMigrationsClient
{
/// <summary>
/// Get the status of a migration
/// Starts a new migration specified for the given organization.
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// </remarks>
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
IObservable<Migration> GetStatus(
string org,
int id);
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
IObservable<Migration> Start(
string org,
StartMigrationRequest migration);
/// <summary>
/// Gets the list of the most recent migrations of the the organization.
@@ -38,18 +39,17 @@ namespace Octokit.Reactive
string org);
/// <summary>
/// Starts a new migration specified for the given organization.
/// Get the status of a migration
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// </remarks>
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
IObservable<Migration> Start(
string org,
StartMigrationRequest migration);
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
IObservable<Migration> GetStatus(
string org,
int id);
/// <summary>
/// Fetches the URL to a migration archive.
@@ -28,17 +28,18 @@ namespace Octokit.Reactive
}
/// <summary>
/// Get the status of a migration
/// Starts a new migration specified for the given organization.
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// </remarks>
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
public IObservable<Migration> GetStatus(string org, int id)
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
public IObservable<Migration> Start(string org, StartMigrationRequest migration)
{
return _client.GetStatus(org, id).ToObservable();
return _client.Start(org, migration).ToObservable();
}
/// <summary>
@@ -55,18 +56,17 @@ namespace Octokit.Reactive
}
/// <summary>
/// Starts a new migration specified for the given organization.
/// Get the status of a migration
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// </remarks>
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
public IObservable<Migration> Start(string org, StartMigrationRequest migration)
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
public IObservable<Migration> GetStatus(string org, int id)
{
return _client.Start(org, migration).ToObservable();
return _client.GetStatus(org, id).ToObservable();
}
/// <summary>
@@ -20,21 +20,23 @@ namespace Octokit
{ }
/// <summary>
/// Get the status of a migration
/// Starts a new migration specified for the given organization.
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// </remarks>
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
public async Task<Migration> GetStatus(string org, int id)
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
public async Task<Migration> Start(string org, StartMigrationRequest migration)
{
Ensure.ArgumentNotNullOrEmptyString(org, "org");
Ensure.ArgumentNotNull(migration, "migration");
var endpoint = ApiUrls.EnterpriseMigrationById(org, id);
var endpoint = ApiUrls.EnterpriseMigrations(org);
return await ApiConnection.Get<Migration>(endpoint);
return await ApiConnection.Post<Migration>(endpoint, migration);
}
/// <summary>
@@ -55,23 +57,21 @@ namespace Octokit
}
/// <summary>
/// Starts a new migration specified for the given organization.
/// Get the status of a migration
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// </remarks>
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
public async Task<Migration> Start(string org, StartMigrationRequest migration)
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
public async Task<Migration> GetStatus(string org, int id)
{
Ensure.ArgumentNotNullOrEmptyString(org, "org");
Ensure.ArgumentNotNull(migration, "migration");
var endpoint = ApiUrls.EnterpriseMigrations(org);
var endpoint = ApiUrls.EnterpriseMigrationById(org, id);
return await ApiConnection.Post<Migration>(endpoint, migration);
return await ApiConnection.Get<Migration>(endpoint);
}
/// <summary>
@@ -13,17 +13,18 @@ namespace Octokit
public interface IEnterpriseMigrationsClient
{
/// <summary>
/// Get the status of a migration
/// Starts a new migration specified for the given organization.
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// </remarks>
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
Task<Migration> GetStatus(
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
Task<Migration> Start(
string org,
int id);
StartMigrationRequest migration);
/// <summary>
/// Gets the list of the most recent migrations of the the organization.
@@ -37,18 +38,17 @@ namespace Octokit
string org);
/// <summary>
/// Starts a new migration specified for the given organization.
/// Get the status of a migration
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#start-a-migration
/// https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration
/// </remarks>
/// <param name="org">The organization for which to start a migration.</param>
/// <param name="migration">Sprcifies parameters for the migration in a
/// <see cref="StartMigrationRequest"/> object.</param>
/// <returns>The started migration.</returns>
Task<Migration> Start(
/// <param name="org">The organization which is migrating.</param>
/// <param name="id">Migration ID of the organization.</param>
/// <returns>A <see cref="Migration"/> object representing the state of migration.</returns>
Task<Migration> GetStatus(
string org,
StartMigrationRequest migration);
int id);
/// <summary>
/// Fetches the URL to a migration archive.