Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

#all_products method returns a NameError with message "undefined local variable or method 'results'" #10

@nurmuhammadsirat

Description

@nurmuhammadsirat
require 'semantics3'
API_KEY = 'SEM3xxxxxxxxxxxxxxxxxxxxxx'
API_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
sem3 = Semantics3::Products.new(API_KEY,API_SECRET)
sem3.products_field( "search", "iphone" )
sem3.all_products

This will return:

NameError: undefined local variable or method `results' for #<Semantics3::Products:0x007fb0a2ab5f90>
    from /path/to/gems/semantics3-0.11/lib/semantics3.rb:101:in `all_products'

I believe this is caused in because the "results" in this line should be a string.
Current:

if not @query_result.has_key?(results)

Probably should be:

if not @query_result.has_key?("results")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions