https://github.com/panglesd/hockmd
An ocaml library to access the hackmd API
https://github.com/panglesd/hockmd
Last synced: over 1 year ago
JSON representation
An ocaml library to access the hackmd API
- Host: GitHub
- URL: https://github.com/panglesd/hockmd
- Owner: panglesd
- License: mit
- Created: 2022-06-30T15:17:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-30T13:38:11.000Z (about 3 years ago)
- Last Synced: 2025-03-24T07:49:12.054Z (over 1 year ago)
- Language: OCaml
- Size: 72.3 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# hockmd
An ocaml library to access the hackmd API.
## Installation
### Using Opam
```bash
opam install hockmd
```
## Usage
The [API](https://panglesd.github.io/hockmd/hockmd/Hockmd/index.html) of the library follows closely the one of the [hackmd API](https://hackmd.io\@hackmd-api/developer-portal/https%3A%2F%2Fhackmd.io%2F%40hackmd-api%2Fhow-to-issue-an-api-token).
You will need a token as explained [here](https://hackmd.io/@hackmd-api/developer-portal/https%3A%2F%2Fhackmd.io%2F%40hackmd-api%2Fhow-to-issue-an-api-token).
The library returns types enclosed in `result` and `promises`. It is advised to make use of ocaml syntax to avoid a too heavy syntax!
``` ocaml
let token = "........."
let res =
let++ notes = Hockmd.notes token in
List.iter (fun note -> print_endline note.title) notes
```