slackhq / slack-api-docs

API Docs for Slack.com
https://api.slack.com/
426 stars 85 forks source link

Explain nuances of 'latest' and 'oldest' parameters in channels.history #4

Closed jedwood closed 10 years ago

jedwood commented 10 years ago

It took me some trial and error to figure out the different results that are returned when I include both oldest and latest vs just oldest.

Based on the documentation stating that latest defaults to "now," I assumed that calling with just oldest would return the same as calling with explicitly setting latest to the current time. It seems that if both are included, it returns the count results closest to the latest time but no further back than oldest. If only oldest is included in the call, then it returns the count results closest to that oldest date.

To clarify, I think the behavior of the API is great. The docs could just use a little help to avoid confusion.

paulhammond commented 10 years ago

You're right - this needs to be better documented, especially the names of these parameters. There are a couple of other things ahead of this in our queue, but we'll get to it when we can!

jedwood commented 10 years ago

Should I take a shot at it and submit a pull request, or would you prefer to just handle it yourselves?

On Thursday, September 25, 2014, Paul Hammond notifications@github.com wrote:

You're right - this needs to be better documented, especially the names of these parameters. There are a couple of other things ahead of this in our queue, but we'll get to it when we can!

— Reply to this email directly or view it on GitHub https://github.com/tinyspeck/SlackApiDocs/issues/4#issuecomment-56883092 .

-Jed

paulhammond commented 10 years ago

Suggested words are always welcome!

paulhammond commented 10 years ago

We've improved things in 8f825c53e6f87cae4d72a778067e60ceeedecee4, please reopen if you have further suggestions. Thanks again for your feedback!