From 5ccd6d2ebd3e53e37970d354c3aaa80d45c3afa7 Mon Sep 17 00:00:00 2001 From: Junker <1144095+Junker@users.noreply.github.com> Date: Thu, 18 Jul 2024 08:34:47 +0700 Subject: [PATCH] readme update --- README.md | 21 +++++++++++++-------- gapi.asd | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cf06459..4e2c3c5 100644 --- a/README.md +++ b/README.md @@ -22,30 +22,35 @@ This system can be installed from [UltraLisp](https://ultralisp.org/) like this: (defvar *service-file* "/myproject/config/google-service.json") ;; Translate -(defparameter *client* (gapi:make-client-with-service-account service-file - :scopes '("https://www.googleapis.com/auth/cloud-translation"))) +(defparameter *client* + (gapi:make-client-with-service-account + service-file :scopes '("https://www.googleapis.com/auth/cloud-translation"))) (defparameter *project-id* (gapi:client-project-id *client*)) (gapi:auth *client*) -(gapi:request *client* (format nil "https://translate.googleapis.com/v3beta1/projects/~A:detectLanguage" *project-id*) +(gapi:request *client* (format nil + "https://translate.googleapis.com/v3beta1/projects/~A:detectLanguage" + *project-id*) :method :POST :payload '(:|content| "Hello")) ;; => (:|languages| ((:|confidence| 1 :|languageCode| "en"))) ;; FCM -(defparameter *client* (gapi:make-client-with-service-account service-file - :scopes '("https://www.googleapis.com/auth/firebase.messaging"))) +(defparameter *client* + (gapi:make-client-with-service-account + service-file :scopes '("https://www.googleapis.com/auth/firebase.messaging"))) (defparameter *project-id* (gapi:client-project-id *client*)) (gapi:auth *client*) (defvar *message* (list :|token| *token* :|notification| (list :|title| "Message Title" :|body| "Message body"))) -(gapi:request *client* (format nil "https://fcm.googleapis.com/v1/projects/~A/messages:send" *project-id*) +(gapi:request *client* (format nil "https://fcm.googleapis.com/v1/projects/~A/messages:send" + *project-id*) :method :POST :data (list :|message| *message*)) - -etc +;;etc ``` ## Documentation +- [Google APIs Explorer](https://developers.google.com/apis-explorer) diff --git a/gapi.asd b/gapi.asd index 5e09564..96f56fc 100644 --- a/gapi.asd +++ b/gapi.asd @@ -1,4 +1,4 @@ -(defsystem "gapi" +(defsystem gapi :version "0.1.0" :author "Dmitrii Kosenkov" :license "MIT"