sclass MediumPost { S title, url, postID; long updatedAt; *() {} *(S *title, S *url) {} *(S *title, S *url, S *postID) {} *(S *title, S *url, S *postID, long *updatedAt) {} } static L getMediumPosts() { ret getMediumPosts("stefanreich"); } static L getMediumPosts(S username) { Map data = loadMediumJSON(username); new L lPosts; Map references = (Map) data.get("references"); Map posts = (Map) references.get("Post"); for (S postID : keys(posts)) { Map post = posts.get(postID); S uniqueSlug = getString(post, "uniqueSlug"); S link = "https://medium.com/@" + username + "/" + uniqueSlug; S title = or2(getString(post, "title"), "?"); long updatedAt = (long) post.get("updatedAt"); lPosts.add(new MediumPost(title, link, postID, updatedAt)); //psl(post); } ret reversedList(sortedByField(lPosts, "updatedAt")); }