package gapi-ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Defines the session that stores the current state of a conversation.

type oauth1_context = {
  1. token : string;
    (*

    OAuth1 authorized token.

    *)
  2. secret : string;
    (*

    OAuth1 secret associated with the authorized token.

    *)
}

Current OAuth1 context.

val token : (oauth1_context, string) GapiLens.t

OAuth1 token lens.

val secret : (oauth1_context, string) GapiLens.t

OAuth1 secret lens.

type oauth2_context = {
  1. oauth2_token : string;
    (*

    OAuth2 authorized token.

    *)
  2. refresh_token : string;
    (*

    OAuth2 refresh token.

    *)
}

Current OAuth2 context.

val oauth2_token : (oauth2_context, string) GapiLens.t

OAuth2 token lens.

val refresh_token : (oauth2_context, string) GapiLens.t

OAuth2 refresh token lens.

type auth_context =
  1. | NoAuth
    (*

    No authorization.

    *)
  2. | ClientLogin of string
    (*

    Client Login authorized token.

    *)
  3. | OAuth1 of oauth1_context
    (*

    OAuth1 context.

    *)
  4. | OAuth2 of oauth2_context
    (*

    OAuth2 context.

    *)

Current authorization context.

val no_auth : (auth_context, unit option) GapiLens.t

No authorization lens.

val client_login : (auth_context, string option) GapiLens.t

Client Login token lens.

val oauth1 : (auth_context, oauth1_context option) GapiLens.t

OAuth1 context lens.

val oauth2 : (auth_context, oauth2_context option) GapiLens.t

OAuth2 context lens.

type t = {
  1. curl : [ `Created ] GapiCurl.t;
    (*

    Curl state.

    *)
  2. config : GapiConfig.t;
    (*

    Library configuration.

    *)
  3. auth : auth_context;
    (*

    Current authorization context.

    *)
  4. cookies : string list;
    (*

    Cookies received from the server.

    *)
  5. etag : string;
    (*

    Current resource ETag (received from the server).

    *)
}

Session type.

val curl : (t, [ `Created ] GapiCurl.t) GapiLens.t

Curl state lens.

val config : (t, GapiConfig.t) GapiLens.t

Configuration lens.

val auth : (t, auth_context) GapiLens.t

Authorization lens.

val cookies : (t, string list) GapiLens.t

Cookies lens.

val etag : (t, string) GapiLens.t

ETag lens.

OCaml

Innovation. Community. Security.