lib/cdnconnect_api.rb in cdnconnect-api-0.1.1 vs lib/cdnconnect_api.rb in cdnconnect-api-0.1.2

- old
+ new

@@ -148,13 +148,10 @@ # - <code>:obj_id</code> - # The obj_id of the folder to upload to. If the app_id or obj_id options # are not provided then you must use the url option. # - <code>:source_file_local_path</code> - # A string of a source file's local paths to upload. - # - <code>:response_format</code> - - # How data should be formatted on the response. Possible values - # include json (default) or xml. # @return [APIResponse] A response object with helper methods to read the response. def upload(options={}) # Make sure we've got good data before starting the upload prepare_upload(options) @@ -290,18 +287,12 @@ path = destination_folder_url + '/upload' else path = generate_obj_path(options) + '/upload' end - # Default Content-Type is application/json with a .json extension - response_extension = 'json' - if options[:response_format] == 'xml' - response_extension = 'xml' - end + path = '/v1/' + path + '.json' - path = '/v1/' + path + '.' + response_extension - i = 1 begin response = self.fetch(:path => path) if not response.is_server_error or i > 2 return response @@ -449,15 +440,10 @@ # @return [String] def api_key @access_token end - - - # @return [String] - def response_format - @response_format - end + end end