appdotnet / api-spec

App.net API Documentation is on the web at https://developers.app.net. Source for these docs is in the new-docs branch here. Please use the issue tracker and submit pull requests! Help us build the real-time social service where users and developers come first, not advertisers.
https://developers.app.net
950 stars 98 forks source link

token: Add file_size_limit #316

Closed stevestreza closed 11 years ago

stevestreza commented 11 years ago

The token endpoint returns a bunch of useful information about what that token can do. It includes a storage field with the available and used storage amounts. A field representing what the file size limit would be useful, as the two tiers have different limits, and that gives forward-looking flexibility in terms of changing those limits. Also it'll get more apps using the data in that endpoint, which is probably good.

simonwelsh commented 11 years ago

I think that it’ll make more sense to have this as something like limits.file_size, then we can also get limits.following (to make a nicer UX when a free-tier has hit their max followers) and any other limits that may be added in the future.

lavoy commented 11 years ago

+1 for this

mlv commented 11 years ago

I like this idea too -- a general get my limits endpoint, authenticated to the user. Can initially contain the current free user limits, and add more as needed.

ludolphus commented 11 years ago

+1

joeldev commented 11 years ago

Really need this - having to hardcode these limits and use the correct one based on what type of user account it is (inferred from how much total storage space there is), sucks. :)

tternes commented 11 years ago

The comment from @simonwelsh is great - a general limits object for other account limitations is probably in order here.

mthurman commented 11 years ago

I haven't rolled out documentation for this yet, but there is now a limits object when you request /stream/0/token. It contains max_file_size in bytes and possibly following if there is a limit to how many users this person can follow. Please make sure your app still handles HTTP 507s when a user exceeds their quota (especially in the follow case).