TODO: Add description
- Generate Google API key. (.json file)
- Add package to your dependencies
- Add .json file into a config/ folder within your project
- Add to config/config.exs:
config :goth,
json: "config/gs_config.json" |> Path.expand |> File.read!
- Add permissions to the google spreadsheet you want to post. Settings -> add collaborator with edit permissions -> paste email address from .json file "client_email"
- 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.