lib/triviacrack/api/profile.rb in triviacrack-0.6.0 vs lib/triviacrack/api/profile.rb in triviacrack-0.7.0
- old
+ new
@@ -1,12 +1,13 @@
-require "triviacrack/api/common"
+# frozen_string_literal: true
+require 'triviacrack/api/common'
+
# Public: Interface to the Trivia Crack Profile API.
module TriviaCrack
module API
module Profile
-
include TriviaCrack::API::Common
# Public: Uses the Trivia Crack API to get the profile of the user with
# the given user id.
#
@@ -30,15 +31,14 @@
#
# profile = client.get_my_profile
#
# Returns the TriviaCrack::Profile for the current user.
# Raises TriviaCrack::Errors::RequestError if the request fails.
- def get_my_profile
+ def get_my_profile # rubocop:disable Naming/AccessorMethodName
response =
get "/api/users/#{@session.user_id}/profiles/#{@session.user_id}"
TriviaCrack::Parsers::ProfileParser.parse response
end
-
end
end
end