Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset Time Applicability #12

Open
torgo opened this issue Feb 12, 2015 · 4 comments
Open

Reset Time Applicability #12

torgo opened this issue Feb 12, 2015 · 4 comments

Comments

@torgo
Copy link
Contributor

torgo commented Feb 12, 2015

So if you are on a monthly contract, what would reset time return? Also what if your operator "rolls over" unused data?

@igrigorik
Copy link

I believe the motivation behind exposing this was:

  • a) help differentiate type of plan (pay as you go) vs recurring, etc.
  • b) help inform the client when the cap might be renewed

That said, you're right, the rollover logic makes this ambiguous, and arguably neither (a) or (b) are strictly necessary and/or can be exposed in a different way. Personally, I think it'd be ok with omitting it.. but I'd love to hear other opinions.

@nrooney
Copy link

nrooney commented Feb 15, 2015

I imagine the time would be either

[1] a countdown towards the reset date
[2] a date representation of the reset date.

But yes the "roll over" data thing confused me too. Although, I'm not entirely too sure why both of the above couldn't work for rolling over data too - in that case [1] would be a countdown towards the day of the month where the new allowance gets calculated. See example where an allowance is reset of the 15th of every month:

14th day - used data = 2gb, total data = 5gb, leftover data = 2gb, days till reset = 1
15th day - used data = 0gb, total data = 7gb (2gb left + 5gb for the month), leftover data = 7gb, days till reset = 30

Other opinions are welcome!

@edent
Copy link

edent commented Feb 25, 2015

The way Twitter does this (with API rate limits rather than data limits) is:

{
    "limit": 180,
    "remaining": 180,
    "reset": 1403602426
  },

That is - the limit, how much is left, and the date when this resets.

I think we should be able to do something similar. If the data doesn't reset (that is, it expires) that can also be respresented. Either

"expires": 123456789,

Or

"expires":0,

If it never expires.

With roll-over... is this really needed? You're effectively trying to show what their usage will be in the future, and that's inherently unpredictable.

@nrooney
Copy link

nrooney commented Mar 11, 2015

Need to make decision on #17 then we can carry on here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants