Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tor4kichi/NiconicoToolkit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.0
Choose a base ref
...
head repository: tor4kichi/NiconicoToolkit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Feb 12, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0895189 View commit details
  2. Copy the full SHA
    782ff31 View commit details

Commits on Mar 21, 2023

  1. Copy the full SHA
    51fb1ad View commit details

Commits on Mar 22, 2023

  1. #5 コメント送信に対応

    tor4kichi committed Mar 22, 2023
    Copy the full SHA
    47bd9e7 View commit details
  2. Copy the full SHA
    caf2ec4 View commit details
  3. Copy the full SHA
    4465912 View commit details
  4. Merge pull request #8 from tor4kichi/feature/nvcomment

    flapi廃止に伴うNVCommentApi対応
    tor4kichi authored Mar 22, 2023
    Copy the full SHA
    5c50867 View commit details
  5. Copy the full SHA
    2b751ea View commit details
  6. Copy the full SHA
    87abab9 View commit details
  7. Copy the full SHA
    d96c7ae View commit details
  8. update to v0.3.1

    tor4kichi committed Mar 22, 2023
    Copy the full SHA
    1cc02b1 View commit details
  9. Copy the full SHA
    b2b1bd0 View commit details
  10. Copy the full SHA
    c9f5133 View commit details
  11. Copy the full SHA
    d2c98ec View commit details
  12. Copy the full SHA
    075f6be View commit details
  13. Copy the full SHA
    0ca1ebc View commit details
  14. Copy the full SHA
    7aafcb4 View commit details

Commits on Apr 12, 2023

  1. Copy the full SHA
    a9b91eb View commit details
  2. Copy the full SHA
    ac83ed9 View commit details
  3. Copy the full SHA
    b167993 View commit details
  4. Copy the full SHA
    54d8941 View commit details
  5. Copy the full SHA
    ebd9f63 View commit details

Commits on Apr 13, 2023

  1. Copy the full SHA
    964ee1b View commit details

Commits on Apr 14, 2023

  1. Copy the full SHA
    aad6a3a View commit details

Commits on Apr 26, 2023

  1. update to v0.4.2

    tor4kichi committed Apr 26, 2023
    Copy the full SHA
    d7e8725 View commit details
  2. Copy the full SHA
    cfcc1e6 View commit details
  3. Copy the full SHA
    89e45f4 View commit details

Commits on May 10, 2023

  1. Copy the full SHA
    10a6b3b View commit details

Commits on Aug 2, 2023

  1. Copy the full SHA
    d9ebb27 View commit details

Commits on Oct 6, 2023

  1. Copy the full SHA
    9468c63 View commit details
  2. Copy the full SHA
    a150f7a View commit details

Commits on Oct 30, 2023

  1. Copy the full SHA
    1afdd62 View commit details

Commits on Nov 10, 2023

  1. Copy the full SHA
    b9c7cbc View commit details
  2. update to v5.0

    tor4kichi committed Nov 10, 2023
    Copy the full SHA
    c4a75a3 View commit details

Commits on Nov 11, 2023

  1. Copy the full SHA
    32be55e View commit details
  2. update to v0.5.2

    tor4kichi committed Nov 11, 2023
    Copy the full SHA
    5e3a19f View commit details
  3. Copy the full SHA
    010bfa2 View commit details
  4. Copy the full SHA
    03ac2d3 View commit details

Commits on Jan 24, 2024

  1. 動画コメントが取得・投稿できなくなっていた問題を解消。

    サーバーURL指定の変更に影響を受けていたため、nvComment.serverが指定するURLに追従するよう修正した。
    tor4kichi committed Jan 24, 2024
    Copy the full SHA
    2c75b2b View commit details
  2. Copy the full SHA
    6e04070 View commit details
  3. Copy the full SHA
    72ecde7 View commit details

Commits on Mar 1, 2024

  1. Copy the full SHA
    c6b4a7c View commit details
  2. Copy the full SHA
    2c2a075 View commit details
  3. Copy the full SHA
    a3c3efc View commit details
  4. update to 0.5.7

    tor4kichi committed Mar 1, 2024
    Copy the full SHA
    a22e742 View commit details
  5. Copy the full SHA
    f3ae028 View commit details
  6. Copy the full SHA
    bcb40df View commit details

