English 中文(简体)
四个季度检查单——试图在日期之间检查。
原标题:Foursquare checkins api - trying to get checkins between dates

I m using the api @ api.foursquare.com/v2/users/USER_ID/checkins referenced here developer.foursquare.com/docs/users/checkins I am creating the request using vb.net but that s probably irrelevant. The issue I am having is that the response I receive seems to ignore the beforeTimeStamp value.

For example I have created a request url of this; (oauth_token masked – but is correct and works) https://api.foursquare.com/v2/users/self/checkins?oauth_token=####&v=20120214&limit=250&offset=0&afterTimestamp=1332720000&beforeTimestamp=1333238400 1332720000 is the Epoch date 26-03-2012 and 1333238400 is 01-04-2012 I would expect this to return all the checkins between those dates. However it always returns all checkins up to the most recent one, i.e. today 11/04/2012. I spent last night searching for answers to this and I am no further forward.

I could go ahead and write a paging method to move around the history log until I have just the ones I need. This would create multiple requests though. I even wrote a simple function to strip out checkins that were out of range once I had the objects back. However this seems wasteful, especially as the application I am writing has the potential to go back years in a users history. This would mean returning way more data than required, creating an unneccesary overhead. After all the searching I was just about resigned to doing one of the 2 workarounds above when I stumbled on the Foursquare API console at https://apigee.com/
If you have read this far, this is the main thrust of this question (unless anyone knows what I am doing wrong…) If I create a request using the apigee.com interface with the settings above, the response body only contains the checkins I need, i.e. the ones between the specified dates! If I use my app, it returns them all! My URL /v2/users/self/checkins?oauth_token=####&v=20120214&limit=250&offset=0&afterTimestamp=1332720000&beforeTimestamp=1333238400 Apigee’s URL (in the request box after execution) /v2/users/self/checkins?oauth_token=####&v=20120214&limit=250&offset=0&afterTimestamp=1332720000&beforeTimeStamp=1333238400

Spot the difference? Neither can I! Anyone have any ideas? Many thanks

最佳回答

我认为,你在《古兰经》中有了一个打字。 。 页: 1 因此,你的第二个URL没有工作。 此外,你似乎把奥菲·卢里和你卢拉混为一谈。

恢复昨天的支票,为我工作,预期:

https://api.foursquare.com/v2/users/ Self/chec?kinsauth_token=#&v=20120321&timest=1334120400&a

从20120214年开始,APIC版本也没有任何问题。 你们的盟友也在为我工作。

问题回答

暂无回答




相关问题
C# Networking API s [closed]

Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...

getting XML from other domain using ASP.NET

I m fairly new to ASP.NET. And I was wondering how I could go about getting xml from a site (Kuler s API in this case), and then post the result using AJAX? So what I want here, is to be able to do a ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

UML Diagram to Model API

I need to create a diagram to document a RESTFul API that build, which UML diagram should I use? Thanks in advance,

How best to expose Rails methods via an API?

Let s say I have a model foo, and my model has a publish! method that changes a few properties on that model and potentially a few others too. Now, the Rails way suggests that I expose my model over ...

简讯

我是否可以使用某些软件来建立简便的航天国家服务器,最好是在 Java? 所有我都希望我的航天国家服务机在任何要求中都用同样的IP地址来回答。

About paypal express checkout api

In this picture,there are 3 main steps:SetExpressCheckout,GetExpressCheckoutDetails and DoExpressCheckoutDetails,I m now sure SetExpressCheckout is to be called by myself,what about ...

热门标签