/gs

Post a row of data to a google spreadsheet

Primary LanguageElixir

Gs

TODO: Add description

Installation

  1. Generate Google API key. (.json file)
  2. Add package to your dependencies
  3. Add .json file into a config/ folder within your project
  4. Add to config/config.exs:
config :goth,
  json: "config/gs_config.json" |> Path.expand |> File.read!
  1. Add permissions to the google spreadsheet you want to post. Settings -> add collaborator with edit permissions -> paste email address from .json file "client_email"
  2. Usage:
row = %Gs.Row{spreadsheet_id: val, range: val, values: []}
Gs.append(row)
Gs.append(values)

If available in Hex, the package can be installed by adding gs to your list of dependencies in mix.exs:

def deps do
  [{:gs, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/gs.