¶ ↑
itunes_connectThis gem provides a very simple command-line utility and backing “library” (if I can be so bold to use the term in this context) for accessing sales reports from Apple’s iTunes Connect website. If you want to automate getting reports out of the App Store, this tool is for you.
¶ ↑
Usage¶ ↑
Command-Line UsageThis gem comes with the itunes_connect
executable which you can use to download reports, import into a sqlite database and report from.
You can specify the default values for a handful of command-line options by putting them in a file named .itunesrc
in your home directory. The file is in YAML format and should have the following keys:
* username * password * database (path to sqlite3 file, optional)
¶ ↑
Downloading ReportsYou can download reports from iTunes Connect using itunes_connect download
. You may specify your iTunes Connect credentials on the command line or you can put them in YAML format in ~/.itunesrc
with the keys of :username
and :password
.
You can also dump the report to a file (or standard out):
itunes_connect download -o /tmp/report.txt
Or you can dump it directly into a sqlite3 database:
itunes_connect download -b /tmp/report.db
By default the download
command will retrieve the most recent daily report. If you have a database
key in your ~/.itunesrc
file and you _don’t_ specify an out file, the report will be automatically imported into the database.
You can also ask for weekly or monthly reports by using the -r
command-line option. Note that you can not import a montly report directly into the database because the monthly reports don’t have any days associated with the entries.
Run itunes_connect help download
for full usage details.
¶ ↑
Importing ReportsThe import
command allows you to dump an existing report file into the database. This is useful if you’ve already downloaded a number of reports from iTunes Connect and you just want to put them into the database.
Run itunes_connect help import
for full usage details.
¶ ↑
ReportingThe report
command queries your database and can produce either detailed, or grouped output. In both cases you can constrain the query to any combination of country, start date and end date.
Run itunes_connect help report
for full usage details.
¶ ↑
Programmatic UsageSee the documentation for the ItunesConnect::Connection, ItunesConnect::Report and ItunesConnect::Store classes for details.
¶ ↑
Note on Patches/Pull Requests-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but
bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
¶ ↑
CopyrightCopyright © 2009 Alex Vollmer. See LICENSE for details.