Logo Xanthos

Xanthos

F# wrapper library for JRA-VAN JV-Link API.

Overview

Xanthos provides a type-safe F# interface to the JRA-VAN JV-Link COM API, enabling developers to access Japanese horse racing data in a modern, functional programming style.

Features

Text Encoding

Quick Start

Target net10.0-windows and run x64 with JV-Link 5.0 x64 installed and registered. The portable net10.0 target supports record parsing and deterministic tests.

open Xanthos

JvLink.withSession ConnectionOptions.Default (fun session ->
    JvLink.init "UNKNOWN" session
    |> Result.bind (fun () -> session |> JvLink.getVersion))
|> function
    | Ok version -> printfn "JV-Link %s" version
    | Error error -> eprintfn "%s: %s" error.Api error.Message

JvLink functions are curried with Session last; the owner releases COM and its STA on success, errors and consumer exceptions. Records provides the 38 official record parsers. The CLI selects real COM with --com and a deterministic backend with --stub.

See the functional API contract, CLI guide, event delivery and record migration.

Documentation

License

This project is licensed under the MIT License.

Multiple items
module Result from Microsoft.FSharp.Core

--------------------
type Result<'T,'TError> = | Ok of ResultValue: 'T | Error of ErrorValue: 'TError
val bind: binder: ('T -> Result<'U,'TError>) -> result: Result<'T,'TError> -> Result<'U,'TError>
union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
val version: string
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
val error: obj
val eprintfn: format: Printf.TextWriterFormat<'T> -> 'T

Type something to start searching.