Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xguerin/ocaml-dropbox
Dropbox v2 API bindings
https://github.com/xguerin/ocaml-dropbox
dropbox ocaml
Last synced: 22 days ago
JSON representation
Dropbox v2 API bindings
- Host: GitHub
- URL: https://github.com/xguerin/ocaml-dropbox
- Owner: xguerin
- License: isc
- Created: 2020-07-27T13:48:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-18T17:24:48.000Z (about 4 years ago)
- Last Synced: 2025-01-12T10:44:21.733Z (29 days ago)
- Topics: dropbox, ocaml
- Language: OCaml
- Homepage:
- Size: 101 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dropbox v2 API client for OCaml
## Coverage
The current implementation is partial. The completion of the full API is a work
in progress. Pull requests are welcome.## Preprocessor extension for the Dropbox JSON serializer
The documentation
defines 3 kinds of types:1. Union
2. Open unions
3. Datatype with subtypesUnions uses the `".tag"` field to specify which field in the object is
available. Open unions are unions that can contain new information as the type
is extended. Example:
```json
{
".tag": "conflict",
"conflict": { ".tag": "folder" }
}
```
Datatype with subtypes are usually `struct`-based types that can be structurally
extended within the same object. They use the `".tag"` field to specify which
type is encoded. Example:
```json
{
".tag": "file",
"name": "...",
...
}
```
The serializer allows for more situations than the one presented above. However,
those seem to be enough to cover the use cases of the API. The full serializer
documentation can be found [here](https://github.com/dropbox/stone/blob/main/docs/json_serializer.rst).