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.

1 Answer 1

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!

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.