mirror of
https://github.com/ckaczor/ChrisKaczor.FeverClient.git
synced 2026-01-13 17:22:17 -05:00
Small clean up
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace ChrisKaczor.FeverClient.Converters
|
namespace ChrisKaczor.FeverClient.Converters;
|
||||||
|
|
||||||
|
public class BoolConverter : JsonConverter<bool>
|
||||||
{
|
{
|
||||||
public class BoolTimestampConverter : JsonConverter<bool>
|
|
||||||
{
|
|
||||||
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
if (reader.TokenType != JsonTokenType.Number)
|
if (reader.TokenType != JsonTokenType.Number)
|
||||||
@@ -21,5 +21,4 @@ namespace ChrisKaczor.FeverClient.Converters
|
|||||||
var number = value ? 1 : 0;
|
var number = value ? 1 : 0;
|
||||||
writer.WriteNumberValue(number);
|
writer.WriteNumberValue(number);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ public class FeverClient
|
|||||||
{
|
{
|
||||||
_jsonSerializerOptions = new JsonSerializerOptions();
|
_jsonSerializerOptions = new JsonSerializerOptions();
|
||||||
_jsonSerializerOptions.Converters.Add(new EpochConverter());
|
_jsonSerializerOptions.Converters.Add(new EpochConverter());
|
||||||
_jsonSerializerOptions.Converters.Add(new BoolTimestampConverter());
|
_jsonSerializerOptions.Converters.Add(new BoolConverter());
|
||||||
_jsonSerializerOptions.Converters.Add(new CommaSeparatedListConverter());
|
_jsonSerializerOptions.Converters.Add(new CommaSeparatedListConverter());
|
||||||
|
|
||||||
_restClient = new RestClient(url);
|
_restClient = new RestClient(url);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This library can be used to read RSS feeds via the Fever API in [Miniflux](https://miniflux.app/index.html) or other similar feed readers/servers.
|
This library can be used to read RSS feeds via the Fever API in [Miniflux](https://miniflux.app/index.html) or other similar feed readers/servers.
|
||||||
|
|
||||||
Only tested with [Miniflux](https://miniflux.app/index.html) so far but works for my needs in [Feed Center](http://github.com/ckaczor/FeedCenter).
|
Not fully implemented (at least so far) and only tested with [Miniflux](https://miniflux.app/index.html) but works for my needs in [Feed Center](http://github.com/ckaczor/FeedCenter).
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user