2

What if we don't give the fromdate and/or todate parameters in a /me call?

Will it give result of user of all times? It's not mentioned explicitly in documentation.

2

Yes, if you omit those parameters it will give you the expected result...
If a valid token is passed, then it will return the user ("There can be only one.") who obtained/approved that token.

For this route, the fromdate and todate parameters filter on the creation_date property of the user object.

So, if the authorized user signed up for his/her account outside of the range specified by any fromdate and/or todate values, then no user will be returned at all.

For example, user amit jha joined Stack overflow on June 22, 2015. If fetches from /me and... :

  • Leaves fromdate and todate blank, he gets a valid result.
  • Sets fromdate to 1472688000 (Sept 1st, 2016), he gets no result (no user object).
  • Sets fromdate to 1409529600 (Sept 1st, 2014), he gets a valid result.

I can't imagine a legitimate use for this. The presence of these parameters for this route just adds clutter, and confusion, with no purpose.

And, ironically, /me/* routes that could benefit immensely from date parameters (like /me/inbox) don't have them!

  • Good point regarding /me/inbox. I feel they didn't give this facility because, this isn't available in website also. – amit jha Feb 19 '16 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .