Reputation: 686
There is a lot of data provided in the Groupon API, but I can't find information anywhere on what the different fields mean.
"endAt" and "expiresAt" is quite ambiguous to me. The time at which a deal is no longer valid is quite important to get it wrong is no option.
Any ideas?
Upvotes: 0
Views: 127
Reputation: 898
I am guessing, but I think expireAt sometimes null because not every offer has expiration, but I think it’s better then endAt date when it’s not null. So something like this makes sense to me:
string endDate = (!String.IsNullOrEmpty(deal.expiresAt)) ? deal.expiresAt : deal.endAt;
Upvotes: 0