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

9
LINES

< > BotCompany Repo | #1009893 // youTubeSubCount

JavaX fragment (include)

static long youTubeSubCount(S channel) {
  channel = assertNempty(parseYouTubeChannel(channel));
  S url ="https://www.googleapis.com/youtube/v3/channels?part=statistics&id=\*channel*/&key=" + youTubeDataAPIKey();
  Map map = cast loadJSONPage(url);
  L items = cast map.get("items");
  Map item = cast first(items);
  Map statistics = cast item.get("statistics");
  ret toLong(statistics.get("subscriberCount"));
}

Author comment

Began life as a copy of #1009890

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009893
Snippet name: youTubeSubCount
Eternal ID of this version: #1009893/4
Text MD5: b6547c3089637c1983266aab056e9f23
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-23 22:52:56
Source code size: 423 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 410 / 458
Version history: 3 change(s)
Referenced in: [show references]