!752 static class Msg { S type, user, text, ts; O reactions; } static S data; static new L msgs; // Note: They're in reverse order! static S token = "xoxp-11444506721-15584660016-15602755169-10849bef29"; static S channelID = "C0FH9PY8J"; // #talkingbots static S oldest = "1449245380.000382"; // timestamp of first msg to get p { S url = "https://slack.com/api/channels.history"; S postData = "token=" + urlencode(token) + "&channel=" + urlencode(channelID) + "&oldest=" + urlencode(oldest); data = doPost(postData, url); Map map = cast jsonDecode(data); assertTrue(map.get("ok")); List _msgs = cast map.get("messages"); msgs = new ArrayList(); for (Map msg : _msgs) { new Msg m; m.type = (S) msg.get("type"); m.user = (S) msg.get("user"); m.text = (S) msg.get("text"); m.ts = (S) msg.get("ts"); m.reactions = msg.get("reactions"); msgs.add(m); print(structure(m)); } print(l(msgs) + " messages sucked from slack channel."); }