v3-yelp-api

    1.0.2 • Public • Published

    v3 Yelp Api

    A simple npm wrapper for Yelp v3 Api which is compatible with React Native

    Dependencies

    axios qs

    Install

    npm

    npm i v3-yelp-api -S
    

    Usage

    import YelpApi from 'v3-yelp-api';
     
    const credentials = {
        appId:"App Id from Yelp Developer Console",
        app: "App Secret from Yelp Developer Console"
    }
     
    const yelp = New YelpApi(credentials)

    Search

    let params = {
        query: 'food',
        location: '51.5007,0.1246',
        price: '2',
        limit: 10
    }
     
    yelp.search(params)
     .then(data => data)
     .catch(err => err)

    Phone Search

    let params = { phone: '+442073722882' }
     
    yelp.phoneSearch(params)
     .then(data => data)
     .catch(err => err)

    Business / Reviews

    let bestRestaurantEver = 'tamada-london'
     
    yelp.business(bestRestaurantEver)
     .then(data => data)
     .catch(err => err)
     
    yelp.reviews(bestRestaurantEver)
     .then(data => data)
     .catch(err => err)

    Transactional Search

    let params = { location: 'london' }
    let transactionType = 'delivery'
     
    yelp.transactionSearch(params)(transactionType)
     .then(data => data)
     .catch(err => err)

    Install

    npm i v3-yelp-api

    DownloadsWeekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • dobiedad