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

18
LINES

< > BotCompany Repo | #1009898 // youTubeChannelInfo

JavaX fragment (include)

sclass YouTubeChannelInfo {
  S id, title, description, publishedAt;
}

static YouTubeChannelInfo youTubeChannelInfo(S channel) {
  channel = assertNempty(parseYouTubeChannel(channel));
  S url ="https://www.googleapis.com/youtube/v3/channels?part=snippet&id=\*channel*/&key=" + youTubeDataAPIKey();
  Map map = cast loadJSONPage(url);
  printStruct(map);
  new YouTubeChannelInfo info;
  //mapToObject(map, info);
  L items = cast map.get("items");
  Map item = cast first(items);
  mapToObject(item, info);
  Map snippet = cast item.get('snippet);
  mapToObject(snippet, info);
  ret info;
}

Author comment

Began life as a copy of #1009893

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: #1009898
Snippet name: youTubeChannelInfo
Eternal ID of this version: #1009898/6
Text MD5: 0e4dcf5e9ec7362df3cb90a2698849b9
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 23:01:17
Source code size: 610 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 458 / 468
Version history: 5 change(s)
Referenced in: [show references]