public static Blob ( long repositoryId, string reference ) : |
||
repositoryId | long | The Id of the repository |
reference | string | The SHA of the blob |
return |
/// <summary> /// Gets a single Blob by SHA. /// </summary> /// <remarks> /// http://developer.github.com/v3/git/blobs/#get-a-blob /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="reference">The SHA of the blob</param> public Task <Blob> Get(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(reference, "reference"); return(ApiConnection.Get <Blob>(ApiUrls.Blob(owner, name, reference))); }
/// <summary> /// Creates a new Blob /// </summary> /// <remarks> /// http://developer.github.com/v3/git/blobs/#create-a-blob /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="newBlob">The new Blob</param> /// <returns>The <see cref="Blob"/> that was just created.</returns> public Task <BlobReference> Create(string owner, string name, NewBlob newBlob) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(newBlob, "newBlob"); return(ApiConnection.Post <BlobReference>(ApiUrls.Blob(owner, name), newBlob)); }
/// <summary> /// Gets a single Blob by SHA. /// </summary> /// <remarks> /// http://developer.github.com/v3/git/blobs/#get-a-blob /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="reference">The SHA of the blob</param> public Task <Blob> Get(int repositoryId, string reference) { Ensure.ArgumentNotNullOrEmptyString(reference, "reference"); return(ApiConnection.Get <Blob>(ApiUrls.Blob(repositoryId, reference))); }