lib/imgurr/imgurAPI.rb
# Public: Handle API Response: Uploaded Image
#
# args    - Response data
# 
Handle API Response: Uploaded Image
args    - Response data
Handle API Response : Uploaded Image args - Response data
def handle_upload_response(response, source_path)
        data = JSON.parse(response)
        puts JSON.pretty_unparse(data) if Imgurr::DEBUG
        if data['success']
          storage.add_hash(data['data']['id'], data['data']['deletehash'], source_path)
          return [data['data']['link'], true]
        end
        [ImgurErrors.handle_error(response), false]
      end
def handle_upload_response ( response , source_path ) data = JSON . parse ( response ) puts JSON . pretty_unparse ( data ) if Imgurr :: DEBUG if data [ 'success' ] storage . add_hash ( data [ 'data' ] [ 'id' ] , data [ 'data' ] [ 'deletehash' ] , source_path ) return [ data [ 'data' ] [ 'link' ] , true ] end [ ImgurErrors . handle_error ( response ) , false ] end
Public: Handle API Response: Uploaded Image
args    - Response data
Public : Handle API Response : Uploaded Image args - Response data
response
<not_specific>
source_path
<not_specific>