Commits on Aug 5, 2024

  1. Copy the full SHA
    94f5e73 View commit details

Commits on Aug 6, 2024

  1. Copy the full SHA
    7736c81 View commit details
  2. Copy the full SHA
    1a167e8 View commit details
Showing with 4,770 additions and 4,011 deletions.
  1. +7 −3 NiconicoToolkit.Shared/Account/AccountClient.cs
  2. +0 −22 NiconicoToolkit.Shared/Activity/ActivityClient.cs
  3. +8 −10 NiconicoToolkit.Shared/Channels/ChannelClient.cs
  4. +0 −7 NiconicoToolkit.Shared/Community/CommunityClient.cs
  5. +26 −0 NiconicoToolkit.Shared/ExtApi/ExtApiClient.cs
  6. +188 −0 NiconicoToolkit.Shared/ExtApi/Video/ThumbInfoResponse.cs
  7. +6 −5 NiconicoToolkit.Shared/Follow/FollowClient.cs
  8. +92 −0 NiconicoToolkit.Shared/FollowingsActivity/FollowingsActivityClient.cs
  9. +165 −0 NiconicoToolkit.Shared/FollowingsActivity/FollowingsActivityResponse.cs
  10. +21 −0 NiconicoToolkit.Shared/History/HistoryClient.cs
  11. 0 NiconicoToolkit.Shared/{Activity → History}/VideoWatchHistory/VideoWatchHisotrySubClient.cs
  12. +26 −2 NiconicoToolkit.Shared/HttpContentExtensions.cs
  13. +29 −60 NiconicoToolkit.Shared/Live/WatchSession/Live2WatchSession.cs
  14. +28 −25 NiconicoToolkit.Shared/Live/WatchSession/ToClientMessage/WatchServerToClientMessage.cs
  15. +1 −2 NiconicoToolkit.Shared/Live/WatchSession/ToClientMessage/WatchSessionToClientMessageJsonConverter.cs
  16. +18 −0 NiconicoToolkit.Shared/Live/WatchSession/ToServerMessage/WatchClientToServerMessage.cs
  17. +3 −0 NiconicoToolkit.Shared/Live/WatchSession/ToServerMessage/WatchSessionToServerMessageJsonConverter.cs
  18. +4 −4 NiconicoToolkit.Shared/Mylist/LoginUser/LoginUserMylistSubClient.cs
  19. +0 −62 NiconicoToolkit.Shared/NicoRepo/NicoRepoClient.cs
  20. +0 −26 NiconicoToolkit.Shared/NicoRepo/NicoRepoDisplayTarget.cs
  21. +0 −189 NiconicoToolkit.Shared/NicoRepo/NicoRepoEntriesResponse.cs
  22. +0 −50 NiconicoToolkit.Shared/NicoRepo/NicoRepoMuteContextTrigger.cs
  23. +51 −30 NiconicoToolkit.Shared/NiconicoContext.Core.cs
  24. +12 −24 NiconicoToolkit.Shared/NiconicoToolkit.Shared.projitems
  25. +2 −2 NiconicoToolkit.Shared/NiconicoUrls.cs
  26. +1 −1 NiconicoToolkit.Shared/Ranking/Video/HotTopicResponse.cs
  27. +25 −1 NiconicoToolkit.Shared/ReponseMeta.cs
  28. +54 −92 NiconicoToolkit.Shared/Search/Live/LiveSearchResponse.cs
  29. +3 −3 NiconicoToolkit.Shared/Search/Video/VideoSearchSubClient.cs
  30. +0 −136 NiconicoToolkit.Shared/SearchWithCeApi/Mylist/MylistSearchClient.cs
  31. +0 −18 NiconicoToolkit.Shared/SearchWithCeApi/SearchWithCeApiClient.cs
  32. +0 −27 NiconicoToolkit.Shared/SearchWithCeApi/Video/ThreadItem.cs
  33. +0 −16 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoIdSearchResponse.cs
  34. +0 −38 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoIdSearchSingleResponse.cs
  35. +0 −82 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoItem.cs
  36. +0 −46 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoListingResponseContainer.cs
  37. +0 −14 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoProviderType.cs
  38. +0 −108 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoSearchSubClient.cs
  39. +0 −34 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoSortKey.cs
  40. +0 −19 NiconicoToolkit.Shared/SearchWithCeApi/Video/VideoSortOrder.cs
  41. +2 −2 NiconicoToolkit.Shared/SnapshotSearch/VideoSnapshotSearchClient.cs
  42. +0 −76 NiconicoToolkit.Shared/Timeshift/TimeshiftClient.cs
  43. +337 −304 NiconicoToolkit.Shared/Timeshift/TimeshiftReservationsResponse.cs
  44. +0 −9 NiconicoToolkit.Shared/User/UserClient.cs
  45. +3 −0 NiconicoToolkit.Shared/Video/VideoClient.cs
  46. +939 −792 NiconicoToolkit.Shared/Video/Watch/DmcWatchApiData.cs
  47. +0 −3 NiconicoToolkit.Shared/Video/Watch/DmcWatchApiEnvironment.cs
  48. +23 −0 NiconicoToolkit.Shared/Video/Watch/Domand/DomandHlsAccessRightResponse.cs
  49. +0 −21 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/ChatResultCode.cs
  50. +0 −479 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/CommentSession.cs
  51. +0 −165 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/NMSG_Request.cs
  52. +0 −132 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/NMSG_Response.cs
  53. +0 −28 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/PostCommentResponse.cs
  54. +0 −14 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/ThreadKeyResponse.cs
  55. +0 −16 NiconicoToolkit.Shared/Video/Watch/NMSG_Comment/ThreadType.cs
  56. +48 −0 NiconicoToolkit.Shared/Video/Watch/NV_Comment/NvCommentSubClient.Core.cs
  57. +106 −0 NiconicoToolkit.Shared/Video/Watch/NV_Comment/NvCommentSubClient.Delete.cs
  58. +185 −0 NiconicoToolkit.Shared/Video/Watch/NV_Comment/NvCommentSubClient.Get.cs
  59. +189 −0 NiconicoToolkit.Shared/Video/Watch/NV_Comment/NvCommentSubClient.Post.cs
  60. +128 −383 NiconicoToolkit.Shared/Video/Watch/VideoWatchSubClient.cs
  61. +10 −0 NiconicoToolkit.Shared/Video/Watch/WatchJsonResponse.cs
  62. +1,362 −36 NiconicoToolkit.Shared/Video/Watch/WatchPageResponse.cs
  63. +1 −3 NuSpec/Package.nuspec
  64. +1 −1 NuSpec/build_nuget.cmd
  65. +1 −1 Test/NiconicoToolkit.Shared.Test/AccountTest.cs
  66. +1 −1 Test/NiconicoToolkit.Shared.Test/AccountTestHelper.cs
  67. +2 −2 Test/NiconicoToolkit.Shared.Test/ActivityTest.cs
  68. +1 −1 Test/NiconicoToolkit.Shared.Test/ChannelTest.cs
  69. +1 −14 Test/NiconicoToolkit.Shared.Test/CommunityTest.cs
  70. +59 −0 Test/NiconicoToolkit.Shared.Test/ExtApiTest.cs
  71. +1 −1 Test/NiconicoToolkit.Shared.Test/ExtractContenntIdTest.cs
  72. +19 −1 Test/NiconicoToolkit.Shared.Test/FollowTest.cs
  73. +74 −0 Test/NiconicoToolkit.Shared.Test/FollowingsActivityTest.cs
  74. +1 −1 Test/NiconicoToolkit.Shared.Test/IchibaTest.cs
  75. +1 −1 Test/NiconicoToolkit.Shared.Test/IdTest.cs
  76. +1 −1 Test/NiconicoToolkit.Shared.Test/LikesTest.cs
  77. +27 −20 Test/NiconicoToolkit.Shared.Test/LiveTest.cs
  78. +0 −43 Test/NiconicoToolkit.Shared.Test/NicoRepoTest.cs
  79. +2 −2 Test/NiconicoToolkit.Shared.Test/NiconicoToolkit.Shared.Test.projitems
  80. +9 −9 Test/NiconicoToolkit.Shared.Test/RecommendTest.cs
  81. +0 −119 Test/NiconicoToolkit.Shared.Test/SearchCeApiTest.cs
  82. +1 −1 Test/NiconicoToolkit.Shared.Test/SearchHtmlTest.cs
  83. +12 −6 Test/NiconicoToolkit.Shared.Test/SearchTest.cs
  84. +1 −1 Test/NiconicoToolkit.Shared.Test/SeriesTest.cs
  85. +1 −1 Test/NiconicoToolkit.Shared.Test/SnapshotFilterSearializeTest.cs
  86. +1 −1 Test/NiconicoToolkit.Shared.Test/SnapshotSearchTest.cs
  87. +65 −81 Test/NiconicoToolkit.Shared.Test/TimeshiftReservationTest.cs
  88. +1 −8 Test/NiconicoToolkit.Shared.Test/UserTest.cs
  89. +1 −1 Test/NiconicoToolkit.Shared.Test/VideoMylistLoginTest.cs
  90. +1 −1 Test/NiconicoToolkit.Shared.Test/VideoMylistPublicTest.cs
  91. +48 −2 Test/NiconicoToolkit.Shared.Test/VideoRankingTest.cs
  92. +1 −1 Test/NiconicoToolkit.Shared.Test/VideoTest.cs
  93. +333 −68 Test/NiconicoToolkit.Shared.Test/VideoWatchTest.cs
