Skip to content

Instantly share code, notes, and snippets.

@ninjinkun
Created February 14, 2012 07:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ninjinkun/1824516 to your computer and use it in GitHub Desktop.
Save ninjinkun/1824516 to your computer and use it in GitHub Desktop.
Itunes Connect Report Downloader
#!perl
use common::sense;
use HTTP::Request::Common;
use LWP::UserAgent;
use URI;
use Compress::Zlib;
use Perl6::Say;
my $uri = URI->new("https://reportingitc.apple.com/autoingestion.tft");
my $req = POST($uri, {
USERNAME => "",
PASSWORD => "",
VNDNUMBER => "", ## ITC Vender ID
TYPEOFREPORT => "Sales",
DATETYPE => "Weekly", ## Daily or Weekly
REPORTTYPE => "Summary", ## Summary
REPORTDATE => "", ## YYYYMMDD
});
my $ua = LWP::UserAgent->new;
my $res = $ua->request($req);
say Compress::Zlib::memGunzip($res->content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment