Class: PlayStationNetwork::User
- Defined in:
- lib/playstationnetwork/user.rb
Instance Attribute Summary
Attributes inherited from API
Instance Method Summary collapse
- #games(dig_to: ['games']) ⇒ Object
-
#initialize(identity) ⇒ User
constructor
A new instance of User.
- #profile ⇒ Object
- #trophies(npcommid, dig_to: ['trophies']) ⇒ Object
Methods inherited from API
Constructor Details
#initialize(identity) ⇒ User
Returns a new instance of User.
6 7 8 9 10 11 |
# File 'lib/playstationnetwork/user.rb', line 6 def initialize(identity) raise INVALID_IDENTITY_TYPE unless identity.is_a?(String) super [:user_id] = identity end |
Instance Method Details
#games(dig_to: ['games']) ⇒ Object
17 18 19 |
# File 'lib/playstationnetwork/user.rb', line 17 def games(dig_to: ['games']) post('/psnGetUserGames', dig_to: dig_to) end |
#profile ⇒ Object
13 14 15 |
# File 'lib/playstationnetwork/user.rb', line 13 def profile post('/psnGetUser') end |
#trophies(npcommid, dig_to: ['trophies']) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/playstationnetwork/user.rb', line 21 def trophies(npcommid, dig_to: ['trophies']) raise INVALID_IDENTITY_TYPE unless npcommid.is_a?(String) [:npcommid] = npcommid post('/psnGetUserTrophies', dig_to: dig_to) end |