Skip to content

Commit 24a43ea

Browse files
authored
Merge pull request #9 from waterskier2007/master
updates for issue #8
2 parents 84395e9 + c051514 commit 24a43ea

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ GET https://api.spacexdata.com/launches/from=2011-01-20/to=2017-05-25
6060
## Launch info by serial #'s
6161
Get launches by core serial #
6262
```http
63-
GET https://api.spacexdata.com/launches/core=B1021
63+
GET https://api.spacexdata.com/launches/cores/B1021
6464
```
6565
Get launches by capsule serial #
6666
```http
67-
GET https://api.spacexdata.com/launches/cap=C106
67+
GET https://api.spacexdata.com/launches/caps/C106
6868
```
6969

7070
## Detailed info about each capsule
@@ -74,7 +74,7 @@ GET https://api.spacexdata.com/parts/caps
7474
```
7575
Get detailed capsule information by serial #
7676
```http
77-
GET https://api.spacexdata.com/parts/cap=C106
77+
GET https://api.spacexdata.com/parts/caps/C106
7878
```
7979

8080
## Detailed info about each core
@@ -84,7 +84,7 @@ GET https://api.spacexdata.com/parts/cores
8484
```
8585
Get detailed core information by serial #
8686
```http
87-
GET https://api.spacexdata.com/parts/core=B1021
87+
GET https://api.spacexdata.com/parts/cores/B1021
8888
```
8989

9090
## JSON launch response example

app.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def hash_merge *hashes
123123
end
124124

125125
# Get all launches with a serial number
126-
get '/launches/core=:core' do
126+
get '/launches/cores/:core' do
127127
content_type :json
128128
core = params['core']
129129
statement = DB.prepare("SELECT * FROM launch WHERE core_serial = ?")
@@ -139,7 +139,7 @@ def hash_merge *hashes
139139
end
140140

141141
# Get info on a specific Dragon capsule
142-
get '/parts/cap=:cap' do
142+
get '/parts/caps/:cap' do
143143
content_type :json
144144
cap = params['cap']
145145
statement = DB.prepare("SELECT * FROM capsule WHERE capsule_serial = ?")
@@ -169,7 +169,7 @@ def hash_merge *hashes
169169
end
170170

171171
# Get all launches with capsule serial #
172-
get '/launches/cap=:cap' do
172+
get '/launches/caps/:cap' do
173173
content_type :json
174174
cap = params['cap']
175175
statement = DB.prepare("SELECT * FROM launch WHERE cap_serial = ?")
@@ -199,7 +199,7 @@ def hash_merge *hashes
199199
end
200200

201201
# Get core information by serial #
202-
get '/parts/core=:core' do
202+
get '/parts/cores/:core' do
203203
content_type :json
204204
core = params['core']
205205
statement = DB.prepare("SELECT * FROM core WHERE core_serial = ?")

0 commit comments

Comments
 (0)