Skip to content

Commit

Permalink
GH-55: Remove facebook property in ITraktSharing
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikfroehling committed Apr 23, 2019
1 parent d00efc1 commit 50227ba
Show file tree
Hide file tree
Showing 73 changed files with 12 additions and 657 deletions.
2 changes: 0 additions & 2 deletions Source/Lib/Trakt.NET/Objects/Basic/ITraktSharing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
{
public interface ITraktSharing
{
bool? Facebook { get; set; }

bool? Twitter { get; set; }

bool? Google { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
/// <summary>Represents Trakt connection options.</summary>
public class TraktSharing : ITraktSharing
{
/// <summary>Gets or sets, whether Facebook connection is enabled.</summary>
public bool? Facebook { get; set; }

/// <summary>Gets or sets, whether Twitter connection is enabled.</summary>
public bool? Twitter { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public override async Task<ITraktSharing> ReadObjectAsync(JsonTextReader jsonRea

switch (propertyName)
{
case JsonProperties.SHARING_PROPERTY_NAME_FACEBOOK:
traktSharing.Facebook = await jsonReader.ReadAsBooleanAsync(cancellationToken);
break;
case JsonProperties.SHARING_PROPERTY_NAME_TWITTER:
traktSharing.Twitter = await jsonReader.ReadAsBooleanAsync(cancellationToken);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ public override async Task WriteObjectAsync(JsonTextWriter jsonWriter, ITraktSha
CheckJsonTextWriter(jsonWriter);
await jsonWriter.WriteStartObjectAsync(cancellationToken).ConfigureAwait(false);

if (obj.Facebook.HasValue)
{
await jsonWriter.WritePropertyNameAsync(JsonProperties.SHARING_PROPERTY_NAME_FACEBOOK, cancellationToken).ConfigureAwait(false);
await jsonWriter.WriteValueAsync(obj.Facebook, cancellationToken).ConfigureAwait(false);
}

if (obj.Twitter.HasValue)
{
await jsonWriter.WritePropertyNameAsync(JsonProperties.SHARING_PROPERTY_NAME_TWITTER, cancellationToken).ConfigureAwait(false);
Expand Down
1 change: 0 additions & 1 deletion Source/Lib/Trakt.NET/Objects/Json/JsonProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ internal static class JsonProperties
internal const string SEARCH_RESULT_PROPERTY_NAME_PERSON = "person";
internal const string SEARCH_RESULT_PROPERTY_NAME_LIST = "list";

internal const string SHARING_PROPERTY_NAME_FACEBOOK = "facebook";
internal const string SHARING_PROPERTY_NAME_TWITTER = "twitter";
internal const string SHARING_PROPERTY_NAME_GOOGLE = "google";
internal const string SHARING_PROPERTY_NAME_TUMBLR = "tumblr";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow()
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -98,7 +97,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppVers
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -152,7 +150,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppVers
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -206,7 +203,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppVers
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -260,7 +256,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppVers
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -315,7 +310,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, APP_VERSION,
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -370,7 +364,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, APP_VERSION,
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -423,7 +416,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppDate
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -477,7 +469,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppDate
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -531,7 +522,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_AppDate
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -586,7 +576,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, APP_BUI
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -641,7 +630,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, APP_BUI
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -694,7 +682,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_Message
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -748,7 +735,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_Message
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -803,7 +789,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, null,
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -858,7 +843,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, null,
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -911,7 +895,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_Sharing
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -966,7 +949,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, null, n
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -1021,7 +1003,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, null, n
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -1074,7 +1055,6 @@ public async Task Test_TraktCheckinsModule_CheckIntoEpisodeWithShow_With_Foursqu
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -1129,7 +1109,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, null, n
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -1183,7 +1162,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, null, null, n
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down Expand Up @@ -1242,7 +1220,6 @@ await client.Checkins.CheckIntoEpisodeWithShowAsync(Episode, Show, APP_VERSION,
responseValue.Id.Should().Be(3373536620);
responseValue.WatchedAt.Should().Be(DateTime.Parse("2014-08-06T06:54:36.859Z").ToUniversalTime());
responseValue.Sharing.Should().NotBeNull();
responseValue.Sharing.Facebook.Should().BeTrue();
responseValue.Sharing.Twitter.Should().BeTrue();
responseValue.Sharing.Tumblr.Should().BeFalse();
responseValue.Episode.Should().NotBeNull();
Expand Down
Loading

0 comments on commit 50227ba

Please sign in to comment.