lib/stm_api.rb in stm_api-0.1.4 vs lib/stm_api.rb in stm_api-0.1.5

- old
+ new

@@ -15,10 +15,16 @@ def initialize(params = {}) @userhash = params[:userhash] @currency = params[:currency] @team_id = params[:team_id] end - + def user_info() + user_info_response = RestClient.get("https://api.sharethemeal.org/api/users/#{@userhash}", + content_type: :json, accept: :json, + Authorization: "Bearer #{BEARER}") + user_info_json = JSON.parse(user_info_response) + + end def user_teams() team_statistic = RestClient.get("https://api.sharethemeal.org/api/users/#{@userhash}/teams", content_type: :json, accept: :json, Authorization: "Bearer #{BEARER}") team_statistic_json = JSON.parse(team_statistic)