EnterpriseMigrations() public static method

public static EnterpriseMigrations ( string org ) : Uri
org string
return System.Uri
Example #1
0
        /// <summary>
        /// Gets the list of the most recent migrations of the the organization.
        /// </summary>
        /// <remarks>
        /// https://developer.github.com/v3/migration/migrations/#get-a-list-of-migrations
        /// </remarks>
        /// <param name="org">The organization of which to list migrations.</param>
        /// <returns>List of most recent <see cref="Migration"/>s.</returns>
        public async Task <Net40List <Migration> > GetAll(string org)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, "org");

            var endpoint = ApiUrls.EnterpriseMigrations(org);

            return(await ApiConnection.Get <Net40List <Migration> >(endpoint, null, AcceptHeaders.MigrationsApiPreview).ConfigureAwait(false));
        }
Example #2
0
        public async Task <IReadOnlyList <Migration> > GetAll(string org, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
            Ensure.ArgumentNotNull(options, nameof(options));

            var endpoint = ApiUrls.EnterpriseMigrations(org);

            return(await ApiConnection.GetAll <Migration>(endpoint, null, AcceptHeaders.MigrationsApiPreview, options).ConfigureAwait(false));
        }
Example #3
0
        public async Task <Migration> Start(string org, StartMigrationRequest migration)
        {
            Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
            Ensure.ArgumentNotNull(migration, nameof(migration));

            var endpoint = ApiUrls.EnterpriseMigrations(org);

            return(await ApiConnection.Post <Migration>(endpoint, migration, AcceptHeaders.MigrationsApiPreview).ConfigureAwait(false));
        }