Rubygem for the SWAPI.CO
Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
coverage
lib
spec
.drone.yml
.gitignore
.ruby-version
.travis.yml
Dockerfile
Gemfile
Gemfile.lock
README.md
Rakefile
swgem.gemspec

README.md

SWGEM

Coverage Status Build Status Code Climate

Gem Version {1.0.0} | Ruby Version {2.4.0}

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