Class: Hotspot::Sfr

Inherits:
Hotspot show all
Defined in:
lib/hl.rb

Instance Method Summary collapse

Methods inherited from Hotspot

#connect?, #get, hotspots, #info, inherited, #initialize, #login_url, #login_url!, #params, #post, #redirect?, #uri_test

Constructor Details

This class inherits a constructor from Hotspot::Hotspot

Instance Method Details

#authObject



93
94
95
96
97
# File 'lib/hl.rb', line 93

def auth
    query = params.merge!({username: @user, username2: @user, password: @password, conditions: "on", lang: "fr", connexion: "Connexion", accessType: "neuf"})
    t = redirect? post("https://hotspot.wifi.sfr.fr/nb4_crypt.php", query)
    get(t)
end

#hotspot?Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/hl.rb', line 89

def hotspot?
    info.host == "hotspot.wifi.sfr.fr"
end