{"action":"closed","issue":{"url":"https://api.github.com/repos/gimite/google-drive-ruby/issues/251","repository_url":"https://api.github.com/repos/gimite/google-drive-ruby","labels_url":"https://api.github.com/repos/gimite/google-drive-ruby/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/gimite/google-drive-ruby/issues/251/comments","events_url":"https://api.github.com/repos/gimite/google-drive-ruby/issues/251/events","html_url":"https://github.com/gimite/google-drive-ruby/issues/251","id":211194881,"number":251,"title":"How do I store/re-use session without having to create a new session before the old one expired?","user":{"login":"feliperaul","id":743879,"avatar_url":"https://avatars0.githubusercontent.com/u/743879?v=3","gravatar_id":"","url":"https://api.github.com/users/feliperaul","html_url":"https://github.com/feliperaul","followers_url":"https://api.github.com/users/feliperaul/followers","following_url":"https://api.github.com/users/feliperaul/following{/other_user}","gists_url":"https://api.github.com/users/feliperaul/gists{/gist_id}","starred_url":"https://api.github.com/users/feliperaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliperaul/subscriptions","organizations_url":"https://api.github.com/users/feliperaul/orgs","repos_url":"https://api.github.com/users/feliperaul/repos","events_url":"https://api.github.com/users/feliperaul/events{/privacy}","received_events_url":"https://api.github.com/users/feliperaul/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-03-01T20:14:05Z","updated_at":"2017-03-03T15:46:00Z","closed_at":"2017-03-03T15:46:00Z","body":"Im trying my best to understand how to use this gem properly.\r\n\r\nAs far as I understand, after I use `credentials.fetch_access_token!` and `session = GoogleDrive::Session.from_credentials(credentials)`, I have a new `GoogleDrive::Session` instance saved in `session` that I can use to issue commands.\r\n\r\nI managed to test some commands and they work. I can open and edit spreadsheets trough that session instance. \r\n\r\nThe issue is: obviously, as soon as my rails action run, that instance of `GoogleDrive::Session` is going to be garbaged collected. \r\n\r\nIt can't be that I must iniciate the credentials process all over since I just received a token with 1 hour expiration, right? But how to persist that instance of GoogleDrive::Session for 1 hour or how to re-use that token?\r\n\r\nI tried saving the return of `credentials.fetch_access_token!` in the database and then using `GoogleDrive::Session.from_credentials(user.last_token)` but it doesnt work and returns `dailyLimitExceededUnreg` errors. "}}
{"actor":{"display_login":"feliperaul"}}