10 changes: 7 additions & 3 deletions NiconicoToolkit.Shared/Account/AccountClient.cs
Original file line number Diff line number Diff line change
@@ -114,10 +114,14 @@ public async Task<NiconicoSessionStatus> SignOutAsync()
return (NiconicoSessionStatus.ServiceUnavailable, NiconicoAccountAuthority.NotSignedIn, default);
}

var signInStatus = __IsSignedInAsync_Internal(res);
if (signInStatus == NiconicoSessionStatus.Success)
var (signInStatus, _) = __GetAccountAuthority_Internal(res);
if (signInStatus != NiconicoAccountAuthority.NotSignedIn)
{
await SignOutAsync();
try
{
await SignOutAsync();
}
catch { }
await Task.Delay(100);
}
}
22 changes: 0 additions & 22 deletions NiconicoToolkit.Shared/Activity/ActivityClient.cs

This file was deleted.

18 changes: 8 additions & 10 deletions NiconicoToolkit.Shared/Channels/ChannelClient.cs
Original file line number Diff line number Diff line change
@@ -120,22 +120,20 @@ static IEnumerable<ChannelVideoItem> GetChannelVideos(IHtmlDocument document)
var imageAnchorNode = itemNode.QuerySelector("div.item_left > a");
var imageNode = imageAnchorNode.QuerySelector("img");
var lastResNode = imageAnchorNode.QuerySelector("span.last_res");
var lengthNode = imageAnchorNode.QuerySelector("span.length");
var lengthNode = imageAnchorNode.QuerySelector("span[data-style='videoLength']");

