package gapi-ocaml

  1. Overview
  2. Docs
A simple OCaml client for Google Services

Install

Dune Dependency

Authors

Maintainers

Sources

v0.3.16.tar.gz
sha256=f6fcb4fa753e8627c03c53be8a56dae9efd999b7f4d7ce0efdf85e15104da373
md5=4a4e31b326feb16a0023b08cf9af4bab

Description

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: Calendar APIs v3, Google+ API v1, Tasks API v1, APIs Discovery Service v1, URL Shortener API v1, OAuth2 API v2, Custom Search API v1, Google Analytics API v3, Page Speed Online API v1, Blogger API v2, Site Verification API v1, AdSense Management API v1.4, BigQuery API v2, Drive API v2, Drive API v3, Gmail API v1. Google Data Protocol APIs (GData): Google Documents List API v3.

Published: 17 Sep 2019

README

Google APIs Client library for OCaml

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:

  • Calendar APIs v3

  • Google+ API v1

  • Tasks API v1

  • APIs Discovery Service v1

  • URL Shortener API v1

  • OAuth2 API v2

  • Custom Search API v1

  • Google Analytics API v3

  • Page Speed Online API v1

  • Blogger API v2

  • Site Verification API v1

  • AdSense Management API v1.1

  • BigQuery API v2

  • Drive API v2

  • Drive API v3

  • Gmail API v1

Google Data Protocol APIs (GData):

  • Google Documents List API v3 (supports Google Drive)

Features

  • Monadic interface

  • Functional lenses to access data structures

  • Service generator (experimental): a tool for generating client libraries for APIs based on the Google API Discovery format

Building gapi-ocaml

Requirements

You will need the following libraries:

This library was developed and tested on Ubuntu LTS (64-bit).

Configuration and installation

This project provides 2 libraries:

  • gapi-ocaml: Google APIs client library

  • gapi-ocaml.gdata: Google Data Protocol client library

To build the libraries, run

$ make

To install the libraries, run (as root, if your user doesn't have enough privileges)

$ make install

To build and run the tests (you will need ppx_monadic), 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

Usage

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.

Dev Dependencies (1)

  1. ounit with-test

Used by (1)

  1. google-drive-ocamlfuse >= "0.6.22" & < "0.7.18"

Conflicts

None

OCaml

Innovation. Community. Security.