Class: Squeegee::BSkyB

Inherits:
Base
  • Object
show all
Defined in:
lib/squeegee/bskyb.rb

Overview

British Sky Broadcasting (BSkyB) - Premium Television

Constant Summary collapse

LOGIN_URL =
"https://skyid.sky.com/signin/accountmanagement"
ACCOUNT_URL =
"https://myaccount.sky.com/?action=viewbills"
FIELD =
{
  username: 'username',
  password: 'password'
}

Instance Attribute Summary collapse

Attributes inherited from Base

#agent, #amount, #due_at, #keys, #paid

Instance Method Summary collapse

Methods inherited from Base

#get, #params

Constructor Details

#initialize(args = {}) ⇒ BSkyB

Returns a new instance of BSkyB.



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/squeegee/bskyb.rb', line 16

def initialize(args = {})
  @keys = %w(username password)

  params(args)
  @username = args.delete(:username)
  @password = args.delete(:password)

  @accounts = []

  authenticate!
  get_statement
end

Instance Attribute Details

#accountsObject

Returns the value of attribute accounts.



14
15
16
# File 'lib/squeegee/bskyb.rb', line 14

def accounts
  @accounts
end