dataprep icon indicating copy to clipboard operation
dataprep copied to clipboard

DataPrep.Connector: Location is required when latitude and longitude are provided (Yelp)

Open jnwang opened this issue 5 years ago • 1 comments

Describe the bug DataPrep.Connector always requires location to be specified. However, according to the Yelp API documentation, location is not required when latitude and longitude are provided. It would be better to make it consistent with the doc.

from dataprep.connector import Connector

conn_yelp = Connector("yelp", _auth={"access_token":yelp_access_token}, _concurrency = 5)

df = await conn_yelp.query("businesses", term = "resturant", latitude = "49.28617652439037", longitude = "-123.13819352127699", _count = 10)

Screen Shot 2020-12-27 at 11 24 45 PM

Desktop (please complete the following information):

OS: MacOS Catalina Browser: Chrome Platform: Jupyter Notebook Platform Version 6.0.1 Python Version 3.7.4 Dataprep Version 0.2.4

jnwang avatar Dec 28 '20 07:12 jnwang

Certainly, we can relax the requirement of location to optional, but that's not correct. Eventually, we want to have some enforcement of: either param A or param B exist.

dovahcrow avatar Jan 05 '21 23:01 dovahcrow