gapi-ocaml is a simple, unofficial, OCaml client for Google Services. The library supports ClientLogin, OAuth 1.0a, and OAuth 2.0 authentication. Supported RESTful APIs:
You will need the following libraries:
This library was developed and tested on Ubuntu LTS (64-bit).
To build the library, run
$ make
To install the library, run (as root, if your user doesn't have enough privileges)
$ make install
To build and run the tests, execute
$ make test
See src/test/README.md
for further details regarding the tests.
To build the examples:
$ dune build @examples
See examples/README.md
for further details regarding the examples.
To generate the documentation, run
$ make doc
Then you can browse the HTML documentation starting from
gapi-ocaml.docdir/index.html
, but is not installed by default.
To uninstall anything that was previously installed, execute
$ make uninstall
See auth examples in examples/auth
for some examples of how to use Google's
authorization endpoints.
See examples
directory to find code samples that show usage of some
services.
See tools/serviceGenerator.ml
for a complex example of how to use functional
lenses within the state monad.
See tools/README.md
for the instructions of how to build and run the service
generator utility.
To support OCaml 5, I removed the direct dependency on Ocamlnet. To do so, I
imported (in the src
directory) the netstring
and netsys
libraries from
upstream,
applied the patches from this
PR, and
further patched the code to compile and run correctly.