Skip to content
👩 Ruby library for いらすとや
HTML Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github/workflows
lib
spec
.rspec
.rubocop.yml
.rubocop_todo.yml
CODE_OF_CONDUCT.md
Gemfile
Gemfile.lock
Guardfile
LICENSE.txt
README.md
Rakefile
irasutoya.gemspec

README.md

Irasutoya

Gem Version Circle CI Code Climate codecov Libraries.io dependency status for GitHub repo GitHub

Irasutoya is ruby library for いらすとや

Installation

Add this line to your application's Gemfile:

gem 'irasutoya'

Usage

# Irasuto
irasuto = Irasutoya::Irasuto.random #=> returns Irasuto instance
irasuto.url
irasuto.title
irasuto.description
irasuto.image_url

irasuto_links = Irasutoya::Irasuto.search(query: 'おじさん', page: 3) #=> returns array of IrasutoLink instance

# Category
categories = Irasutoya::Category.all #=> returns array of Category instance
category = categories.first
category.title
category.list_url

irasuto_links = category.fetch_irasuto_links #=> returns array of IrasutoLink instance

# IrasutoLinks
irasuto_link = irasuto_links.first
irasuto_link.title
irasuto_link.show_url

irasuto = irasuto_link.fetch_irasuto #=> returns Irasuto instance

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/unhappychoice/irasutoya. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Irasutoya project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

You can’t perform that action at this time.