Class: Request
- Inherits:
-
Object
- Object
- Request
- Defined in:
- lib/lastfmbb/request.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#method ⇒ Object
Returns the value of attribute method.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#period ⇒ Object
Returns the value of attribute period.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(api_key, method, user, period = "overall", limit = "50", page = "1") ⇒ Request
constructor
A new instance of Request.
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_key ⇒ Object (readonly)
Returns the value of attribute api_key.
2 3 4 |
# File 'lib/lastfmbb/request.rb', line 2 def api_key @api_key end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
6 7 8 |
# File 'lib/lastfmbb/request.rb', line 6 def limit @limit end |
#method ⇒ Object
Returns the value of attribute method.
3 4 5 |
# File 'lib/lastfmbb/request.rb', line 3 def method @method end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
7 8 9 |
# File 'lib/lastfmbb/request.rb', line 7 def page @page end |
#period ⇒ Object
Returns the value of attribute period.
5 6 7 |
# File 'lib/lastfmbb/request.rb', line 5 def period @period end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/lastfmbb/request.rb', line 4 def user @user end |