GpgKeys() private method

private GpgKeys ( ) : Uri
return System.Uri
Ejemplo n.º 1
0
 public Task Delete(int id)
 {
     return(ApiConnection.Delete(ApiUrls.GpgKeys(id)));
 }
Ejemplo n.º 2
0
 public Task <GpgKey> Get(int id)
 {
     return(ApiConnection.Get <GpgKey>(ApiUrls.GpgKeys(id)));
 }
Ejemplo n.º 3
0
        public Task <GpgKey> Create(NewGpgKey newGpgKey)
        {
            Ensure.ArgumentNotNull(newGpgKey, nameof(newGpgKey));

            return(ApiConnection.Post <GpgKey>(ApiUrls.GpgKeys(), newGpgKey));
        }
Ejemplo n.º 4
0
        public Task <IReadOnlyList <GpgKey> > GetAllForCurrent(ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <GpgKey>(ApiUrls.GpgKeys(), options));
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Deletes the GPG key for the specified Id.
 /// </summary>
 /// <param name="id">The Id of the GPG key to delete.</param>
 /// <remarks>
 /// See the <a href="https://developer.github.com/v3/users/gpg_keys/#delete-a-gpg-key">API documentation</a> for more information.
 /// </remarks>
 /// <returns></returns>
 public Task Delete(int id)
 {
     return(ApiConnection.Delete(ApiUrls.GpgKeys(id), new object(), AcceptHeaders.GpgKeysPreview));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// View extended details of the <see cref="GpgKey"/> for the specified id.
 /// </summary>
 /// <param name="id">The Id of the GPG key</param>
 /// <remarks>
 /// See the <a href="https://developer.github.com/v3/users/gpg_keys/#get-a-single-gpg-key">API documentation</a> for more information.
 /// </remarks>
 /// <returns>The <see cref="GpgKey"/> for the specified Id.</returns>
 public Task <GpgKey> Get(int id)
 {
     return(ApiConnection.Get <GpgKey>(ApiUrls.GpgKeys(id), null, AcceptHeaders.GpgKeysPreview));
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Creates a new <see cref="GpgKey"/> for the authenticated user.
        /// </summary>
        /// <param name="newGpgKey">The new GPG key to add.</param>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/users/gpg_keys/#create-a-gpg-key">API documentation</a> for more information.
        /// </remarks>
        /// <returns>The newly created <see cref="GpgKey"/>.</returns>
        public Task <GpgKey> Create(NewGpgKey newGpgKey)
        {
            Ensure.ArgumentNotNull(newGpgKey, "newGpgKey");

            return(ApiConnection.Post <GpgKey>(ApiUrls.GpgKeys(), newGpgKey, AcceptHeaders.GpgKeysPreview));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Gets all GPG keys for the authenticated user.
        /// </summary>
        /// <param name="options">Options for changing the API response</param>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/users/gpg_keys/#list-your-gpg-keys">API documentation</a> for more information.
        /// </remarks>
        /// <returns>A <see cref="IReadOnlyList{GpgKey}"/> of <see cref="GpgKey"/>s for the current user.</returns>
        public Task <IReadOnlyList <GpgKey> > GetAllForCurrent(ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <GpgKey>(ApiUrls.GpgKeys(), null, AcceptHeaders.GpgKeysPreview, options));
        }