treedb_topics()

treedb_topics()#

treedb_topics() retrieves a list of topic names from the specified TreeDB, optionally returning detailed information in dictionary format.

Prototype

json_t *treedb_topics(
    json_t       *tranger,
    const char   *treedb_name,
    json_t       *jn_options  // "dict" return list of dicts, otherwise return list of strings
);

Parameters

Key

Type

Description

tranger

json_t *

A reference to the tranger database instance.

treedb_name

const char *

The name of the TreeDB from which to retrieve topic names.

jn_options

json_t *

Options for the output format. If set to "dict", returns a list of dictionaries; otherwise, returns a list of strings.


Return Value

A JSON array containing the topic names or a list of dictionaries if jn_options is set to "dict". The returned value is not owned by the caller.

Notes

The returned JSON object should not be modified or freed by the caller. Use treedb_list_treedb() to retrieve available TreeDB names.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples