Rubygem for the SWAPI.CO
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
coverage update all gems Oct 25, 2016
lib refact Oct 25, 2016
spec
.gitignore
.ruby-version
.travis.yml
Gemfile add coverall Jan 16, 2016
Gemfile.lock
README.md version 1.0 Oct 26, 2016
Rakefile add films call Jan 13, 2016
swgem.gemspec

README.md

SWGEM

Coverage Status Build Status Code Climate

Gem Version {1.0.0} | Ruby Version {2.3.1}

API Documentation ~> http://swapi.co/documentation

Films

 films  = SWGEM::Films.new
 film   = films.all
 film   = films.by_id(id)
 film   = films.by_episode(episode_id)
 film   = films.search(str)
 status = films.validate_api_status

People

 people  = SWGEM::People.new
 person  = person.all
 person  = person.by_id(id)
 person  = person.search(str)
 status  = person.validate_api_status

Starships

 starships = SWGEM::Starships.new
 starship  = starships.all
 starship  = starships.by_id(id)
 starship  = starships.search(str)
 status    = starships.validate_api_status

Vehicles

 vehicles = SWGEM::Vehicles.new
 vehicles = vehicles.all
 vehicle  = vehicles.by_id(id)
 vehicle  = vehicles.search(str)
 status   = vehicles.validate_api_status

Species

 species = SWGEM::Species.new
 specie  = species.all
 specie  = species.by_id(id)
 specie  = species.search(str)
 status  = species.validate_api_status

Planets

 planets = SWGEM::Planets.new
 planet  = planets.all
 planet  = planets.by_id(id)
 planet  = planets.search(str)
 status  = planets.validate_api_status

Run Tests

 git clone https://github.com/igordcsouza/swgem.git
 cd swgem/
 bundle install
 rspec