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
- Host: GitHub
- URL: https://github.com/tckz/gapi
- Owner: tckz
- License: bsd-2-clause
- Created: 2017-10-18T14:31:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-25T22:33:05.000Z (over 2 years ago)
- Last Synced: 2024-06-21T00:00:00.545Z (about 2 years ago)
- Topics: golang, google-api-client
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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