app/controllers/api/snaps_controller.rb
def process_searched_image image_id
    # Empty response object
    response = { }
    response[:api_data] = []

    if image_id
      # Build the response object
      response[:data] = { :records => [], :roomRecords => nil, :message => 'Result found' }
      response[:success] = true
      response[:requestComplete] = true

      # Get the image information for the image id
      response[:data][:records] << get_image_information(image_id)
      response[:data][:roomRecords] = [] # method: `get_similar_artworks(image_id)` is replaced with stories in V3. Uncomment it, if Barnes need also in this room feature back
      response[:data][:show_story] = find_and_save_story_by?(image_id)
    end
    return response
  end
## Processes a recognized image using its id
Processes a recognized image using its id
Processes a recognized image using its id
def process_searched_image image_id
    response = { }
    response[:api_data] = []
    if image_id
      response[:data] = { :records => [], :roomRecords => nil, :message => 'Result found' }
      response[:success] = true
      response[:requestComplete] = true
      response[:data][:records] << get_image_information(image_id)
      response[:data][:roomRecords] = [] 
      response[:data][:show_story] = find_and_save_story_by?(image_id)
    end
    return response
  end
def process_searched_image image_id response = { } response [ :api_data ] = [ ] if image_id response [ :data ] = { :records => [ ] , :roomRecords => nil , :message => 'Result found' } response [ :success ] = true response [ :requestComplete ] = true response [ :data ] [ :records ] << get_image_information ( image_id ) response [ :data ] [ :roomRecords ] = [ ] response [ :data ] [ :show_story ] = find_and_save_story_by? ( image_id ) end return response end
Processes a recognized image using its id
Processes a recognized image using its id
# Empty response object # Build the response object # Get the image information for the image id # method: `get_similar_artworks(image_id)` is replaced with stories in V3. Uncomment it, if Barnes need also in this room feature back
image_id