film = options.get("film");
info resp;
status = resp.tomap().get("status");
if(status == "OK")
{
elem = resp.tomap().get("rows").get(0).get("elements").get(0).toMap();
message = Map();
if(elem.get("status") == "OK")
{
rating = elem.get("rating").toMap().get("text");
card = Map();
card.put("title",film);
message.put("card",card);
card.put("thumbnail","<Insert_Image_URL>");
message.put("text",rating + "\n" + mapUrl);
return message;
}
}
message = Map();
message.put("text","Sorry, movie review is currently unavailable");
return message;