Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1020356 // youTubeGetLiveStreamID [works]

JavaX fragment (include)

1  
sS youTubeGetLiveStreamID(S videoID) {
2  
  videoID = extractYouTubeID(videoID);
3  
  S url = "https://www.googleapis.com/youtube/v3/videos?part=liveStreamingDetails&id=" + urlencode(videoID) + "&key=" + youTubeDataAPIKey();
4  
  Map map = cast loadJSONPage(url);
5  
  printStruct(map);
6  
  L<Map> items = cast map.get('items);
7  
  Map item = first(items);
8  
  if (item == null) null;
9  
  Map details = cast item.get('liveStreamingDetails);
10  
  ret getString(details, 'activeLiveChatId);
11  
}

Author comment

Began life as a copy of #1020355

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020356
Snippet name: youTubeGetLiveStreamID [works]
Eternal ID of this version: #1020356/9
Text MD5: 165ba85c0ad5f719444e731b0aeee557
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-16 18:25:56
Source code size: 477 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 223 / 274
Version history: 8 change(s)
Referenced in: [show references]