lib/storyblok/client.rb in storyblok-1.0.2 vs lib/storyblok/client.rb in storyblok-1.0.3

- old
+ new

@@ -72,10 +72,19 @@ # # @param [Hash] query # # @return [Hash] def links(query = {}) - Links.new(Request.new(self, '/cdn/links', query).get) + Request.new(self, '/cdn/links', query).get + end + + # Gets a link tree + # + # @param [Hash] query + # + # @return [Hash] + def tree(query = {}) + Links.new(Request.new(self, '/cdn/links', query).get).as_tree end def get(request) endpoint = base_url + request.url query = request_query(request.query)