Skip to content

Instantly share code, notes, and snippets.

@alfonsogarciacaro
Last active April 5, 2016 11:34
Show Gist options
  • Save alfonsogarciacaro/d92cc42fe1ebd5a440a2fa961921b95b to your computer and use it in GitHub Desktop.
Save alfonsogarciacaro/d92cc42fe1ebd5a440a2fa961921b95b to your computer and use it in GitHub Desktop.
Server operations for toggl/mobile

Server Requests

  • Authentication: Signup, Login, SignupWithGoogle, LoginWithGoogle
  • DownloadEntries: Download entries from server between two dates (after trying to load them from local db). Triggered by scrolling the TE list.
  • GetChangesFrom: Get changes from server since a specific datetime. Triggered by swiping down the TE list.
  • GetCurrent(Server)State: Get current data from server (no changes). Happens after logging.
  • Item create/update/delete

Server Responses

  • Authentication
  • DownloadEntries
  • GetChangesFrom
  • GetCurrent(Server)State
  • Item create/update/delete

AppState.RequestInfo

  • Running: List of requests in process (several may happen simultaneously)
  • HadErrors: True if last request finished had errors
  • HasMoreEntries: True if there're more entries available to download from server
  • DownloadEntriesFrom
  • NextDownloadEntriesFrom: What date to use next time DownloadEntries is run
  • GetChangesLastRun: Last time changes were requested from server (swipe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment