1 | static long youTubeSubCount(S channel) {
|
2 | channel = assertNempty(parseYouTubeChannel(channel)); |
3 | S url ="https://www.googleapis.com/youtube/v3/channels?part=statistics&id=\*channel*/&key=" + youTubeDataAPIKey(); |
4 | Map map = cast loadJSONPage(url); |
5 | L items = cast map.get("items");
|
6 | Map item = cast first(items); |
7 | Map statistics = cast item.get("statistics");
|
8 | ret toLong(statistics.get("subscriberCount"));
|
9 | } |
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: | 721 / 762 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |