Exemplo n.º 1
0
        /// <summary>
        /// Create a public key <see cref="NewPublicKey"/>.
        /// </summary>
        /// <remarks>
        /// https://developer.github.com/v3/users/keys/#create-a-public-key
        /// </remarks>
        /// <param name="newKey">The SSH Key contents</param>
        /// <returns></returns>
        public Task <PublicKey> Create(NewPublicKey newKey)
        {
            Ensure.ArgumentNotNull(newKey, "newKey");

            return(ApiConnection.Post <PublicKey>(ApiUrls.Keys(), newKey));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a public key <see cref="NewPublicKey"/>.
        /// </summary>
        /// <remarks>
        /// https://developer.github.com/v3/users/keys/#create-a-public-key
        /// </remarks>
        /// <param name="newKey">The SSH Key contents</param>
        /// <returns></returns>
        public Task<PublicKey> Create(NewPublicKey newKey)
        {
            Ensure.ArgumentNotNull(newKey, "newKey");

            return ApiConnection.Post<PublicKey>(ApiUrls.Keys(), newKey);
        }