/// <summary> /// Get the total number of clones and breakdown per day or week for the last 14 days /// </summary> /// <remarks>https://developer.github.com/v3/repos/traffic/#clones</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="per">Breakdown per day or week</param> public Task<RepositoryTrafficCloneSummary> GetClones(string owner, string name, RepositoryTrafficRequest per) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(per, "per"); return ApiConnection.Get<RepositoryTrafficCloneSummary>(ApiUrls.RepositoryTrafficClones(owner, name), per.ToParametersDictionary(), AcceptHeaders.RepositoryTrafficApiPreview); }
/// <summary> /// Get the total number of views and breakdown per day or week for the last 14 days /// </summary> /// <remarks>https://developer.github.com/v3/repos/traffic/#views</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="per">Breakdown per day or week</param> public Task <RepositoryTrafficViewSummary> GetViews(string owner, string name, RepositoryTrafficRequest per) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(per, "per"); return(ApiConnection.Get <RepositoryTrafficViewSummary>(ApiUrls.RepositoryTrafficViews(owner, name), per.ToParametersDictionary(), AcceptHeaders.RepositoryTrafficApiPreview)); }
/// <summary> /// Get the total number of views and breakdown per day or week for the last 14 days /// </summary> /// <remarks>https://developer.github.com/v3/repos/traffic/#views</remarks> /// <param name="repositoryId">The owner of the repository</param> /// <param name="per">Breakdown per day or week</param> public Task <RepositoryTrafficViewSummary> GetViews(long repositoryId, RepositoryTrafficRequest per) { Ensure.ArgumentNotNull(per, "per"); return(ApiConnection.Get <RepositoryTrafficViewSummary>(ApiUrls.RepositoryTrafficViews(repositoryId), per.ToParametersDictionary(), AcceptHeaders.RepositoryTrafficApiPreview)); }
/// <summary> /// Get the total number of views and breakdown per day or week for the last 14 days /// </summary> /// <remarks>https://developer.github.com/v3/repos/traffic/#views</remarks> /// <param name="repositoryId">The owner of the repository</param> /// <param name="per">Breakdown per day or week</param> public Task<RepositoryTrafficViewSummary> GetViews(long repositoryId, RepositoryTrafficRequest per) { Ensure.ArgumentNotNull(per, "per"); return ApiConnection.Get<RepositoryTrafficViewSummary>(ApiUrls.RepositoryTrafficViews(repositoryId), per.ToParametersDictionary(), AcceptHeaders.RepositoryTrafficApiPreview); }
public Task <RepositoryTrafficCloneSummary> GetClones(string owner, string name, RepositoryTrafficRequest per) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(per, nameof(per)); return(ApiConnection.Get <RepositoryTrafficCloneSummary>(ApiUrls.RepositoryTrafficClones(owner, name), per.ToParametersDictionary())); }
public Task <RepositoryTrafficCloneSummary> GetClones(long repositoryId, RepositoryTrafficRequest per) { Ensure.ArgumentNotNull(per, nameof(per)); return(ApiConnection.Get <RepositoryTrafficCloneSummary>(ApiUrls.RepositoryTrafficClones(repositoryId), per.ToParametersDictionary())); }