Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/f-f/gogolica
Auto-generated Google APIs for Clojure
https://github.com/f-f/gogolica
clojure google-cloud nikolai-vasilievich-gogol
Last synced: about 2 months ago
JSON representation
Auto-generated Google APIs for Clojure
- Host: GitHub
- URL: https://github.com/f-f/gogolica
- Owner: f-f
- License: epl-1.0
- Created: 2017-09-16T15:27:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-28T14:24:55.000Z (over 7 years ago)
- Last Synced: 2024-11-02T15:05:12.376Z (3 months ago)
- Topics: clojure, google-cloud, nikolai-vasilievich-gogol
- Language: Clojure
- Homepage:
- Size: 1.91 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gogolica
> Always think of what is useful and not what is beautiful.
> Beauty will come of its own accord.
>
> *Nikolai Vasilievich Gogol*> You can't imagine how stupid the whole world has grown nowadays.
>
> *Also Nikolai Vasilievich Gogol*
[![CircleCI](https://circleci.com/gh/f-f/gogolica.svg?style=svg)](https://circleci.com/gh/f-f/gogolica)
***Warning: ALPHA STATUS***
Gogolica is an auto-generated Clojure bindings library for Google APIs.
The implemented APIs are the ones provided from the Google Discovery Service's
JSON description files of the available "new style" Google APIs.The generator itself and the code it produces are *Alpha*.
Some APIs are alpha/beta, and indicated as such in the namespace
(e.g., "gogolica.storage.v1alpha").## Available APIs
None yet.
## Usage
### `gogolica.storage.v1`
```clojure
(require '[gogolica.storage.v1 :as gcs]);; Authentication, if you have the env variable GOOGLE_APPLICATION_DEFAULT set,
;; then your service account key will be read from the path specified in it.
;; Otherwise you can load it manually:
(gogolica.core.auth/key-from-file "path/to/key.json");; List buckets for your project
(gcs/buckets-list "my-project-name" {});; List objects for a buckets
(gcs/objects-list "my-bucket-name" {});; Create new bucket
(gcs/buckets-insert {:name "my-new-bucket-name"} "my-project-name" {});; Upload a new object
(gcs/objects-insert "/absolute/path/to/file.png" {} "my-new-bucket-name" {:name "my-file-name"});; Download the new object - metadata
(gcs/objects-get "my-new-bucket-name" "my-file-name" {});; Download the new object - data as bytearray
(gcs/objects-get "my-new-bucket-name" "my-file-name" {:alt "media"})
```## Developing
### Getting the JSON models for Google APIs
This will clone the Google auto-generated Go library in the `vendor` directory,
and copy over their versioned json models to the `model` folder.```bash
./script/copy-models
```### TODO
> TODO
## Testing
### Unit tests (test pure functions)
```bash
lein test
```### Integration tests (test hitting APIs)
> TODO
## License
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.