item.ThumbnailUrl = imageNode.GetAttribute("src");
item.Length = lengthNode.TextContent.ToTimeSpan();
item.CommentSummary = lastResNode?.TextContent ?? string.Empty;
var ppv = imageAnchorNode.QuerySelector(".purchase_type > span");
if (ppv != null)
var ppv = imageAnchorNode.QuerySelector("span[data-style='paymentType']");
if (ppv != null && ppv.TextContent is { } token)
{
foreach (var token in ppv.ClassList)
switch (token)
{
switch (token)
{
case "all_pay": item.IsRequirePayment = true; break;
case "free_for_member": item.IsFreeForMember = true; break;
case "member_unlimited_access": item.IsMemberUnlimitedAccess = true; break;
}
case "all_pay": item.IsRequirePayment = true; break;
case "会員無料": item.IsFreeForMember = true; break;
case "member_unlimited_access": item.IsMemberUnlimitedAccess = true; break;
case "無料": break;
}
}
}
7 changes: 0 additions & 7 deletions NiconicoToolkit.Shared/Community/CommunityClient.cs
Original file line number Diff line number Diff line change
@@ -34,13 +34,6 @@ internal static class Urls
public const string CommunityV1CommunitiesApiUrl = $"{NiconicoUrls.CommunityV1ApiUrl}communities/";
}


public async Task<CommunityInfoResponse> GetCommunityInfoAsync(CommunityId communityId)
{
var res = await _context.GetJsonAsAsync<CommunityInfoResponseContainer>($"{NiconicoUrls.CeApiV1Url}community.info?id={communityId}", _options);
return res?.Response;
}

