Iconik
This library gets the icon from the page of GooglePlay and the iTunes store .
Installation
Add this line to your application's Gemfile:
gem 'iconik'
And then execute:
$ bundle
Or install it yourself as:
$ gem install iconik
Usage
require "iconik"
# iTunes store
Iconik::ITunes.new('https://itunes.apple.com/jp/app/ingress/id576505181?mt=8').pluck_icon
=> "http://a5.mzstatic.com/us/r30/Purple4/v4/53/8c/f5/538cf5ae-f6fe-ef7b-15fd-bb7d7d84563a/mzl.vwbatafr.175x175-75.jpg"
# Google play
Iconik::GooglePlay.new('https://play.google.com/store/apps/details?id=com.nianticproject.ingress&hl=ja').pluck_icon
=> "https://lh3.ggpht.com/j8lGWdhEjmw5rVZ6CiJY_k5D0iPqp_jomAUdyS_n8v5SUQVb8Dt-USXUZXmx1QAca8zJ=w300"
#
# iTunes store
Iconik::AppStore.new('https://itunes.apple.com/jp/app/ingress/id576505181?mt=8').pluck_icon
=> "http://a5.mzstatic.com/us/r30/Purple4/v4/53/8c/f5/538cf5ae-f6fe-ef7b-15fd-bb7d7d84563a/mzl.vwbatafr.175x175-75.jpg"
# Google play
Iconik::AppStore.new('https://play.google.com/store/apps/details?id=com.nianticproject.ingress&hl=ja').pluck_icon
=> "https://lh3.ggpht.com/j8lGWdhEjmw5rVZ6CiJY_k5D0iPqp_jomAUdyS_n8v5SUQVb8Dt-USXUZXmx1QAca8zJ=w300"
TODO
- web thumbnail
- CI
Contributing
- Fork it ( https://github.com/kazuaking/iconik/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request