View on GitHub

Imgin

Imigin is a ruby gem that is used to import an image url.

Download this project as a .zip file Download this project as a tar.gz file

ImgIn

What is ImgIn?

ImgIn allows you to get a random image with your specified content search. It also has the capability to specify a size of image.

Getting Started

Installation

Install ImgIn gem.

$ gem install imgin

Usage

Require ImgIn at the top of your file.

require 'imgin'

Fetch one image URL.

Imgin::Image.get( **insert your string** )

Place the Imgin get command anywhere in your ruby code that you need an image url. Here's an example:

Imgin::Image.get("banana slug") # => "fc06.deviantart.net/fs71/i/2013/022/3/7/banana_slugs_by_hanakoheals-d5scksb.jpg"

An extra parameter can be added in order to obtain a specific size of image. Here's an example of that:

Imgin::Image.get("banana slug", "medium") # => "fc06.deviantart.net/fs71/i/2013/022/3/7/banana_slugs_by_hanakoheals-d5scksb.jpg"

There size options are icon, medium, large, and wallpaper.

The URL can be used for whatever case you might need it. It picks an image at random out of about 50 images that meet the search parameters you entered. So, you won't recieve the same image too many times if you would like to repeat the population of images. Also, the image generally will not be the same if the command is run again.

Here's what the above URL goes to(if you're curious): http://fc06.deviantart.net/fs71/i/2013/022/3/7/banana_slugs_by_hanakoheals-d5scksb.jpg

Major Features

Technology Stack

Contributors