Method: PlayStationNetworkAPI::Trophy#trophy_details

Defined in:
lib/play_station_network_api/trophy.rb

#trophy_details(communication_id, trophy_id) ⇒ Object

communication_id [String] trophy_id [Integer]



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/play_station_network_api/trophy.rb', line 73

def trophy_details(communication_id, trophy_id)
  url = if 
    # https://m.np.playstation.net/api/trophy/v1/npCommunicationIds/NPWR00133_00/trophies/2?npServiceName=trophy
    [path, 'npCommunicationIds', communication_id, 'trophies', trophy_id]
  else
    # https://m.np.playstation.net/api/trophy/v1/users/6462910331343535058/npCommunicationIds/NPWR00133_00/trophies/2?npServiceName=trophy
    [path(communication_id), 'trophies', trophy_id]
  end

  get(url.join('/'),
    query: {
      npServiceName: 'trophy'
    }
  ).parsed_response
end