user2680299
user2680299

Reputation: 79

groupon api - not getting all the deals

when i run the groupon api in apigee for division equals los angeles, thousands of deals come up, but when i run my code below, i'm only getting like 50 ?? please help

var $result = $('#container')
$.ajax({
    type: 'GET',
    url: 'https://api.groupon.com/v2/deals.json?    client_id=b252ad3634a4ab2985b79d230ccc4e49a3ea9d19&show=all&division_id=los-angeles',
    dataType: 'jsonp',
}).done(function(data){
console.log(data)
$.each(data.deals, function(idx, deal){
    var html = '<div class="dealSmall"><div class="image"><div class="merchant">' +     deal.merchant.name + '<img src="' + deal.grid4ImageUrl + '"/></div></div><div     class="dealDetail"><div class="dealName">' + deal.announcementTitle+ '</div><div     class="price">' + deal.options[0].price.formattedAmount + '</div></div></div>'
    $result.append(html)
    })
});
});

Upvotes: 4

Views: 1319

Answers (1)

V_RocKs
V_RocKs

Reputation: 134

Use this URL for your request and you can format it much the same with this API documentation.

https://partner-api.groupon.com/deals.json?tsToken=US_AFF_0_201236_212556_0&division_id=los-angeles&offset=0&limit=1000

Upvotes: 1

Related Questions