Integrant methods for connecting to a Google API database via google-api-clj.
To install, add the following to your project :dependencies
[viebel/duct-google-api "0.1.0"]
This library provides three things:
and the selected database (:db
).
:duct.services.google/drive
that initiates the Drive service based on either google client or credetials path.:duct.services.google/sheets
that initiates the Sheets service based on either google client or credetials path.:duct.services.google/client
that initiates the google client based on credetials path.For Drive service:
{:duct.services.google/drive
{:credential-path "my-creds.json"
:application-name "my-app"
:scopes [:drive]}}
For Sheets service:
{:duct.services.google/sheets
{:credential-path "my-creds.json"
:application-name "my-app"
:scopes [:sheets}}}}
When you need more than one Google Service, you might want to use the same Google Client for authentication:
{:duct.services.google/client {:credential-path "my-creds.json"
:application-name "my-app"
:scopes [:drive :sheets}}}
:duct.services.google/sheets {:client #ig/ref :duct.services.google/client}
:duct.services.google/drive {:client #ig/ref :duct.services.google/client}}
lein test
Copyright © 2019 Yehonathan Sharvit
Distributed under the Eclipse Public License version 2.0
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close