An open API service indexing awesome lists of open source software.

https://github.com/tckz/gapi

Command line tool for calling Google API
https://github.com/tckz/gapi

golang google-api-client

Last synced: 5 months ago
JSON representation

Command line tool for calling Google API

Awesome Lists containing this project

README

          

# gapi

Command line tool for calling Google API.
https://github.com/google/google-api-go-client/

Based on
https://github.com/google/google-api-go-client/tree/master/examples

Add an authentication method, Made it be able to call APIs that I want to use by CLI.

## Command line

```text
$ gapi [global options]

Options:
-cachetoken
cache the OAuth 2.0 token (default true)
-clientid string
OAuth 2.0 Client ID. If non-empty, overrides --clientid_file
-clientid-file string
Name of a file containing just the project's OAuth 2.0 Client ID from https://developers.google.com/console. (default "clientid.dat")
-debug
show HTTP traffic
-httptest.serve string
if non-empty, httptest.NewServer serves on this address and blocks
-secret string
OAuth 2.0 Client Secret. If non-empty, overrides --secret_file
-secret-file string
Name of a file containing just the project's OAuth 2.0 Client Secret from https://developers.google.com/console. (default "clientsecret.dat")
-service-account string
/path/to/service-account.json
-version
show Version
```

### Command: firebase-dynamiclinks

#### stat

* Retrieve link stats of URL which is generated by DynamicLinks.
```text
$ gapi [auth args] firebase-dynamiclinks stat https://xyz.app.goo.gl/some
```

* Options for stat.
```text
-duration int
Duration days (default 10)
-file string
/path/to/urls.txt
-parallelism int
Number of simultaneous requests (default 5)
```

# Build

```
$ make
```

## Requirement

* Go 1.20
* git
* make

# License

BSD 2-Clause License

SEE LICENSE