frinkiac 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 753ed7748829a1d8a6aeef0ea217310a45fdafb6
4
- data.tar.gz: 68385591600c5c1460bac35b7d60d110ad7fbf4b
3
+ metadata.gz: 020f4e9f5bb8acd2161a58911384c7683cb2d8a0
4
+ data.tar.gz: 2862811574faf14083cf0721c658bbaaae54f253
5
5
  SHA512:
6
- metadata.gz: 2f50526b7a01cf65c0d1e19d718fe5f33ac85137328f9919dac153e6b1fb61be7db927487a564527cc3ea96d16f41ff93f499694329a9636e62a9ac37996cc49
7
- data.tar.gz: d86d02d7ab988fd0b21a95f63eea36e24ba478d192e59fdcb1db5c850ebf59c6e913deae8c3c061e463648b14c6b2c3b97fbec7a90b5321e1dc7cc7868829f75
6
+ metadata.gz: c0814758e2d22f021277858ca46de1552bd8140da59fbe5ea8bdbabfa488c643ae057945687e76e0ce3b41e89b423767a1986a5fb27483430103302a86a452fd
7
+ data.tar.gz: 41f41b1e382cb9974b27ecdc1b018a46c46b79b5abc33c1829069c529e9fb37c840d40b781a47edd126edcec632783d24f5046856651590ff5c686a1da2933cd
data/README.md CHANGED
@@ -1,56 +1,58 @@
1
1
  # Frinkiac
2
2
 
3
- A ruby wrapper to interact with Frinkiac.com API based Ben Lewis's post: [Wrapping Your API In A Custom Ruby Gem](https://blog.engineyard.com/2014/wrapping-your-api-in-a-ruby-gem).
3
+ A ruby wrapper to interact with Frinkiac.com API based on Ben Lewis's post: [Wrapping Your API In A Custom Ruby Gem](https://blog.engineyard.com/2014/wrapping-your-api-in-a-ruby-gem).
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'frinkiac', '~> 0.0.1'
10
+ gem 'frinkiac', '~> 0.0.4'
11
11
  ```
12
12
 
13
13
  And then execute:
14
14
 
15
- $ bundle
15
+ $ bundle install
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install frinkiac
19
+ $ gem install frinkiac -v 0.0.4
20
20
 
21
21
  ## Usage
22
22
 
23
- Tha main object defined in this gem is ```Frinkiac::Screencap```, which gives us easy access to the attributes returned by the API: ```id```, ```episode``` and ```timestamp```.
23
+ There are a couple ways to get screencaps from the Frinkiac API through this gem.
24
24
 
25
- It also provides an ```image_url``` method, that takes the episode and timestamp information to return a valid image url.
26
-
27
- You can also get the ```caption``` from the image, as well as the ```meme_url```, which returns the caption overlaid on top of the image.
28
-
29
- You can also specify your own caption for the meme URL like so:
25
+ You can get an array of screencaps that match a specific search term:
30
26
 
31
27
  ```
32
- screencap.meme_url("I love those lazy Saturdays")
28
+ Frinkiac::Screencap.search('lazy saturday')
33
29
  ```
34
30
 
35
- Or multiple lines of text like so
31
+
32
+ And you can get a random screencap from the aforementioned array of screencaps:
36
33
 
37
34
  ```
38
- screencap.meme_url(["I love those lazy Saturdays", "Unlike that fake Saturday that almost got me fired"])
35
+ Frinkiac::Screencap.random('lazy saturday')
39
36
  ```
40
37
 
41
- Currently there are only two ways to interact with the API through this gem.
38
+ After getting a screencap object, you now have easy access to the attributes: ```id```, ```episode``` and ```timestamp```.
42
39
 
43
- You can get an array of screencaps that match a specific search term:
40
+ The ```Frinkiac::Screencap``` object also gives you access to some helper methods to make your life easier.
44
41
 
45
- ```
46
- Frinkiac::Screencap.search('lazy saturday')
47
- ```
42
+ There's the ```image_url``` method that returns a valid image url based on the episode and timestamp information returned by the API.
48
43
 
44
+ The ```caption``` method hits the API's caption endpoint and returns a string of the original screencap's caption.
49
45
 
50
- And you can get a random screencap from the afromentioned array of screencaps:
46
+ And finally, there's the ```meme_url```. When used without params, this returns the original caption overlaid on top of the image.
47
+
48
+ You can also customize the image by overlaying your own captions on top of the image like so:
51
49
 
52
50
  ```
53
- Frinkiac::Screencap.random('lazy saturday')
51
+ screencap.meme_url("I love those lazy Saturdays")
52
+ ```
53
+ Or multiple lines of text like so:
54
+ ```
55
+ screencap.meme_url(["I love those lazy Saturdays", "Unlike that fake Saturday that almost got me fired"])
54
56
  ```
55
57
 
56
58
  ## Development
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "frinkiac"
8
8
  spec.version = Frinkiac::VERSION
9
9
  spec.authors = ['Cesar Camacho']
10
- spec.email = ['ccamacho@gapintelligence.com']
10
+ spec.email = ['chanko@gmail.com']
11
11
 
12
12
  spec.summary = %q{Gem to wrap Frinkiac.com API}
13
13
  spec.description = %q{Gem to wrap Frinkiac.com API}
@@ -1,3 +1,3 @@
1
1
  module Frinkiac
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frinkiac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cesar Camacho
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2019-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,7 +138,7 @@ dependencies:
138
138
  version: 1.0.0
139
139
  description: Gem to wrap Frinkiac.com API
140
140
  email:
141
- - ccamacho@gapintelligence.com
141
+ - chanko@gmail.com
142
142
  executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
@@ -175,9 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.4.6
178
+ rubygems_version: 2.6.12
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Gem to wrap Frinkiac.com API
182
182
  test_files: []
183
- has_rdoc: