itch_rewards 0.1.0 → 0.1.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +25 -2
- data/lib/itch_rewards/cli.rb +2 -0
- data/lib/itch_rewards/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09339867260615e2545070bcd86432c777ec9099065c3ac5c7b5930af5dfce16'
|
4
|
+
data.tar.gz: 9c39ebb24a130d463bc6c99908a54c796785103293a73008a32f64d868b05103
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fd311f3d0157e88e0ec050d20a3affeecaaf002aea53e7b491826056e2d859f05a19446f760cae0b6e83370258db8d569fcff5bc62587a56ae7f34986ff4933
|
7
|
+
data.tar.gz: 775d1ed4d31eb7cc478b6a9c968ed883ad2762e5718057ff1b171701cb80d994818f926063ab2634d3d2e52d247cda49e226247a4bd31038b53d71e264735ca5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -57,7 +57,7 @@ While logging in via cookies is easier (and required for non-interactive login,
|
|
57
57
|
|
58
58
|
### List games
|
59
59
|
|
60
|
-
Return a list of game names and IDs. Useful for other commands that use game ID, or when creating a [reward configuration file](#
|
60
|
+
Return a list of game names and IDs. Useful for other commands that use game ID, or when creating a [reward configuration file](#reward-configuration).
|
61
61
|
|
62
62
|
|
63
63
|
```shell
|
@@ -136,7 +136,30 @@ Options:
|
|
136
136
|
--[no-]save # Saves changes when enabled. Otherwise, dry-run and show result, default: false
|
137
137
|
```
|
138
138
|
|
139
|
-
|
139
|
+
|
140
|
+
#### Reward configuration
|
141
|
+
|
142
|
+
Automatic reward updates require a reward configuration file. You can create an annotated file, prepopulated with all of your itch games by using the [setup command](#authenticating).
|
143
|
+
|
144
|
+
A reward configuration looks like this
|
145
|
+
|
146
|
+
```yml
|
147
|
+
---
|
148
|
+
games:
|
149
|
+
MyGame:
|
150
|
+
id: 123456
|
151
|
+
reward_id: 789012
|
152
|
+
reward_by_purchase: 0
|
153
|
+
reward_by_tip: 0.0
|
154
|
+
reward_offset: 0
|
155
|
+
minimum_available: 0
|
156
|
+
reward_description_template:
|
157
|
+
|
158
|
+
MyOtherGame:
|
159
|
+
...
|
160
|
+
```
|
161
|
+
|
162
|
+
#### Some example reward scenarios
|
140
163
|
|
141
164
|
> I want every purchase to add one community copy
|
142
165
|
|
data/lib/itch_rewards/cli.rb
CHANGED
@@ -100,6 +100,8 @@ module ItchRewards
|
|
100
100
|
desc "Save cookies for itch.io and create reward config example file"
|
101
101
|
def call(**options)
|
102
102
|
options[:cookies] ||= cli.ask("Where would you like to store your login cookies? ", default: ".itch-cookies.yml")
|
103
|
+
options[:interactive] = true
|
104
|
+
|
103
105
|
if authenticated_client(options)
|
104
106
|
cli.say "Saved cookies to #{options[:cookie_path]}"
|
105
107
|
else
|
data/lib/itch_rewards/version.rb
CHANGED