{"id":20279885,"url":"https://github.com/goodmeasuresllc/gmail_compose_encoder","last_synced_at":"2025-03-04T02:41:38.261Z","repository":{"id":147420905,"uuid":"150648121","full_name":"GoodMeasuresLLC/gmail_compose_encoder","owner":"GoodMeasuresLLC","description":"gmail_compose_encoder is a ruby implementation of googles - specifically gmails - url encoding scheme for opening the gmail in \"compose message\" mode on a particular draft email.","archived":false,"fork":false,"pushed_at":"2018-10-01T18:47:18.000Z","size":10,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-14T07:13:24.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoodMeasuresLLC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-27T21:09:44.000Z","updated_at":"2022-10-08T12:35:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"48a36ebc-970f-4515-b19c-75f44061582d","html_url":"https://github.com/GoodMeasuresLLC/gmail_compose_encoder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodMeasuresLLC%2Fgmail_compose_encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodMeasuresLLC%2Fgmail_compose_encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodMeasuresLLC%2Fgmail_compose_encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodMeasuresLLC%2Fgmail_compose_encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoodMeasuresLLC","download_url":"https://codeload.github.com/GoodMeasuresLLC/gmail_compose_encoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241773256,"owners_count":20018064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T13:33:35.236Z","updated_at":"2025-03-04T02:41:38.237Z","avatar_url":"https://github.com/GoodMeasuresLLC.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GmailComposeEncoder\n\nWelcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gmail_compose_encoder`. To experiment with that code, run `bin/console` for an interactive prompt.\n\ngmail_compose_encoder is a ruby implementation of googles - specifically gmails - url encoding scheme for opening the gmail in \"compose message\" mode on a particular draft email.\n\nIn particular, it is the ruby answer to this question:\n\nWhat do I put into the URI querystring of the new Gmail UI to view a draft message created by the Gmail API?\n\n--\n\nIf I view a draft message in the new Gmail UI, the URI is something like this:\n\nhttps://mail.google.com/mail/u/1/?zx=iij9apqgzdf4#drafts?compose=jrjtXSqXwlFGnSGCQgDCdnHGVFdlpFMgzsCNgpQstQLxdLCMkjKstBmWZkCmjhWTQnpsZCJF\n\nSpecifically, referenced in this SO article https://stackoverflow.com/questions/50124112/how-does-a-gmail-message-id-or-threadid-map-to-the-new-gmail-ui\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'gmail_compose_encoder'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install gmail_compose_encoder\n\n## Usage\n  depends on the google-apis gem, you'd use it something like this:\n```ruby\n    # assume gmail_authorization_token is your GoogleOauthToken,\n    # and you've created gmail_draft_id via the API.\n    draft = gmail_authorization_token.with_gmail_service do |client|\n        client.get_user_draft('me', gmail_draft_id)\n    end\n    # then this call creates a url that you can use in the browser to open\n    # a gmail tab with the draft opened in compose mode\n    GmailComposeEncoder.compose_draft_url(from_address, draft.message.thread_id, draft.message.id)\n```\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gmail_compose_encoder. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the GmailComposeEncoder project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/gmail_compose_encoder/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodmeasuresllc%2Fgmail_compose_encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoodmeasuresllc%2Fgmail_compose_encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodmeasuresllc%2Fgmail_compose_encoder/lists"}