-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thibaut
committed
Aug 4, 2021
1 parent
18bdf56
commit f1fc82e
Showing
1 changed file
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,46 @@ | ||
(*TODO*) | ||
[@@@js.stop] | ||
|
||
val available : unit -> bool | ||
|
||
[@@@js.start] | ||
|
||
[@@@js.implem | ||
let available () = | ||
Js_of_ocaml.Js.Optdef.test Js_of_ocaml.Js.Unsafe.global##.plugins##.googleplus] | ||
|
||
module Login : sig | ||
type parameters | ||
|
||
type user | ||
|
||
type error = Ojs.t | ||
|
||
val parameters : | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
?web_client_id:string -> | ||
?offline:bool -> | ||
?id_token:string -> | ||
?server_auth_code:string -> | ||
?profile:string -> | ||
?email:string -> | ||
?scopes:Ojs.t list -> | ||
unit -> | ||
parameters | ||
[@@js.builder] [@@js.verbatim_names] | ||
|
||
val login : | ||
?param:parameters -> | ||
?onInit:(user -> unit) -> | ||
?onError:(error -> unit) -> | ||
unit -> | ||
unit | ||
[@@js.global "window.plugins.googleplus.login"] | ||
end | ||
|
||
type loginResponse | ||
|
||
val loginResponse : Login.user -> loginResponse [@@js.call] | ||
|
||
val id_token : loginResponse -> string [@@js.get "id_token"] | ||
This comment has been minimized.
Sorry, something went wrong.
vouillon
Contributor
|
||
|
||
val logout : ?onInit:(Ojs.t -> unit) -> ?onError:(Ojs.t -> unit) -> unit -> unit | ||
[@@js.global "window.plugins.googleplus.logout"] |
That should be:
profile
andemail
are strings that can be passed using thescopes
parameterid_token
andserver_auth_code
are fields of theuser
object.