nicolv
v0.1.0
Published
nicolive API
Downloads
3
Readme
nicolv
Nicolive API for Node.js.
Installation
Using yarn:
$ yarn add nicolv
Using npm:
$ npm install nicolv
Example
const { getPrograminfo } = require("nicolv");
const userSession = "user_session_XXXXX";
const nicoliveProgramId = "lvXXXXX";
const { meta, data } = await getPrograminfo(userSession, nicoliveProgramId);
console.log(meta.status);
if (data !== undefined) {
console.log(data.title);
console.log(data.description);
}
API
getBroadcastable
GET https://live2.nicovideo.jp/unama/api/v2/broadcastable
function getBroadcastable(userSession: string, communityId?: string): Promise<GetBroadcastableResponse>;
getUserProgram
GET https://live2.nicovideo.jp/unama/tool/v1/broadcasters/user/:uid/program
function getUserProgram(uid: number | string): Promise<GetBroadcastersProgramResponse>;
getSocialGroupProgram
GET https://live2.nicovideo.jp/unama/tool/v1/broadcasters/social_group/:sid/program
function getSocialGroupProgram(sid: string): Promise<GetBroadcastersProgramResponse>;
postEnqueteResult
POST https://live2.nicovideo.jp/unama/watch/:nicoliveProgramId/enquete/result
function postEnqueteResult(userSession: string, nicoliveProgramId: string): Promise<PostEnqueteResultResponse>;
postEnquete
POST https://live2.nicovideo.jp/unama/watch/:nicoliveProgramId/enquete
function postEnquete(userSession: string, nicoliveProgramId: string, body: PostEnqueteRequest): Promise<PostEnqueteResponse>;
deleteEnquete
DELETE https://live2.nicovideo.jp/unama/watch/:nicoliveProgramId/enquete
function deleteEnquete(userSession: string, nicoliveProgramId: string): Promise<DeleteEnqueteResponse>;
getExtension
GET https://live2.nicovideo.jp/watch/:nicoliveProgramId/extension
function getExtension(userSession: string, nicoliveProgramId: string): Promise<GetExtensionResponse>;
postExtension
POST https://live2.nicovideo.jp/watch/:nicoliveProgramId/extension
function postExtension(userSession: string, nicoliveProgramId: string, body: PostExtensionRequest): Promise<PostExtensionResponse>;
getOnairs
GET https://live2.nicovideo.jp/unama/tool/v2/onairs/user
function getOnairs(userSession: string): Promise<GetOnairsResponse>;
putOperatorComment
PUT https://live2.nicovideo.jp/watch/:nicoliveProgramId/operator_comment
function putOperatorComment(userSession: string, nicoliveProgramId: string, body: PutOperatorCommentRequest): Promise<PutOperatorCommentResponse>;
deleteOperatorComment
DELETE https://live2.nicovideo.jp/watch/:nicoliveProgramId/operator_comment
function deleteOperatorComment(userSession: string, nicoliveProgramId: string): Promise<DeleteOperatorCommentResponse>;
getProgramSchedules
GET https://live2.nicovideo.jp/unama/tool/v1/program_schedules
function getProgramSchedules(userSession: string): Promise<GetProgramSchedulesResponse>;
getPrograminfo
GET https://live2.nicovideo.jp/unama/watch/:nicoliveProgramId/programinfo
function getPrograminfo(userSession: string, nicoliveProgramId: string): Promise<GetPrograminfoResponse>;
getProgramsCategories
GET https://live2.nicovideo.jp/unama/api/v2/programs/categories
function getProgramsCategories(): Promise<GetProgramsCategoriesResponse>;
getProgramsSsng
GET https://live2.nicovideo.jp/unama/tool/v2/programs/:nicoliveProgramId/ssng
function getProgramsSsng(userSession: string, nicoliveProgramId: string): Promise<GetProgramsSsngResponse>;
postProgramsSsng
POST https://live2.nicovideo.jp/unama/tool/v2/programs/:nicoliveProgramId/ssng
function postProgramsSsng(userSession: string, nicoliveProgramId: string, body: PostProgramsSsngRequest): Promise<PostProgramsSsngResponse>;
deleteProgramsSsng
DELETE https://live2.nicovideo.jp/unama/tool/v2/programs/:nicoliveProgramId/ssng
function deleteProgramsSsng(userSession: string, nicoliveProgramId: string, body: DeleteProgramsSsngRequest): Promise<DeleteProgramsSsngResponse>;
getPrograms
GET https://live2.nicovideo.jp/unama/api/v2/programs/:nicoliveProgramId
GET https://live2.nicovideo.jp/unama/api/v2/programs/latest
function getPrograms(userSession: string, nicoliveProgramId?: string): Promise<GetProgramsResponse>;
postPrograms
POST https://live2.nicovideo.jp/unama/api/v2/programs
function postPrograms(userSession: string, body: PostProgramsRequest): Promise<PostProgramsResponse>;
patchPrograms
PATCH https://live2.nicovideo.jp/unama/api/v2/programs/:nicoliveProgramId
function patchPrograms(userSession: string, nicoliveProgramId: string, body: PatchProgramsRequest): Promise<PatchProgramsResponse>;
patchQuotationContents
PATCH https://lapi.spi.nicovideo.jp/v1/tools/live/contents/:contentId/quotation/contents
function patchQuotationContents(userSession: string, contentId: string, body: PatchQuotationContentsRequest): Promise<PatchQuotationContentsResponse>;
patchQuotationLayout
PATCH https://lapi.spi.nicovideo.jp/v1/tools/live/contents/:contentId/quotation/layout
function patchQuotationLayout(userSession: string, contentId: string, body: PatchQuotationLayoutRequest): Promise<PatchQuotationLayoutResponse>;
getQuotation
GET https://lapi.spi.nicovideo.jp/v1/tools/live/contents/:contentId/quotation
function getQuotation(userSession: string, contentId: string): Promise<GetQuotationResponse>;
postQuotation
POST https://lapi.spi.nicovideo.jp/v1/tools/live/contents/:contentId/quotation
function postQuotation(userSession: string, contentId: string, body: PostQuotationRequest): Promise<PostQuotationResponse>;
deleteQuotation
DELETE https://lapi.spi.nicovideo.jp/v1/tools/live/contents/:contentId/quotation
function deleteQuotation(userSession: string, contentId: string): Promise<DeleteQuotationResponse>;
putSegment
PUT https://live2.nicovideo.jp/watch/:nicoliveProgramId/segment
function putSegment(userSession: string, nicoliveProgramId: string, body: PutSegmentRequest): Promise<PutSegmentResponse>;
getStatistics
GET https://live2.nicovideo.jp/watch/:nicoliveProgramId/statistics
function getStatistics(userSession: string, nicoliveProgramId: string): Promise<GetStatisticsResponse>;
getUserCommentPermission
GET https://live2.nicovideo.jp/unama/watch/:nicoliveProgramId/user_comment_permission
function getUserCommentPermission(userSession: string, nicoliveProgramId: string): Promise<GetUserCommentPermissionResponse>;
getUserNickname
GET https://api.live2.nicovideo.jp/api/v1/user/nickname
function getUserNickname(userId: number | string): Promise<GetUserNicknameResponse>;
getVideoContents
GET https://lapi.spi.nicovideo.jp/v1/tools/live/quote/services/video/contents/:contentId
function getVideoContents(userSession: string, contentId: string): Promise<GetVideoContentsResponse>;
License
MIT