4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/xing_api_client/call/users_network_paths_call.rb', line 4
def get_users_network_paths(other_user_id, options = {})
id = options[:id] || 'me'
offset = options[:offset] || 0
limit = options[:limit]
fields = options[:fields]
result = make_request!(:get, "v1/users/#{id}/network/#{other_user_id}/paths", {}, array_keys: ["contact_paths"])
result['paths'].tap do |collection|
collection.define_singleton_method :distance, -> { result["distance"].to_i }
collection.define_singleton_method :total, -> { result["total"].to_i }
end
end
|