Skip to content

Commit

Permalink
Add main_image_thumburl method to Page
Browse files Browse the repository at this point in the history
  • Loading branch information
panaak authored and pietromenna committed Jan 13, 2018
1 parent edf8c52 commit 55bfea0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/wikipedia/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def main_image_url
page['thumbnail']['source'].sub(/\/thumb/, '').sub(/\/[^\/]*$/, '') if page['thumbnail']
end

def main_image_thumburl
page['thumbnail']['source'] if page['thumbnail']
end

def coordinates
page['coordinates'].first.values if page['coordinates']
end
Expand Down

0 comments on commit 55bfea0

Please sign in to comment.