Guest User

Untitled

a guest
Jan 25th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. use v6;
  2. use HTTP::UserAgent;
  3. use JSON::Fast;
  4.  
  5. constant API = "5vtqfnm9ud3tzr3atmv8suw3";
  6. my $ua = HTTP::UserAgent.new;
  7. my $response = $ua.get("http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/top_rentals.json?limit=10&country=us&apikey=blah");
  8. my $x = from-json ($response.content);
  9. my $y = to-json($x, :pretty);
  10. spurt $y, "testJson.txt"
Add Comment
Please, Sign In to add comment