lib/yao/resources/restfully_accessible.rb in yao-0.3.5 vs lib/yao/resources/restfully_accessible.rb in yao-0.3.6
- old
+ new
@@ -22,11 +22,11 @@
def api_version=(v)
raise("Set api_version after service is declared") unless service
@api_version = v
if cli = client
- cli.url_prefix.path = "/#{api_version}"
+ cli.url_prefix.path += "/#{api_version}" unless cli.url_prefix.to_s.include?("/#{api_version}")
end
api_version
end
attr_reader :api_version
@@ -80,17 +80,9 @@
if @return_single_on_querying && !query.empty?
return_resource(resource_from_json(json))
else
return_resources(resources_from_json(json))
end
- end
-
- def list_detail(query={})
- return_resources(
- resources_from_json(
- GET([resources_path, "detail"].join("/"), query).body
- )
- )
end
def get(id_or_permalink, query={})
res = if id_or_permalink =~ /^https?:\/\//
GET(id_or_permalink, query)