Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Medium/Authentication/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Token
public Scope[] Scope { get; set; }

[JsonProperty(PropertyName = "expires_at")]
[JsonConverter(typeof(UnixTimestampConverter))]
[JsonConverter(typeof(JsonNetConverters.UnixTime.UnixTimeConverter))]
public DateTime ExpiresAt { get; set; }
}
}
7 changes: 0 additions & 7 deletions Medium/Helpers/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,6 @@ public static string GenerateWwwFormUrlEncodedString(Dictionary<string, string>
ConcatenateString("&");
}

// Core.TimeUtilities.cs
public static DateTime? FromUnixTimestampMs(long? timestamp)
{
if (!timestamp.HasValue) return null;
return new DateTime(1970, 1, 1).AddMilliseconds(timestamp.Value);
}

// Core.StringExtensions.cs
public static string Replace(this string source, Regex regex, string replacement)
{
Expand Down
28 changes: 0 additions & 28 deletions Medium/Helpers/UnixTimestampConverter.cs

This file was deleted.

1 change: 1 addition & 0 deletions Medium/Medium.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="UnixTimeConverter" Version="1.3.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Linq" Version="4.3.0" />
Expand Down
2 changes: 1 addition & 1 deletion Medium/Models/Post.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Post
public string Url { get; set; }
public string CanonicalUrl { get; set; }
public PublishStatus PublishStatus { get; set; }
[JsonConverter(typeof(UnixTimestampConverter))]
[JsonConverter(typeof(JsonNetConverters.UnixTime.UnixTimeConverter))]
public DateTime? PublishedAt { get; set; }
[JsonConverter(typeof(LicenseEnumConverter))]
public License License { get; set; }
Expand Down