public Task<CommunityAuthorityResponse> GetCommunityAuthorityForLoginUserAsync(CommunityId communityId)
{
var url = new StringBuilder(Urls.CommunityV1CommunitiesApiUrl)
26 changes: 26 additions & 0 deletions NiconicoToolkit.Shared/ExtApi/ExtApiClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#nullable enable
using NiconicoToolkit.Video;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace NiconicoToolkit.ExtApi.Video;

public sealed class ExtApiClient
{
private readonly NiconicoContext _niconicoContext;

internal ExtApiClient(NiconicoContext niconicoContext)
{
_niconicoContext = niconicoContext;
}

public async Task<ThumbInfoResponse> GetVideoInfoAsync(VideoId videoId, CancellationToken ct = default)
{
return await _niconicoContext.GetXmlAsAsync<ThumbInfoResponse>($"https://ext.nicovideo.jp/api/getthumbinfo/{videoId}", ct);
}
}


188 changes: 188 additions & 0 deletions NiconicoToolkit.Shared/ExtApi/Video/ThumbInfoResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
#nullable enable
using AngleSharp.Dom;
using CommunityToolkit.Diagnostics;
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace NiconicoToolkit.ExtApi.Video;


[XmlRoot(ElementName = "nicovideo_thumb_response")]
public class ThumbInfoResponse
{

[XmlElement(ElementName = "thumb")]
public ThumbInfoData Data { get; set; }

[XmlElement(ElementName = "error")]
public Error? Error { get; set; }

[XmlAttribute(AttributeName = "status")]
public string Status { get; set; }


public bool IsOK => Status.Equals("ok", StringComparison.Ordinal);
}

[XmlRoot(ElementName = "tag")]
public class Tag
{
[XmlAttribute(AttributeName = "lock")]
public int Lock { get; set; }

[XmlText]
public string Text { get; set; }


public bool IsLocked => Lock == 1;
}

[XmlRoot(ElementName = "tags")]
public class Tags
{
[XmlElement(ElementName = "tag")]
public List<Tag> Tag { get; set; }

[XmlAttribute(AttributeName = "domain")]
public string Domain { get; set; }
}

[XmlRoot(ElementName = "thumb")]
public class ThumbInfoData
{

[XmlElement(ElementName = "video_id")]
public string VideoId { get; set; }

[XmlElement(ElementName = "title")]
public string Title { get; set; }

[XmlElement(ElementName = "description")]
public string Description { get; set; }

[XmlElement(ElementName = "thumbnail_url")]
public string ThumbnailUrlNotHttps { get; set; }

[XmlIgnore]
string? _thumbnailUrl;

[XmlIgnore]
public string ThumbnailUrl => _thumbnailUrl ??= ThumbnailUrlNotHttps.Replace("http://", "https://");

[XmlElement(ElementName = "first_retrieve")]
public DateTime PostAt { get; set; }

[XmlElement(ElementName = "length")]
public string LengthRaw { get; set; }

TimeSpan? _length;
public TimeSpan Length => _length ??= LengthRaw.ToTimeSpan();

[XmlElement(ElementName = "view_counter")]
public int ViewCount { get; set; }

[XmlElement(ElementName = "comment_num")]
public int CommentCount { get; set; }

[XmlElement(ElementName = "mylist_counter")]
public int MylistCount { get; set; }

[XmlElement(ElementName = "last_res_body")]
public string LastResBodyRaw { get; set; }

public string[] ParseLastComments()
{
return LastResBodyRaw.Split(' ');
}

[XmlElement(ElementName = "watch_url")]
public string WatchUrl { get; set; }

[XmlElement(ElementName = "thumb_type")]
public string ThumbType { get; set; }

[XmlElement(ElementName = "embeddable")]
public int Embeddable { get; set; }

[XmlElement(ElementName = "no_live_play")]
public int NoLivePlay { get; set; }

[XmlElement(ElementName = "tags")]
public Tags? Tags { get; set; }

[XmlElement(ElementName = "genre")]
public string Genre { get; set; }



[XmlElement(ElementName = "ch_id")]
public int ChId { get; set; }

[XmlElement(ElementName = "ch_name")]
public string? ChName { get; set; }

[XmlElement(ElementName = "ch_icon_url")]
public string? ChIconUrl { get; set; }




[XmlElement(ElementName = "user_id")]
public int UserId { get; set; }

[XmlElement(ElementName = "user_nickname")]
public string? UserNickname { get; set; }

[XmlElement(ElementName = "user_icon_url")]
public string? UserIconUrl { get; set; }

public (VideoProviderType ProviderType, int Id, string Name, string IconUrl) GetProviderData()
{
if (UserId > 0)
{
Guard.IsNotNull(UserNickname, nameof(UserNickname));
Guard.IsNotNull(UserIconUrl, nameof(UserIconUrl));

return (VideoProviderType.User, UserId, UserNickname, UserIconUrl);
}
else if (ChId > 0)
{
Guard.IsNotNull(ChName, nameof(ChId));
Guard.IsNotNull(ChIconUrl, nameof(ChIconUrl));

return (VideoProviderType.Channel, ChId, ChName, ChIconUrl);
}
else
{
throw new InvalidOperationException();
}
}
}

public enum VideoProviderType
{
User,
Channel
}

[XmlRoot(ElementName = "error")]
public class Error
{
[XmlElement(ElementName = "code")]
public string Code { get; set; }

[XmlElement(ElementName = "description")]
public string Description { get; set; }

ThumbInfoErrorCode? _errorCode;
public ThumbInfoErrorCode ErrorCode => _errorCode ??= Enum.Parse<ThumbInfoErrorCode>(Code);
}

public enum ThumbInfoErrorCode
{
NOT_FOUND,
COMMUNITY,
DELETED
}
11 changes: 6 additions & 5 deletions NiconicoToolkit.Shared/Follow/FollowClient.cs
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ internal static class Urls
public const string NvapiV1FollowingApiUrl = $"{NiconicoUrls.NvApiV1Url}users/me/following/";

public const string PublicV1FollowingApiUrl = $"{NiconicoUrls.PublicApiV1Url}user/followees/";
public const string UserFollowingApiUrl = $"{NiconicoUrls.UserApiV1Url}user/followees/";
}


