Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

GooseNinja/apis-is-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby wrapper for the apis.is API

Overview

Gem Version Build Status Coverage Status Dependency Status Inline docs

Description

This gem wraps the apis.is API in a simple wrapper that is easy to use within your ruby projects

Project Page
Project Github Page

Installation

To install this gem you can either type:

gem install apis-is

in the terminal or you can add this to your gemfile

gem 'apis-is'

And then execute:

$ bundle

Making requests

Using this wrapper is very simple, and you can use it for the following apis.is endpoints

  • Icelandic Bus System
  • Cars in Iceland
  • Icelandic cinema
  • Icelandic companies
  • Currency in relation to ISK
  • Bicyclecounter in Reykjavik
  • Earthquakes in Iceland
  • International flights in Iceland
  • Icelandic lottery
  • Particulates in Reykjavik
  • Icelandic Weather
  • Icelandic television schedules

Ruby Example

require 'apis'

# Fetch all active busses
response = Apis.busses

# prints out all active busses
puts response[:results]

# Fetch all busses by bus number
response = Apis.busses([1, 4, 14])

# prints out active busses number 1, 4 and 14
puts response[:results]

Rails Example

# in your Gemfile add
gem 'apis-is', require: 'apis'

# Then in your controller you can do
@response = Apis.busses

# And in your view file
<%= @response[:results] %>

About

A simple API wrapper for the apis.is API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages