Skip to content

Commit d78a2d9

Browse files
user-broadcast-historyのv1 apiの提供が終了したためv2に切り替え
1 parent 0eff3de commit d78a2d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

NicoSitePlugin2/Api.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ public static async Task PostBroadcasterComment(IDataSource server, CookieContai
3939

4040
public static async Task<UserLiveInfo[]> GetCurrentUserLiveId(IDataSource server, CookieContainer cc, string UserId){
4141
//下記のAPIから、過去の放送や放送状況がとれる。
42-
//"https://live.nicovideo.jp/front/api/v1/user-broadcast-history?providerId=userId&providerType=user&limit=1"
42+
//"https://live.nicovideo.jp/front/api/v2/user-broadcast-history?providerId=48495285&providerType=user&isIncludeNonPublic=false&offset=0&limit=1&withTotalCount=true"
4343
//放送したことがない場合は
4444
//{"meta":{"status":200},"data":{"programsList":[],"hasNext":false,"totalCount":0}}
4545
//が返ってくる
4646

47-
var url = $"https://live.nicovideo.jp/front/api/v1/user-broadcast-history?providerId={UserId}&providerType=user&limit=1";
47+
48+
var url = $"https://live.nicovideo.jp/front/api/v2/user-broadcast-history?providerId={UserId}&providerType=user&isIncludeNonPublic=false&offset=0&limit=1&withTotalCount=true";
4849
var res = await server.GetAsync(url, cc);
4950
dynamic d = JsonConvert.DeserializeObject(res);
5051
if (d.meta.status != 200)

0 commit comments

Comments
 (0)