Elixir Google Drive
Elixir library to work files of Google Drive
- Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
- On the Add credentials to your project page, create Service account key.
- Select your project name as service account and JSON as key format, download the created key and rename it to client_secret.json.
- Press Manage service accounts on a credential page, copy your Service Account Identifier: [projectname]@[domain].iam.gserviceaccount.com
- Create or open existing document on your Google Drive and add Service Account Identifier as user invited in Collaboration Settings.
- Add
{:elixir_google_drive_api, "~> 0.4"}
to mix.exs underdeps
function, add:elixir_google_drive_api
in your application list. - Add client_secret.json in your
config.exs
or other config file, likedev.exs
orprod.secret.exs
. config :goth, json: "./config/client_secret.json" |> File.read! - Run
mix deps.get && mix deps.compile
.
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/elixir_google_drive_api.