lita-reddit-image 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44021ae429198786e877dfb842264593cf14370871aa8b783e4f34c9ea9444da
4
- data.tar.gz: 3beba85ced69c47d9d969c05db6e3c57f582571e94948f3a112db47fb2c20c28
3
+ metadata.gz: 549cba4775ad2765b59ea02a2f7d986483e9cf1815e2e807cff01cbb2134f064
4
+ data.tar.gz: d2c3610f8aceff5760cc5e87427ae3781eec7679da7250d771bbbcdcf83307e3
5
5
  SHA512:
6
- metadata.gz: bc0164958fa0b524252efe9f600728b44bfdf0d1ad522da35f2857f235f6ff413e88eac720bd974d76890b139b51eade978c5ffb9e4ebd3232642ce48fe17134
7
- data.tar.gz: 79745eae1e7140f3437df3cfbced982013016b4127e2bec97562aec0413cc79e0e9378a84cd7ae792f30ae3ccc54995ee293a7159e2c3af05dd0ce12bdeb197d
6
+ metadata.gz: e9ebbc8db996fd979c173d956bc428d694406b1ba6878e7f138b45981ceb32d0cb73611569eb1a010ff0f4a665331ef69f71271c5fe382c784fba42edc104a5c
7
+ data.tar.gz: 4e6321a172bdb2d10217c133ed42538025950f821d9566b2a0eced6946b44b5a5c510363ca89f674d243b3a03c60895d17537a16759d23e6ec014dad51cf1715
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # lita-reddit-image
2
2
 
3
- Lita handler for querying images from Reddit
4
-
5
- TODO: Add a description of the plugin.
3
+ Lita handler for querying images from Reddit.
6
4
 
7
5
  ## Installation
8
6
 
@@ -14,8 +12,28 @@ gem "lita-reddit-image"
14
12
 
15
13
  ## Configuration
16
14
 
17
- TODO: Describe any configuration attributes the plugin exposes.
15
+ Only 2 required parameters:
16
+ * Your Reddit username
17
+ * Your Reddit App Id
18
+
19
+ Create a new Reddit App and get an App Id.
20
+
21
+ Your username is used in the User-Agent headers for querying the Reddit API, as
22
+ requested by Reddit developers.
23
+
24
+ ```ruby
25
+ Lita.configure do |config|
26
+ config.handlers.reddit_image.app_id = "reddit_developer_app_id"
27
+ config.handlers.reddit_image.username = "reddit_username"
28
+ end
29
+ ```
18
30
 
19
31
  ## Usage
20
32
 
21
- TODO: Describe the plugin's features and how to use them.
33
+ Use the following syntax: `/r/[subreddit] [query]` to fetch an image from Reddit.
34
+
35
+ Ex. Get a nice happy bunny from /r/aww 🐇
36
+
37
+ ```
38
+ Lita /r/aww Bunny
39
+ ```
@@ -37,6 +37,7 @@ module Lita
37
37
  sleep 0.5
38
38
  rescue StandardError => e
39
39
  Lita.logger.warn("Couldn't fetch image from Reddit: " + e.message)
40
+ response.reply("I couldn't fetch an image from Reddit.")
40
41
  end
41
42
  end
42
43
 
@@ -3,7 +3,7 @@ require 'lita'
3
3
  module Lita
4
4
  module Handlers
5
5
  class RedditImage < Handler
6
- VERSION = '0.1.0'.freeze
6
+ VERSION = '0.1.1'.freeze
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-reddit-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime 'biximilien' Gauthier