mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* React to change in the way the API communicates time Fixes #1558. The API used to send times as number of seconds from Unix epoch time. This has changed and is now ISO 8601. * remove openssl linking in TravisCI when on macOS # Conflicts: # .travis.yml * change appveyor config - public projects can no longer use account feeds (plus we dont actually need it anyway)
67 lines
2.2 KiB
C#
67 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Globalization;
|
|
|
|
namespace Octokit
|
|
{
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class RepositoryTrafficCloneSummary
|
|
{
|
|
public RepositoryTrafficCloneSummary() { }
|
|
|
|
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "It's a property from the api.")]
|
|
public RepositoryTrafficCloneSummary(int count, int uniques, IReadOnlyList<RepositoryTrafficClone> clones)
|
|
{
|
|
Count = count;
|
|
Uniques = uniques;
|
|
Clones = clones;
|
|
}
|
|
|
|
public int Count { get; protected set; }
|
|
|
|
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "It's a property from the api.")]
|
|
public int Uniques { get; protected set; }
|
|
|
|
public IReadOnlyList<RepositoryTrafficClone> Clones { get; protected set; }
|
|
|
|
internal string DebuggerDisplay
|
|
{
|
|
get { return string.Format(CultureInfo.InvariantCulture, "Number: {0} Uniques: {1}", Count, Uniques); }
|
|
}
|
|
}
|
|
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class RepositoryTrafficClone
|
|
{
|
|
public RepositoryTrafficClone() { }
|
|
|
|
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "It's a property from the api.")]
|
|
public RepositoryTrafficClone(DateTimeOffset timestamp, int count, int uniques)
|
|
{
|
|
Timestamp = timestamp;
|
|
Count = count;
|
|
Uniques = uniques;
|
|
}
|
|
|
|
public DateTimeOffset Timestamp { get; protected set; }
|
|
|
|
public int Count { get; protected set; }
|
|
|
|
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "It's a property from the api.")]
|
|
public int Uniques { get; protected set; }
|
|
|
|
internal string DebuggerDisplay
|
|
{
|
|
get { return string.Format(CultureInfo.InvariantCulture, "Number: {0} Uniques: {1}", Count, Uniques); }
|
|
}
|
|
}
|
|
|
|
public enum TrafficDayOrWeek
|
|
{
|
|
Day,
|
|
Week
|
|
}
|
|
}
|