lib/file.rb in nylas-2.0.1 vs lib/file.rb in nylas-3.0.0

- old
+ new

@@ -1,8 +1,8 @@ require 'restful_model' -module Inbox +module Nylas class File < RestfulModel parameter :size parameter :filename parameter :content_id @@ -18,20 +18,20 @@ content_type = json["content-type"] if json["content-type"] end def save! ::RestClient.post(url, {:file => @file}) do |response, request, result| - json = Inbox.interpret_response(result, response, :expected_class => Object) + json = Nylas.interpret_response(result, response, :expected_class => Object) json = json[0] if (json.class == Array) inflate(json) end self end def download download_url = self.url('download') ::RestClient.get(download_url) do |response, request, result| - Inbox.interpret_http_status(result) + Nylas.interpret_response(result, response, {:raw_response => true}) response end end end