@@ -136,22 +137,22 @@ public async Task<FollowUsersResponse> GetFollowUsersAsync(int pageSize, FollowU
[RequireLogin]
public Task<ContentManageResult> AddFollowUserAsync(UserId userId)
{
return _followClient.AddFollowInternalAsync($"{Urls.PublicV1FollowingApiUrl}niconico-users/{userId}.json");
return _followClient.AddFollowInternalAsync($"{Urls.UserFollowingApiUrl}niconico-users/{userId}.json");
}


/// <remarks>[Require Login]</remarks>
[RequireLogin]
public Task<ContentManageResult> RemoveFollowUserAsync(UserId userId)
{
return _followClient.RemoveFollowInternalAsync($"{Urls.PublicV1FollowingApiUrl}niconico-users/{userId}.json");
return _followClient.RemoveFollowInternalAsync($"{Urls.UserFollowingApiUrl}niconico-users/{userId}.json");
}

/// <remarks>[Require Login]</remarks>
[RequireLogin]
public Task<bool> IsFollowingUserAsync(UserId userId)
{
return _followClient.GetFollowedInternalAsync($"https://public.api.nicovideo.jp/v1/user/followees/niconico-users/{userId}.json");
return _followClient.GetFollowedInternalAsync($"{Urls.UserFollowingApiUrl}niconico-users/{userId}.json");
}
}

@@ -330,7 +331,7 @@ public async Task<ContentManageResult> AddFollowCommunityAsync(CommunityId commu
headers.Add("X-Requested-By", communityJoinPageUrl.OriginalString);
});

var result = await res.Content.ReadAsAsync<ResponseWithMeta>();
var result = await res.Content.ReadJsonAsAsync<ResponseWithMeta>();
return result.Meta.IsSuccess ? ContentManageResult.Success : ContentManageResult.Failed;
}

@@ -443,7 +444,7 @@ private async Task<bool> GetFollowedInternalAsync(string uri)
headers.Add("X-Request-With", "https://www.nicovideo.jp/my/follow");
});

var result = await res.Content.ReadAsAsync<FollowedResultResponce>(_defaultOptions);
var result = await res.Content.ReadJsonAsAsync<FollowedResultResponce>(_defaultOptions);
return result.Data.IsFollowing;
}

Loading