Code Monkey home page Code Monkey logo

swapi's Introduction

Complete Star Wars API.

Requirements

Node.Js >=10
Docker >= 15
Mongo >= 3


To run the server.

$git clone https://github.com/donymvarkey/swapi.git
$cd swapi
$docker-compose up --build

Get all character details

end-point --> /character/all
req-type --> GET
example request

$curl -X GET localhost:8000/character/all

example response

{
   "status":true,
   "data":[
   	{
   	         "species":["Human"],
   	         "vehicles":["Snowspeeder","Imperial Speeder Bike"],
   	         "starships":["X-wing","Imperial shuttle"],
   	         "_id":"5d84aa80be077f1e52f9d030",
   	         "name":"luke skywalker",
   	         "height":"172",
   	         "mass":"77",
   	         "hair_color":"blond",
   	         "eye_color":"blue",
   	         "birth_year":"19BBY",
   	         "gender":"male",
   	         "homeworld":"Tatooine",
   	         "__v":0
        },
        {
   		"species":["Droid"],
   		 "vehicles":[],
   		 "starships":[],
   		 "_id":"5d84aa8cbe077f1e52f9d031",
   		 "name":"c-3po",
   		 "height":"167",
   		 "mass":"75",
   		 "hair_color":"n/a",
   		 "eye_color":"yellow",
   		 "birth_year":"112BBY",
   		 "gender":"n/a",
   		 "homeworld":"Tatooine",
   		 "__v":0
   	},
   	...
   ],
   "msg":"success"
}

Search for a particular character

end-point --> /character/:name
request-type --> GET
params --> {

name ==> String

}

example-request
$curl -X GET localhost:8000/character/luke%20skywalker

example-response

{
	"status":true,
	"data":{
		"species":["Human"],
		"vehicles":["Snowspeeder","Imperial Speeder Bike"],
		"starships":["X-wing","Imperial shuttle"],
		"_id":"5d84aa80be077f1e52f9d030",
		"name":"luke skywalker",
		"height":"172",
		"mass":"77",
		"hair_color":"blond",
		"eye_color":"blue",
		"birth_year":"19BBY",
		"gender":"male",
		"homeworld":"Tatooine",
		"__v":0
	},
	"msg":"success"
}

@donymvarkey

swapi's People

Contributors

adhilsha avatar anooppoommen avatar dependabot[bot] avatar donymvarkey avatar jissjohnson avatar

Watchers

 avatar  avatar  avatar

Forkers

jissjohnson

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.