This gem will add a Slack incoming webhook endpoint for pulling iTunes Connect report data and posting it back to your Slack channel.
You can deploy a functioning app right to heroku:
Or for a DIY setup, add this line to your application's Gemfile:
gem 'slack_itc_autoingestion'
And then run:
$ bundle install
You'll need to setup two integrations in your Slack:
- An Incoming Webhook. The Webhook URL field will be used in your config below.
- A Slash Command. The Command and Token fields will be used in your config below. The URL field should be something to the effect of https://example.com/slack_itc_autoingestion.
By default, the config looks for options set in your environment variables. Override the defaults in config/initializers/slack_itc_autoingestion.rb
:
SlackItcAutoingestion.configure do |config|
config.itc_username = ENV['ITUNES_CONNECT_USERNAME']
config.itc_password = ENV['ITUNES_CONNECT_PASSWORD']
config.itc_vendor_id = ENV['ITUNES_CONNECT_VENDOR_ID']
config.slack_token = ENV['SLACK_TOKEN']
config.slack_webhook_url = ENV['SLACK_WEBHOOK_URL']
config.slack_command = '/itc'
end
In any public Slack channel you can type:
/itc [report_date] [date_type] [report_type]
report_date
is date in the format YYYYMMDD
. Defaults to 24 hours ago.
date_type
is 'Daily' or 'Weekly'. Defaults to 'Daily'.
report_type
is 'Summary' or 'Opt-In'. Defaults to 'Summary'.
- Fork it ( https://github.com/[my-github-username]/slack_itc_autoingestion/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request