/example.rb Secret
Last active
December 18, 2015 17:29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assumes that you already have UserStore.Client and NoteStore.Client objects set up | |
user = user_store.getUser | |
state = note_store.getSyncState | |
total_monthly_quota = user.accounting.uploadLimit | |
used_so_far = state.uploaded | |
quota_remaining = total_monthly_quota - used_so_far | |
resetDate = Time.at(user.accounting.uploadLimitEnd/1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment