BingoBongo/docs/backend/README.md

1.2 KiB

BingoBongo Backend

JSON API

Objects


BingoSquare

{
    "option": "String"
}

BingoBoard

{
    "size": 9,
    "squares": [
        <BingoSquare>,
        <BingoSquare>,
        ...,
        <BingoSquare>
    ]
}

Meta

{
    "name": "String",
    "description": "String"
}

BingoPool

{
    "meta": Meta,
    "squares": [
        <BingoSquare>,
        <BingoSquare>,
        ...,
        <BingoSquare>
    ]
}

Config

Config is loaded from ~/.local/bingobongo.toml

Config default is:

working_dir = "/path/to/working/dir"

Running

Currently the backend loads the bingo datasets from the {working_dir}/pools/ directory, they are just toml files with the following syntax

[meta]
name = 'Name of pool'
description = 'Description of pool'

[[squares]]
option = 'First square'

[[squares]]
option = 'Second square'

[[squares]]
option = 'Third square'

[[squares]]
option = 'Fourth square'

[[squares]]
option = 'Fifth square'

Having the same header [[]] puts them in a list

Both the config and a single dataset is required

Building

  • Install rust
  • clone repo
  • cd repodir/backend
  • cargo build

Done