lib/sportradar/api/soccer/player.rb in sportradar-api-0.13.4 vs lib/sportradar/api/soccer/player.rb in sportradar-api-0.13.5
- old
+ new
@@ -42,10 +42,18 @@
def display_name
@name || [@first_name, @last_name].join(' ')
end
+ def first_name
+ @first_name || (@name && @name.split(', ')[1])
+ end
+
+ def last_name
+ @last_name || (@name && @name.split(', ')[0])
+ end
+
def api
@api || Sportradar::Api::Soccer::Api.new(league_group: @league_group)
end
def path_base
@@ -65,11 +73,9 @@
end
def queue_profile
url, headers, options, timeout = api.get_request_info(path_profile)
{url: url, headers: headers, params: options, timeout: timeout, callback: method(:ingest_profile)}
end
-
end
-
end
end
end