Skip to content

Commit 5ccd6d2

Browse files
committed
readme update
1 parent c288cd1 commit 5ccd6d2

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,35 @@ This system can be installed from [UltraLisp](https://ultralisp.org/) like this:
2222
(defvar *service-file* "/myproject/config/google-service.json")
2323
2424
;; Translate
25-
(defparameter *client* (gapi:make-client-with-service-account service-file
26-
:scopes '("https://www.googleapis.com/auth/cloud-translation")))
25+
(defparameter *client*
26+
(gapi:make-client-with-service-account
27+
service-file :scopes '("https://www.googleapis.com/auth/cloud-translation")))
2728
(defparameter *project-id* (gapi:client-project-id *client*))
2829
(gapi:auth *client*)
29-
(gapi:request *client* (format nil "https://translate.googleapis.com/v3beta1/projects/~A:detectLanguage" *project-id*)
30+
(gapi:request *client* (format nil
31+
"https://translate.googleapis.com/v3beta1/projects/~A:detectLanguage"
32+
*project-id*)
3033
:method :POST :payload '(:|content| "Hello"))
3134
;; => (:|languages| ((:|confidence| 1 :|languageCode| "en")))
3235
3336
3437
;; FCM
35-
(defparameter *client* (gapi:make-client-with-service-account service-file
36-
:scopes '("https://www.googleapis.com/auth/firebase.messaging")))
38+
(defparameter *client*
39+
(gapi:make-client-with-service-account
40+
service-file :scopes '("https://www.googleapis.com/auth/firebase.messaging")))
3741
(defparameter *project-id* (gapi:client-project-id *client*))
3842
(gapi:auth *client*)
3943
(defvar *message*
4044
(list :|token| *token*
4145
:|notification| (list :|title| "Message Title"
4246
:|body| "Message body")))
43-
(gapi:request *client* (format nil "https://fcm.googleapis.com/v1/projects/~A/messages:send" *project-id*)
47+
(gapi:request *client* (format nil "https://fcm.googleapis.com/v1/projects/~A/messages:send"
48+
*project-id*)
4449
:method :POST :data (list :|message| *message*))
4550
46-
47-
etc
51+
;;etc
4852
```
4953

5054
## Documentation
5155

56+
- [Google APIs Explorer](https://developers.google.com/apis-explorer)

gapi.asd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defsystem "gapi"
1+
(defsystem gapi
22
:version "0.1.0"
33
:author "Dmitrii Kosenkov"
44
:license "MIT"

0 commit comments

Comments
 (0)