lib/namely/connection.rb in namely-0.2.1 vs lib/namely/connection.rb in namely-0.2.2
- old
+ new
@@ -66,11 +66,11 @@
# Return a Collection of profiles.
#
# @return [Collection]
def profiles
- collection("profiles")
+ collection("profiles", paged: true)
end
# Return a Collection of reports.
#
# @return [Collection]
@@ -80,18 +80,18 @@
private
attr_reader :access_token, :subdomain
- def collection(endpoint)
- Namely::Collection.new(gateway(endpoint))
+ def collection(endpoint, options = {})
+ Namely::Collection.new(gateway(endpoint, options))
end
- def gateway(endpoint)
- ResourceGateway.new(
+ def gateway(endpoint, options = {})
+ ResourceGateway.new(options.merge(
access_token: access_token,
endpoint: endpoint,
subdomain: subdomain,
- )
+ ))
end
end
end