spacex 0.0.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +5 -5
- data/CHANGELOG.md +18 -2
- data/CONTRIBUTING.md +7 -7
- data/Gemfile +2 -0
- data/README.md +207 -98
- data/lib/spacex.rb +3 -0
- data/lib/spacex/base_request.rb +45 -20
- data/lib/spacex/capsules.rb +19 -0
- data/lib/spacex/company_info.rb +1 -1
- data/lib/spacex/cores.rb +22 -0
- data/lib/spacex/dragon_capsules.rb +2 -16
- data/lib/spacex/launches.rb +13 -1
- data/lib/spacex/missions.rb +2 -16
- data/lib/spacex/roadster.rb +1 -1
- data/lib/spacex/rockets.rb +7 -0
- data/lib/spacex/ships.rb +2 -16
- data/lib/spacex/version.rb +1 -1
- data/spacex.gemspec +6 -5
- data/spec/fixtures/spacex/capsules.yml +83 -0
- data/spec/fixtures/spacex/capsules/C202.yml +123 -0
- data/spec/fixtures/spacex/company_info/info.yml +63 -0
- data/spec/fixtures/spacex/cores.yml +62 -0
- data/spec/fixtures/spacex/cores/B1041.yml +123 -0
- data/spec/fixtures/spacex/dragon_capsules/info.yml +6 -6
- data/spec/fixtures/spacex/dragon_capsules/info/dragon1.yml +64 -0
- data/spec/fixtures/spacex/launches.yml +62 -0
- data/spec/fixtures/spacex/launches/all.yml +62 -0
- data/spec/fixtures/spacex/launches/next.yml +123 -0
- data/spec/fixtures/spacex/missions/F3364BF.yml +77 -0
- data/spec/fixtures/spacex/missions/info.yml +7 -7
- data/spec/fixtures/spacex/roadster/info.yml +64 -0
- data/spec/fixtures/spacex/rockets/info.yml +105 -0
- data/spec/fixtures/spacex/rockets/info/falcon1.yml +139 -0
- data/spec/fixtures/spacex/rockets/info/invalid.yml +61 -0
- data/spec/fixtures/spacex/ships/info.yml +20 -20
- data/spec/fixtures/spacex/ships/info/AMERICANCHAMPION.yml +61 -0
- data/spec/spacex/capsules_spec.rb +38 -0
- data/spec/spacex/company_info_spec.rb +2 -4
- data/spec/spacex/cores_spec.rb +45 -0
- data/spec/spacex/dragon_capsules_spec.rb +6 -6
- data/spec/spacex/launches_spec.rb +205 -15
- data/spec/spacex/missions_spec.rb +3 -5
- data/spec/spacex/roadster_spec.rb +3 -3
- data/spec/spacex/rockets_spec.rb +210 -0
- data/spec/spacex/ships_spec.rb +4 -4
- data/spec/spacex/version_spec.rb +1 -3
- data/spec/spec_helper.rb +9 -0
- metadata +63 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58a0fbf1d077cbf0176536bb63223efff8c67f33
|
4
|
+
data.tar.gz: 90864481997988c4cfc40ebc9932bb5dca6ff0d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3bc930432c4d80021beed2eeb8d9ec0d00f80af446753ee7ce63dcd9b2ab2eb66250ff1eda6ecaa3734c1af036fa4172f1db7b4f25026bf3e3191617926a6d2
|
7
|
+
data.tar.gz: 5a6b7134c8a491ba4f7d6f87e454f9ac92f488fc035f42bc51114e078fbaf70b0b612e4a6c1fc1d688b8ab49a7d41996391eb3ab33c6b0f854c62ab45a2a1e90
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-10-
|
3
|
+
# on 2018-10-13 07:55:19 -0400 using RuboCop version 0.51.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -12,13 +12,13 @@ Lint/ParenthesesAsGroupedExpression:
|
|
12
12
|
- 'spec/spacex/dragon_capsules_spec.rb'
|
13
13
|
- 'spec/spacex/ships_spec.rb'
|
14
14
|
|
15
|
-
# Offense count:
|
15
|
+
# Offense count: 24
|
16
16
|
# Configuration parameters: CountComments, ExcludedMethods.
|
17
17
|
Metrics/BlockLength:
|
18
|
-
Max:
|
18
|
+
Max: 265
|
19
19
|
|
20
|
-
# Offense count:
|
20
|
+
# Offense count: 117
|
21
21
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
22
22
|
# URISchemes: http, https
|
23
23
|
Metrics/LineLength:
|
24
|
-
Max:
|
24
|
+
Max: 264
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,23 @@
|
|
1
|
-
###
|
1
|
+
### 1.0.1 (next)
|
2
2
|
|
3
3
|
* Your contribution here.
|
4
|
+
|
5
|
+
### 1.0.0 (2018/10/15)
|
6
|
+
|
7
|
+
* [#41](https://github.com/rodolfobandeira/spacex/pull/41): General Refactor cleaning endpoint classes [@invacuo](http://github.com/invacuo).
|
8
|
+
* [#44](https://github.com/rodolfobandeira/spacex/pull/44): Add flickr_images key into rockets endpoint [@Dfenniak](https://github.com/Dfenniak).
|
9
|
+
* [#42](https://github.com/rodolfobandeira/spacex/pull/42): Add pry gem to debug - [@Dfenniak](https://github.com/Dfenniak).
|
10
|
+
* [#40](https://github.com/rodolfobandeira/spacex/pull/40): Update and clarify information in README - [@annawinkler](https://github.com/annawinkler).
|
11
|
+
* [#34](https://github.com/rodolfobandeira/spacex/pull/34): Implement Capsules endpoint - [@efl7a](https://github.com/efl7a).
|
12
|
+
* [#34](https://github.com/rodolfobandeira/spacex/pull/34): Implement Cores endpoint - [@efl7a](https://github.com/efl7a).
|
13
|
+
* [#35](https://github.com/rodolfobandeira/spacex/pull/35): Implement Rockets endpoint - [@invacuo](https://github.com/invacuo).
|
14
|
+
* [#28](https://github.com/rodolfobandeira/spacex/pull/28): Add ability to query all launches - [@ludamillion](https://github.com/ludamillion).
|
15
|
+
* [#26](https://github.com/rodolfobandeira/spacex/pull/26): Fix dependencies - [@harman28](https://github.com/harman28).
|
16
|
+
* [#25](https://github.com/rodolfobandeira/spacex/pull/25): Add code coverage tools - [@harman28](https://github.com/harman28).
|
17
|
+
* [#27](https://github.com/rodolfobandeira/spacex/pull/27): Add ability to query next launch - [@Andrey-Raspopov](https://github.com/Andrey-Raspopov)
|
18
|
+
|
19
|
+
### 0.0.7 (2018/10/07)
|
20
|
+
|
4
21
|
* Refactor responses getting multiple objects like Ships, Capsules to wrap a specific object. This helps translating specific properties like `id` and `class` to `ship_id`, `ship_class` - [@rodolfobandeira](https://github.com/rodolfobandeira).
|
5
22
|
* Add ability to retrieve specific Ship via `.info('ship_id')` - [@rodolfobandeira](https://github.com/rodolfobandeira).
|
6
23
|
* Add ability to retrieve specific Dragon Capsule via `.info('dragon_id')` - [@rodolfobandeira](https://github.com/rodolfobandeira).
|
@@ -19,4 +36,3 @@
|
|
19
36
|
### 0.0.4 (2018/08/21)
|
20
37
|
|
21
38
|
* Initial public release - [@rodolfobandeira](https://github.com/rodolfobandeira).
|
22
|
-
|
data/CONTRIBUTING.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## How to Contribute
|
1
|
+
## How to Contribute to the SpaceX gem?
|
2
2
|
|
3
3
|
### Fork the repository
|
4
4
|
|
@@ -11,25 +11,25 @@ bundle install
|
|
11
11
|
|
12
12
|
### Write test
|
13
13
|
|
14
|
-
We use `rspec`. After writing your
|
14
|
+
We use `rspec`. After writing your tests, you can run tests with the following command:
|
15
15
|
|
16
16
|
`bundle exec rspec`
|
17
17
|
|
18
18
|
|
19
19
|
### Write your code
|
20
20
|
|
21
|
-
Write your code to make your tests pass. After that, make sure you run `Rubocop
|
21
|
+
Write your code to make your tests pass. After that, make sure you run `Rubocop` like this:
|
22
22
|
|
23
23
|
`bundle exec rubocop`
|
24
24
|
|
25
|
-
Sometimes errors
|
25
|
+
Sometimes errors can be fixed by running:
|
26
26
|
|
27
27
|
`bundle exec rubocop -a`
|
28
28
|
|
29
|
-
### Update the
|
29
|
+
### Update the CHANGELOG with the description of your code and your name
|
30
30
|
|
31
|
-
Update the
|
31
|
+
Update the CHANGELOG with the description of your code and your name on the line after `"* Your contribution here"`.
|
32
32
|
|
33
|
-
### Push your change and open a pull request
|
33
|
+
### Push your change and open a pull request
|
34
34
|
|
35
35
|
Thank you!
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,46 +3,188 @@ SpaceX Ruby Client
|
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/spacex.svg)](https://badge.fury.io/rb/spacex)
|
5
5
|
[![Build Status](https://travis-ci.com/rodolfobandeira/spacex.svg?branch=master)](https://travis-ci.org/rodolfobandeira/spacex)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/github/rodolfobandeira/spacex/badge.svg?branch=master)](https://coveralls.io/github/rodolfobandeira/spacex?branch=master)
|
6
7
|
|
7
|
-
Ruby library that consumes SpaceX API
|
8
|
+
A Ruby library that consumes the [SpaceX API](https://github.com/r-spacex/SpaceX-API).
|
8
9
|
|
9
10
|
|
10
11
|
## Table of Contents
|
11
12
|
|
12
13
|
- [Installation](#installation)
|
13
14
|
- [Usage](#usage)
|
14
|
-
- [
|
15
|
+
- [Capsules](#capsules)
|
16
|
+
- `SPACEX::Capsules.info`
|
17
|
+
- `SPACEX::Capsules.info('capsule_serial')`
|
15
18
|
- [Company Info](#company-info) - `SPACEX::CompanyInfo.info`
|
16
|
-
- [
|
19
|
+
- [Cores](#cores)
|
20
|
+
- `SPACEX::Cores.info`
|
21
|
+
- `SPACEX::Cores.info('core_serial')`
|
17
22
|
- [Dragon Capsules](#dragon-capsules)
|
18
23
|
- `SPACEX::DragonCapsules.info`
|
19
24
|
- `SPACEX::DragonCapsules.info('dragon_id')`
|
20
|
-
- [
|
21
|
-
- `SPACEX::
|
22
|
-
- `SPACEX::
|
25
|
+
- [Launches](#launches)
|
26
|
+
- `SPACEX::Launches.info`
|
27
|
+
- `SPACEX::Launches.latest`
|
28
|
+
- `SPACEX::Launches.next`
|
23
29
|
- [Missions](#missions)
|
24
30
|
- `SPACEX::Missions.info`
|
25
31
|
- `SPACEX::Missions.info('mission_id')`
|
26
|
-
- [
|
27
|
-
- [
|
32
|
+
- [Roadster](#roadster) - `SPACEX::Roadster.info`
|
33
|
+
- [Rockets](#rockets)
|
34
|
+
- `SPACEX::Rockets.info`
|
35
|
+
- `SPACEX::Rockets.info('falcon1')`
|
36
|
+
- [Ships](#ships)
|
37
|
+
- `SPACEX::Ships.info`
|
38
|
+
- `SPACEX::Ships.info('ship_id')`
|
39
|
+
- [Contributing](#contributing)
|
28
40
|
- [Copyright](#copyright)
|
29
41
|
|
30
42
|
|
31
43
|
## Installation
|
32
44
|
|
33
|
-
Add to Gemfile
|
45
|
+
Add the gem to your Gemfile:
|
34
46
|
|
35
47
|
```
|
36
48
|
gem 'spacex'
|
37
49
|
```
|
38
50
|
|
39
|
-
|
51
|
+
Then run `bundle install`.
|
40
52
|
|
41
53
|
|
42
54
|
## Usage
|
43
55
|
|
44
|
-
###
|
56
|
+
### Capsules
|
57
|
+
|
58
|
+
- Get information for all capsules: `SPACEX::Capsules.info`
|
59
|
+
- Get information about a specific capsule: `SPACEX::Capsules.info('capsule_serial')`
|
60
|
+
|
61
|
+
This example shows how to get capsule information and what the data fields are for that object:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
capsules_info = SPACEX::Capsules.info
|
65
|
+
|
66
|
+
capsules_info.first.capsule_id # 'dragon2'
|
67
|
+
capsules_info.first.capsule_serial # 'C201'
|
68
|
+
capsules_info.first.details # 'Pressure vessel used for Dragon 2 structural testing. Rumored to be repurposed for first Red Dragon Mission'
|
69
|
+
capsules_info.first.landings # 0
|
70
|
+
capsules_info.first.missions # []
|
71
|
+
capsules_info.first.original_launch # nil capsules_info.first.original_launch_unix # nil
|
72
|
+
capsules_info.first.status # 'active'
|
73
|
+
capsules_info.first.type # 'Dragon 2.0'
|
74
|
+
```
|
75
|
+
|
76
|
+
### Company Info
|
77
|
+
|
78
|
+
- Get information about the company: `SPACEX::CompanyInfo.info`
|
79
|
+
|
80
|
+
Here is an example of the company information:
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
company_info = SPACEX::CompanyInfo.info
|
84
|
+
|
85
|
+
company_info.name # 'SpaceX'
|
86
|
+
company_info.founder # 'Elon Musk'
|
87
|
+
company_info.founded # 2002
|
88
|
+
company_info.employees # 7000
|
89
|
+
company_info.vehicles # 3
|
90
|
+
company_info.launche_sites # nil
|
91
|
+
company_info.test_sites # 1
|
92
|
+
company_info.ceo # 'Elon Musk'
|
93
|
+
company_info.cto # 'Elon Musk'
|
94
|
+
company_info.coo # 'Gwynne Shotwell'
|
95
|
+
company_info.cto_propulsion # 'Tom Mueller'
|
96
|
+
company_info.valuation # 15_000_000_000
|
97
|
+
company_info.headquarters.address # 'Rocket Road'
|
98
|
+
company_info.headquarters.city # 'Hawthorne'
|
99
|
+
company_info.headquarters.state # 'California'
|
100
|
+
company_info.summary # 'SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded in 2002 to revolutionize space technology, with the ultimate goal of enabling people to live on other planets.'
|
101
|
+
```
|
102
|
+
|
103
|
+
### Cores
|
104
|
+
|
105
|
+
- Get information for all cores: `SPACEX::Cores.info`
|
106
|
+
- Get information about a specific core: `SPACEX::Cores.info('core_serial')`
|
107
|
+
|
108
|
+
The following code snippet shows how to get the cores information and what the data fields are for a single core:
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
cores_info = SPACEX::Cores.info
|
112
|
+
|
113
|
+
cores_info.first.asds_attempts # 0
|
114
|
+
cores_info.first.asds_landings # 0
|
115
|
+
cores_info.first.block # 5
|
116
|
+
cores_info.first.core_serial # 'B1052'
|
117
|
+
cores_info.first.details # 'On test stand at McGregor'
|
118
|
+
cores_info.first.missions # []
|
119
|
+
cores_info.first.original_launch # nil
|
120
|
+
cores_info.first.original_launch_unix # nil
|
121
|
+
cores_info.first.rtls_attempts # 0
|
122
|
+
cores_info.first.rtls_landings # 0
|
123
|
+
cores_info.first.status # 'active'
|
124
|
+
cores_info.first.water_landing # false
|
125
|
+
```
|
126
|
+
|
127
|
+
### Dragon Capsules
|
128
|
+
|
129
|
+
- Get all dragon capsules: `SPACEX::DragonCapsules.info`
|
130
|
+
- Get a specific dragon capsule (e.g., `dragon1`) by including the id in the call: `SPACEX::DragonCapsules.info('dragon_id')`
|
131
|
+
|
132
|
+
This code snippet shows the `dragon1` dragon capsule information:
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
dragon_capsules = SPACEX::DragonCapsules.info
|
136
|
+
|
137
|
+
dragon_capsules.first.capsule_id # "dragon1"
|
138
|
+
dragon_capsules.first.name # "Dragon 1"
|
139
|
+
dragon_capsules.first.type # "capsule"
|
140
|
+
dragon_capsules.first.active # true
|
141
|
+
dragon_capsules.first.crew_capacity # 0
|
142
|
+
dragon_capsules.first.sidewall_angle_deg # 15
|
143
|
+
dragon_capsules.first.orbit_duration_yr # 2
|
144
|
+
dragon_capsules.first.dry_mass_kg # 4200
|
145
|
+
dragon_capsules.first.dry_mass_lb # 9300
|
146
|
+
dragon_capsules.first.first_flight # "2010-12-08"
|
147
|
+
dragon_capsules.first.heat_shield['material'] # "PICA-X"
|
148
|
+
dragon_capsules.first.heat_shield['size_meters'] # 3.6
|
149
|
+
dragon_capsules.first.heat_shield['temp_degrees'] # 3000
|
150
|
+
dragon_capsules.first.heat_shield['dev_partner'] # "NASA"
|
151
|
+
dragon_capsules.first.thrusters[0]['type'] # "Draco"
|
152
|
+
dragon_capsules.first.thrusters[0]['amount'] # 18
|
153
|
+
dragon_capsules.first.thrusters[0]['pods'] # 4
|
154
|
+
dragon_capsules.first.thrusters[0]['fuel_1'] # "nitrogen tetroxide"
|
155
|
+
dragon_capsules.first.thrusters[0]['fuel_2'] # "monomethylhydrazine"
|
156
|
+
dragon_capsules.first.thrusters[0]['thrust']['kN'] # 0.4
|
157
|
+
dragon_capsules.first.thrusters[0]['thrust']['lbf'] # 90
|
158
|
+
dragon_capsules.first.launch_payload_mass['kg'] # 6000
|
159
|
+
dragon_capsules.first.launch_payload_mass['lb'] # 13228
|
160
|
+
dragon_capsules.first.launch_payload_vol['cubic_meters'] # 25
|
161
|
+
dragon_capsules.first.launch_payload_vol['cubic_feet'] # 883
|
162
|
+
dragon_capsules.first.return_payload_mass['kg'] # 3000
|
163
|
+
dragon_capsules.first.return_payload_mass['lb'] # 6614
|
164
|
+
dragon_capsules.first.return_payload_vol['cubic_meters'] # 11
|
165
|
+
dragon_capsules.first.return_payload_vol['cubic_feet'] # 388
|
166
|
+
dragon_capsules.first.pressurized_capsule['payload_volume']['cubic_meters']) # 11
|
167
|
+
dragon_capsules.first.pressurized_capsule['payload_volume']['cubic_feet'] # 388
|
168
|
+
dragon_capsules.first.trunk['trunk_volume['cubic_meters'] # 14
|
169
|
+
dragon_capsules.first.trunk['trunk_volume['cubic_feet'] # 494
|
170
|
+
dragon_capsules.first.trunk['cargo']['solar_array'] # 2
|
171
|
+
dragon_capsules.first.trunk['cargo']['unpressurized_cargo'] # true
|
172
|
+
dragon_capsules.first.height_w_trunk['meters'] # 7.2
|
173
|
+
dragon_capsules.first.height_w_trunk['feet'] # 23.6
|
174
|
+
dragon_capsules.first.diameter['meters'] # 3.7
|
175
|
+
dragon_capsules.first.diameter['feet'] # 12
|
176
|
+
dragon_capsules.first.wikipedia # "https://en.wikipedia.org/wiki/SpaceX_Dragon"
|
177
|
+
dragon_capsules.first.description # "Dragon is a reusable spacecraft developed by SpaceX, an American private space transportation company based in Hawthorne, California. Dragon is launched into space by the SpaceX Falcon 9 two-stage-to-orbit launch vehicle. The Dragon spacecraft was originally designed for human travel, but so far has only been used to deliver cargo to the International Space Station (ISS)."
|
178
|
+
```
|
179
|
+
|
180
|
+
### Launches
|
45
181
|
|
182
|
+
- Get information on all launches: `SPACEX::Launches.info`
|
183
|
+
- Get information on the next launch: `SPACEX::Launches.next`
|
184
|
+
- Get the latest launch information: `SPACEX::Launches.latest`
|
185
|
+
|
186
|
+
The following code snippet shows the latest launch information and the data fields available on the Launch object:
|
187
|
+
|
46
188
|
```ruby
|
47
189
|
require 'spacex'
|
48
190
|
latest_launch = SPACEX::Launches.latest
|
@@ -113,32 +255,32 @@ latest_launch.upcoming # false
|
|
113
255
|
latest_launch.static_fire_date_utc # '2018-08-02T15:53:00.000Z'
|
114
256
|
```
|
115
257
|
|
258
|
+
### Missions
|
116
259
|
|
117
|
-
|
260
|
+
- Get all mission information: `SPACEX::Missions.info`
|
261
|
+
- Get information about a specific mission (e.g., `F3364BF`): `SPACEX::Missions.info('mission_id')`
|
262
|
+
|
263
|
+
This code shows how to get the first mission information and lists the fields:
|
118
264
|
|
119
265
|
```ruby
|
120
|
-
|
266
|
+
missions = SPACEX::Missions.info
|
121
267
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
company_info.cto # 'Elon Musk'
|
131
|
-
company_info.coo # 'Gwynne Shotwell'
|
132
|
-
company_info.cto_propulsion # 'Tom Mueller'
|
133
|
-
company_info.valuation # 15_000_000_000
|
134
|
-
company_info.headquarters.address # 'Rocket Road'
|
135
|
-
company_info.headquarters.city # 'Hawthorne'
|
136
|
-
company_info.headquarters.state # 'California'
|
137
|
-
company_info.summary # 'SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded in 2002 to revolutionize space technology, with the ultimate goal of enabling people to live on other planets.'
|
268
|
+
missions.first.mission_id # "F3364BF"
|
269
|
+
missions.first.mission_name # "Iridium NEXT"
|
270
|
+
missions.first.manufacturers # ["Orbital ATK"]
|
271
|
+
missions.first.payload_ids # ["Iridium NEXT 1", "Iridium NEXT 2", "Iridium NEXT 3", "Iridium NEXT 4", "Iridium NEXT 5", "Iridium NEXT 6", "Iridium NEXT 7"]
|
272
|
+
missions.first.wikipedia # "https://en.wikipedia.org/wiki/Iridium_satellite_constellation"
|
273
|
+
missions.first.website # "https://www.iridiumnext.com/"
|
274
|
+
missions.first.twitter # "https://twitter.com/IridiumBoss?lang=en"
|
275
|
+
missions.first.description # "In 2017, Iridium began launching Iridium NEXT, a second-generation worldwide network of telecommunications satellites, consisting of 66 active satellites, with another nine in-orbit spares and six on-ground spares. These satellites will incorporate features such as data transmission that were not emphasized in the original design. The constellation will provide L-band data speeds of up to 128 kbit/s to mobile terminals, up to 1.5 Mbit/s to Iridium Pilot marine terminals, and high-speed Ka-band service of up to 8 Mbit/s to fixed/transportable terminals. The next-generation terminals and service are expected to be commercially available by the end of 2018. However, Iridium's proposed use of its next-generation satellites has raised concerns the service will harmfully interfere with GPS devices. The satellites will incorporate a secondary payload for Aireon, a space-qualified ADS-B data receiver. This is for use by air traffic control and, via FlightAware, for use by airlines. A tertiary payload on 58 satellites is a marine AIS ship-tracker receiver, for Canadian company exactEarth Ltd. Iridium can also be used to provide a data link to other satellites in space, enabling command and control of other space assets regardless of the position of ground stations and gateways."
|
138
276
|
```
|
139
277
|
|
140
278
|
### Roadster
|
141
279
|
|
280
|
+
- Get roadster orbital data: `SPACEX::Roadster.info`
|
281
|
+
|
282
|
+
The following code shows how to get information about the Roadster:
|
283
|
+
|
142
284
|
```ruby
|
143
285
|
roadster = SPACEX::Roadster.info
|
144
286
|
|
@@ -167,62 +309,48 @@ roadster.wikipedia # 'https://en.wikipedia.org/wiki/Elon_Musk%27s_Tesla_Roadster
|
|
167
309
|
roadster.details # "Elon Musk's Tesla Roadster is an electric sports car that served as the dummy payload for the February 2018 Falcon Heavy test flight and is now an artificial satellite of the Sun. Starman, a mannequin dressed in a spacesuit, occupies the driver's seat. The car and rocket are products of Tesla and SpaceX, both companies founded by Elon Musk. This 2008-model Roadster was previously used by Musk for commuting, and is the only consumer car sent into space."
|
168
310
|
```
|
169
311
|
|
170
|
-
###
|
171
|
-
|
172
|
-
- `SPACEX::DragonCapsules.info` Retrieve all Dragon Capsules;
|
173
|
-
- `SPACEX::DragonCapsules.info('dragon_id')` Retrieve a specific dragon capsule. Ex: `dragon1`
|
312
|
+
### Rockets
|
174
313
|
|
314
|
+
- Get information for all rockets: `SPACEX::Rockets.info`
|
315
|
+
- Get information about a specific rocket (e.g., `falcon1`: `SPACEX::Rockets.info('falcon1')`
|
175
316
|
|
176
|
-
|
177
|
-
dragon_capsules = SPACEX::DragonCapsules.info
|
317
|
+
This example shows a single rocket and its data fields:
|
178
318
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
dragon_capsules.first.return_payload_vol['cubic_meters'] # 11
|
207
|
-
dragon_capsules.first.return_payload_vol['cubic_feet'] # 388
|
208
|
-
dragon_capsules.first.pressurized_capsule['payload_volume']['cubic_meters']) # 11
|
209
|
-
dragon_capsules.first.pressurized_capsule['payload_volume']['cubic_feet'] # 388
|
210
|
-
dragon_capsules.first.trunk['trunk_volume['cubic_meters'] # 14
|
211
|
-
dragon_capsules.first.trunk['trunk_volume['cubic_feet'] # 494
|
212
|
-
dragon_capsules.first.trunk['cargo']['solar_array'] # 2
|
213
|
-
dragon_capsules.first.trunk['cargo']['unpressurized_cargo'] # true
|
214
|
-
dragon_capsules.first.height_w_trunk['meters'] # 7.2
|
215
|
-
dragon_capsules.first.height_w_trunk['feet'] # 23.6
|
216
|
-
dragon_capsules.first.diameter['meters'] # 3.7
|
217
|
-
dragon_capsules.first.diameter['feet'] # 12
|
218
|
-
dragon_capsules.first.wikipedia # "https://en.wikipedia.org/wiki/SpaceX_Dragon"
|
219
|
-
dragon_capsules.first.description # "Dragon is a reusable spacecraft developed by SpaceX, an American private space transportation company based in Hawthorne, California. Dragon is launched into space by the SpaceX Falcon 9 two-stage-to-orbit launch vehicle. The Dragon spacecraft was originally designed for human travel, but so far has only been used to deliver cargo to the International Space Station (ISS)."
|
319
|
+
```
|
320
|
+
rockets = SPACEX::Rockets.info
|
321
|
+
first_rocket = rockets.first
|
322
|
+
|
323
|
+
first_rocket.id # 1
|
324
|
+
first_rocket.active # false
|
325
|
+
first_rocket.stages # 2
|
326
|
+
first_rocket.boosters # 0
|
327
|
+
first_rocket.cost_per_launch # 6700000
|
328
|
+
first_rocket.success_rate_pct # 40
|
329
|
+
first_rocket.first_flight # "2006-03-24"
|
330
|
+
first_rocket.country # "Republic of the Marshall Islands"
|
331
|
+
first_rocket.company # "SpaceX"
|
332
|
+
first_rocket.height # {"meters"=>22.25, "feet"=>73}
|
333
|
+
first_rocket.diameter # {"meters"=>1.68, "feet"=>5.5}
|
334
|
+
first_rocket.mass # {"kg"=>30146, "lb"=>66460}
|
335
|
+
first_rocket.payload_weights # [{"id"=>"leo", "name"=>"Low Earth Orbit", "kg"=>450, "lb"=>992}]
|
336
|
+
first_rocket.first_stage # {"reusable"=>false, "engines"=>1, "fuel_amount_tons"=>44.3, "burn_time_sec"=>169, "thrust_sea_level"=>{"kN"=>420, "lbf"=>94000}, "thrust_vacuum"=>{"kN"=>480, "lbf"=>110000}}
|
337
|
+
first_rocket.second_stage # {"engines"=>1, "fuel_amount_tons"=>3.38, "burn_time_sec"=>378, "thrust"=>{"kN"=>31, "lbf"=>7000}, "payloads"=>{"option_1"=>"composite fairing", "composite_fairing"=>{"height"=>{"meters"=>3.5, "feet"=>11.5}, "diameter"=>{"meters"=>1.5, "feet"=>4.9}}}}
|
338
|
+
first_rocket.engines # {"number"=>1, "type"=>"merlin", "version"=>"1C", "layout"=>"single", "engine_loss_max"=>0, "propellant_1"=>"liquid oxygen", "propellant_2"=>"RP-1 kerosene", "thrust_sea_level"=>{"kN"=>420, "lbf"=>94000}, "thrust_vacuum"=>{"kN"=>480, "lbf"=>110000}, "thrust_to_weight"=>96}
|
339
|
+
first_rocket.landing_legs # {"number"=>0, "material"=>nil}
|
340
|
+
first_rocket.wikipedia # "https://en.wikipedia.org/wiki/Falcon_1"
|
341
|
+
first_rocket.description # "The Falcon 1 was an expendable launch system privately developed and manufactured by SpaceX during 2006-2009. On 28 September 2008, Falcon 1 became the first privately-developed liquid-fuel launch vehicle to go into orbit around the Earth."
|
342
|
+
first_rocket.rocket_id # "falcon1"
|
343
|
+
first_rocket.rocket_name # "Falcon 1"
|
344
|
+
first_rocket.rocket_type # "rocket"
|
345
|
+
first_rocket.flickr_images # ["https://www.spacex.com/sites/spacex/files/styles/media_gallery_large/public/2009_-_01_liftoff_south_full_wide_ro8a1280_edit.jpg?itok=8loiSGt1", "https://www.spacex.com/sites/spacex/files/styles/media_gallery_large/public/2009_-_02_default_liftoff_west_full_wide_nn6p2062_xl.jpg?itok=p776nHsM"]
|
220
346
|
```
|
221
347
|
|
222
348
|
### Ships
|
223
349
|
|
224
|
-
- `SPACEX::Ships.info`
|
225
|
-
-
|
350
|
+
- Get all ship information: `SPACEX::Ships.info`
|
351
|
+
- Get information about a specific ship (e.g., `AMERICANCHAMPION`): `SPACEX::Ships.info('ship_id')`
|
352
|
+
|
353
|
+
The following code shows how to get information about a specific ship and lists the ship data fields:
|
226
354
|
|
227
355
|
```ruby
|
228
356
|
ship = SPACEX::Ships.info('AMERICANCHAMPION')
|
@@ -252,31 +380,12 @@ ship.url # 'https://www.marinetraffic.com/en/ais/details/ships/shipid:434663/ves
|
|
252
380
|
ship.image # 'https://i.imgur.com/woCxpkj.jpg'
|
253
381
|
```
|
254
382
|
|
255
|
-
### Missions
|
256
|
-
|
257
|
-
- `SPACEX::Missions.info` Retrieve all Missions;
|
258
|
-
- `SPACEX::Missions.info('mission_id')` Retrieve a specific mission. Ex: `F3364BF`
|
259
|
-
|
260
|
-
```ruby
|
261
|
-
missions = SPACEX::Missions.info
|
262
|
-
|
263
|
-
missions.first.mission_id # "F3364BF"
|
264
|
-
missions.first.mission_name # "Iridium NEXT"
|
265
|
-
missions.first.manufacturers # ["Orbital ATK"]
|
266
|
-
missions.first.payload_ids # ["Iridium NEXT 1", "Iridium NEXT 2", "Iridium NEXT 3", "Iridium NEXT 4", "Iridium NEXT 5", "Iridium NEXT 6", "Iridium NEXT 7"]
|
267
|
-
missions.first.wikipedia # "https://en.wikipedia.org/wiki/Iridium_satellite_constellation"
|
268
|
-
missions.first.website # "https://www.iridiumnext.com/"
|
269
|
-
missions.first.twitter # "https://twitter.com/IridiumBoss?lang=en"
|
270
|
-
missions.first.description # "In 2017, Iridium began launching Iridium NEXT, a second-generation worldwide network of telecommunications satellites, consisting of 66 active satellites, with another nine in-orbit spares and six on-ground spares. These satellites will incorporate features such as data transmission that were not emphasized in the original design. The constellation will provide L-band data speeds of up to 128 kbit/s to mobile terminals, up to 1.5 Mbit/s to Iridium Pilot marine terminals, and high-speed Ka-band service of up to 8 Mbit/s to fixed/transportable terminals. The next-generation terminals and service are expected to be commercially available by the end of 2018. However, Iridium's proposed use of its next-generation satellites has raised concerns the service will harmfully interfere with GPS devices. The satellites will incorporate a secondary payload for Aireon, a space-qualified ADS-B data receiver. This is for use by air traffic control and, via FlightAware, for use by airlines. A tertiary payload on 58 satellites is a marine AIS ship-tracker receiver, for Canadian company exactEarth Ltd. Iridium can also be used to provide a data link to other satellites in space, enabling command and control of other space assets regardless of the position of ground stations and gateways."
|
271
|
-
```
|
272
383
|
|
273
384
|
## Contributing
|
274
385
|
|
275
386
|
See [CONTRIBUTING](CONTRIBUTING.md).
|
276
387
|
|
277
|
-
|
278
|
-
|
279
|
-
[Awesome people that already helped this project](CHANGELOG.md).
|
388
|
+
[List of awesome people that already helped this project](CHANGELOG.md).
|
280
389
|
|
281
390
|
|
282
391
|
## Copyright
|