sample.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:yelp-fusion 作者: Yelp 项目源码 文件源码
def search(api_key, term, location):
    """Query the Search API by a search term and location.

    Args:
        term (str): The search term passed to the API.
        location (str): The search location passed to the API.

    Returns:
        dict: The JSON response from the request.
    """

    url_params = {
        'term': term.replace(' ', '+'),
        'location': location.replace(' ', '+'),
        'limit': SEARCH_LIMIT
    }
    return request(API_HOST, SEARCH_PATH, api_key, url_params=url_params)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号