wikipedia_rest_client 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: b89100e886679d030ac8ea076c33288bc0d6191f629c30895fcea314aba699b7
4
- data.tar.gz: 26bc7f8adfabe4138e7a19cfd1ee29566285c1f5eb3efbe9ea7f7a9c279684bd
3
+ metadata.gz: 3327c3fd0e1d32012710af82c19bc2c321cee2fe7f97eafb097733c869faacf4
4
+ data.tar.gz: 9c09fdc3ea5fd6eb4ad86acd20f5269ed0afcdcfa755e2712037d589c0fbf1af
5
5
  SHA512:
6
- metadata.gz: 7cfcdf869e16557ce31eb7ef36ec428ef77b8cc57fdad278d58da25838dae200196bd4870c8cd2ced62e57004b3e076b47d00fc12d01d5246378383f0a8e8d11
7
- data.tar.gz: 85434dde0c555705a6dfa0ec8e10c40e6b7ab3ed32cf29a8ade343329ffaa1b92450d8550c4b69620787c77042a1b25cae3c75d2a1b294a54b6b028bf4122fb1
6
+ metadata.gz: a2e4f1e96ac0cbe367c27ec9d9d9759b229fb1598c57791c43df8b0cde5f14dd5415c429fcc02f589642d36f8c2bb1a2850211a3ccf0433f4a747e3bedcd0d9b
7
+ data.tar.gz: 8e7869345f82bfdc090d4347e32a2714449e74a237ea7dadb400f4234adefbe84a16f80036351b43d6bfea30b5480eb95e1c5db6181daa2719ea89652744016a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wikipedia_rest_client (0.1.1)
4
+ wikipedia_rest_client (0.1.2)
5
5
  httparty (~> 0.15.6)
6
6
  json (~> 2.0.2)
7
7
  nokogiri (>= 1.6.8)
data/README.md CHANGED
@@ -185,7 +185,7 @@ picture_of_the_day_for_a_date = WikipediaRestClient.get_image_of_the_day("2017/0
185
185
  picture_of_the_day_for_a_date.image_url
186
186
  #=> "https://upload.wikimedia.org/wikipedia/commons/4/4b/Cyclosia_papilionaris-Kadavoor-2016-06-17-001.jpg"
187
187
  picture_of_the_day_for_a_date.description_text
188
- #=> "<i><a rel=\"mw:WikiLink/Interwiki\" href=\"https://en.wikipedia.org/wiki/Cyclosia%20papilionaris\" title=\"en:Cyclosia papilionaris\">Cyclosia papilionaris</a></i>, Drury's Jewel, is a moth in the <a rel=\"mw:WikiLink/Interwiki\" href=\"https://en.wikipedia.org/wiki/Zygaenidae\" title=\"en:Zygaenidae\">Zygaenidae</a> family. There are many subspecies and this is <i>Cyclosia papilionaris australinda</i> found in <a rel=\"mw:WikiLink/Interwiki\" href=\"https://en.wikipedia.org/wiki/South%20India\" title=\"en:South India\">South India</a>."
188
+ #=> "Cyclosia papilionaris, Drury's Jewel, is a moth in the Zygaenidae family. There are many subspecies and this is Cyclosia papilionaris australinda found in South India."
189
189
  ```
190
190
 
191
191
  It will have the following information,
@@ -228,9 +228,9 @@ on_that_day[0]["text"]
228
228
  ### Get News
229
229
 
230
230
  ```ruby
231
- on_this_day_content = WikipediaRestClient.get_news
231
+ news = WikipediaRestClient.get_news
232
232
  #=> Returns 'news' contents of the current date
233
- on_that_day = WikipediaRestClient.get_news(<DATE>) #Date Should be in YYYY/MM/DD Format
233
+ news_on_specified_date = WikipediaRestClient.get_news(<DATE>) #Date Should be in YYYY/MM/DD Format
234
234
  #=> Returns 'news' contents of the specified date
235
235
  ```
236
236
 
@@ -247,9 +247,9 @@ news[0]["links"]
247
247
  ### Most-Read articles of the day
248
248
 
249
249
  ```ruby
250
- on_this_day_content = WikipediaRestClient.get_most_read
250
+ most_read_content = WikipediaRestClient.get_most_read
251
251
  #=> Returns 'most read' contents of the current date
252
- on_that_day = WikipediaRestClient.get_most_read(<DATE>) #Date Should be in YYYY/MM/DD Format
252
+ most_read_on_specified_day = WikipediaRestClient.get_most_read(<DATE>) #Date Should be in YYYY/MM/DD Format
253
253
  #=> Returns 'most read' contents of the specified date
254
254
  ```
255
255
 
@@ -55,17 +55,17 @@ module WikipediaRestClient
55
55
 
56
56
  # Returns the source of the thumbnail image
57
57
  def thumbnail_source
58
- @data["thumbnail"]["source"]
58
+ @data["thumbnail"]["source"] if @data["thumbnail"]
59
59
  end
60
60
 
61
61
  # Returns the width of the thumbnail image
62
62
  def thumbnail_width
63
- @data["thumbnail"]["width"]
63
+ @data["thumbnail"]["width"] if @data["thumbnail"]
64
64
  end
65
65
 
66
66
  # Returns the height of the thumbnail image
67
67
  def thumbnail_height
68
- @data["thumbnail"]["height"]
68
+ @data["thumbnail"]["height"] if @data["thumbnail"]
69
69
  end
70
70
 
71
71
  # Returns the language of that page
@@ -100,17 +100,17 @@ module WikipediaRestClient
100
100
 
101
101
  # Returns the url of the main image in the page
102
102
  def image_url
103
- @data["originalimage"]["source"]
103
+ @data["originalimage"]["source"] if @data["originalimage"]
104
104
  end
105
105
 
106
106
  # Returns width of the main image it the page
107
107
  def image_width
108
- @data["originalimage"]["width"]
108
+ @data["originalimage"]["width"] if @data["originalimage"]
109
109
  end
110
110
 
111
111
  # Returns height of the main image it the page
112
112
  def image_height
113
- @data["originalimage"]["height"]
113
+ @data["originalimage"]["height"] if @data["originalimage"]
114
114
  end
115
115
 
116
116
  # Returns page url (desktop)
@@ -1,4 +1,4 @@
1
1
  module WikipediaRestClient
2
2
  # Version number of the gem
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikipedia_rest_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Balaji
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-26 00:00:00.000000000 Z
11
+ date: 2018-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler