lib/eventbrite_sdk/resource/operations/endpoint.rb in eventbrite_sdk-3.1.3 vs lib/eventbrite_sdk/resource/operations/endpoint.rb in eventbrite_sdk-3.1.4
- old
+ new
@@ -32,14 +32,13 @@
def retrieve(params, request = EventbriteSDK)
url_path = params.reduce(@path) do |path, (key, value)|
path.gsub(":#{key}", value.to_s)
end
- if params[:expand]
- query = { expand: [*params[:expand]].join(',') }
- end
+ api_token = params.fetch(:api_token, nil)
+ query = params[:expand] && { expand: [*params[:expand]].join(',') }
- new request.get(url: url_path, query: query)
+ new request.get(url: url_path, query: query, api_token: api_token)
end
# Define the url path for the resource. It also implicitly defines
# the primary key and any additional foreign keys required for this
# resource.