/elixir-google-drive-api

Elixir library to work files of Google Drive

Primary LanguageElixir

Build Status Ebert codecov

ElixirGoogleDriveApi

Elixir Google Drive

Elixir library to work files of Google Drive

Current Status

Google Drive V3 Api Reference

About

For About Resource details, see the resource representation page.

Changes

For Changes Resource details, see the resource representation page.

Channels

For Channels Resource details, see the resource representation page.

Comments

For Comments Resource details, see the resource representation page.

Files

For Files Resource details, see the resource representation page.

Permissions

For Permissions Resource details, see the resource representation page.

Replies

For Replies Resource details, see the resource representation page.

Revisions

For Revisions Resource details, see the resource representation page.

Teamdrives

For Revisions Resource details, see the resource representation page.

Setup

  1. 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.
  2. On the Add credentials to your project page, create Service account key.
  3. Select your project name as service account and JSON as key format, download the created key and rename it to client_secret.json.
  4. Press Manage service accounts on a credential page, copy your Service Account Identifier: [projectname]@[domain].iam.gserviceaccount.com
  5. Create or open existing document on your Google Drive and add Service Account Identifier as user invited in Collaboration Settings.
  6. Add {:elixir_google_drive_api, "~> 0.4"} to mix.exs under deps function, add :elixir_google_drive_api in your application list.
  7. Add client_secret.json in your config.exs or other config file, like dev.exs or prod.secret.exs. config :goth, json: "./config/client_secret.json" |> File.read!
  8. 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.