slack_itc_autoingestion 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0636a2d33ebe1e9e64605e1b98b38a1dea55b39
|
4
|
+
data.tar.gz: 7e06555cd3e49ea1331894cfd563ed95d48b30ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 848a4d78b37e713361b0944ba667f77196328cd793fdfc8a623c5b1cf92edae42c56089761c2346b5e24643184ba08a06c07c2c9fb8a2be992a00e4b35858d78
|
7
|
+
data.tar.gz: 9b469961e6d09d814eecb48390e468bdd5b7f36f910fbe39054872c30b155e1a454b8b9399069b615258e98e963c89b346fb16253a402ebdf67ce8861fddf250
|
data/README.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# Slack iTunes Connect Autoingestion
|
2
2
|
|
3
|
-
This gem will add a Slack
|
3
|
+
This gem will add a Slack incoming webhook endpoint for pulling iTunes Connect report data and posting it back to your Slack channel.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
You can deploy a functioning app right to heroku:
|
8
|
+
|
9
|
+
[](https://heroku.com/deploy?template=https://github.com/thesoapcollective/slack_itc_autoingestion-app)
|
10
|
+
|
11
|
+
Or for a DIY setup, add this line to your application's Gemfile:
|
8
12
|
```ruby
|
9
13
|
gem 'slack_itc_autoingestion'
|
10
14
|
```
|
@@ -15,7 +19,12 @@ $ bundle install
|
|
15
19
|
```
|
16
20
|
|
17
21
|
## Configuration
|
18
|
-
|
22
|
+
You'll need to setup two integrations in your Slack:
|
23
|
+
|
24
|
+
1. An [Incoming Webhook](https://slack.com/services/new/incoming-webhook). The Webhook URL field will be used in your config below.
|
25
|
+
2. A [Slash Command](https://slack.com/services/new/slash-commands). 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.
|
26
|
+
|
27
|
+
By default, the config looks for options set in your environment variables. Override the defaults in `config/initializers/slack_itc_autoingestion.rb`:
|
19
28
|
|
20
29
|
```ruby
|
21
30
|
SlackItcAutoingestion.configure do |config|
|
@@ -30,10 +39,12 @@ end
|
|
30
39
|
|
31
40
|
## Usage
|
32
41
|
In any public Slack channel you can type:
|
33
|
-
`/itc [report_date] [
|
42
|
+
`/itc [report_date] [date_type] [report_type]`
|
43
|
+
|
44
|
+
`report_date` is date in the format `YYYYMMDD`. Defaults to 24 hours ago.
|
34
45
|
|
35
|
-
`report_date` is date in the format `YYYYMMDD`. Defaults to yesterday.
|
36
46
|
`date_type` is 'Daily' or 'Weekly'. Defaults to 'Daily'.
|
47
|
+
|
37
48
|
`report_type` is 'Summary' or 'Opt-In'. Defaults to 'Summary'.
|
38
49
|
|
39
50
|
## Contributing
|
@@ -33,7 +33,7 @@ class SlackItcAutoingestion::SlackController < ApplicationController
|
|
33
33
|
request.body = body.to_json
|
34
34
|
response = http.request request
|
35
35
|
|
36
|
-
render
|
36
|
+
render nothing: true, status: :ok
|
37
37
|
else
|
38
38
|
render json: {error: {message: slack.error_message}}, status: :bad_request
|
39
39
|
end
|