Module: CitibikeTrips
- Defined in:
- lib/citibike_trips.rb,
lib/citibike_trips/version.rb
Defined Under Namespace
Classes: Station, Stations, Trip, Trips
Constant Summary collapse
- LOGIN_URL =
'https://www.citibikenyc.com/login'
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.login(page, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/citibike_trips.rb', line 11 def self.login(page, ={}) stdout = [:stdout] || $stdout h = HighLine.new($stdin, stdout) page.form_with(action: LOGIN_URL) do |form| form.subscriberUsername = h.ask('Citi Bike username: ') form.subscriberPassword = h.ask('Citi Bike password: ') {|q| q.echo = false} form.(form.(name: 'login_submit')) end end |