Class: Request

Inherits:
Object
  • Object
show all
Defined in:
lib/lastfmbb/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, method, user, period = "overall", limit = "50", page = "1") ⇒ Request

Returns a new instance of Request.



9
10
11
12
13
14
15
16
# File 'lib/lastfmbb/request.rb', line 9

def initialize(api_key, method, user, period="overall", limit="50", page="1")
    @api_key = api_key  # required
    @method = method    # required
    @user = user        # required
    @period = period    # default to overall
    @limit = limit      # default to 50
    @page = page        # default to 1
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



2
3
4
# File 'lib/lastfmbb/request.rb', line 2

def api_key
  @api_key
end

#limitObject (readonly)

Returns the value of attribute limit.



6
7
8
# File 'lib/lastfmbb/request.rb', line 6

def limit
  @limit
end

#methodObject

Returns the value of attribute method.



3
4
5
# File 'lib/lastfmbb/request.rb', line 3

def method
  @method
end

#pageObject (readonly)

Returns the value of attribute page.



7
8
9
# File 'lib/lastfmbb/request.rb', line 7

def page
  @page
end

#periodObject

Returns the value of attribute period.



5
6
7
# File 'lib/lastfmbb/request.rb', line 5

def period
  @period
end

#userObject (readonly)

Returns the value of attribute user.



4
5
6
# File 'lib/lastfmbb/request.rb', line 4

def user
  @user
end