-
Notifications
You must be signed in to change notification settings - Fork 0
[abandoned idea]
James Cuénod edited this page Sep 30, 2020
·
1 revision
/*
# DELETE (IGNORE BELOW - IT WAS ONCE AN IDEA BUT I'M ABANDONING IT)
Nodes were going to be considered resources:
| Resource | Content |
| --- | --- |
| `node` |The aforementioned words are grouped into nodes which could be phrases, clauses, sentences, or verses. |
### `/node/:id`
Because nodes are tied to versions, we don't need to know any more information about which version (translation) to return. The key with nodes is that they are essentially just a collection of word ids. Critically, though, they fall within verses (sometimes more than one). For this reason, node requests return a series of properties:
| key | value |
|---|---|
|`word_ids`| An array of word ids that make up the node. |
|`verse_ids`| An array of verse references in integer form that can be easily converted to human readable references. This is an array because sometimes nodes can span multiple verses (sentences nodes). |
|`verses`| An array of verse objects from the correct `version` set. |
` ` `json
{
"nid": 104582,
"result": {
"word_ids": [1005765, 1005766, 1005767, 1005768, 1005769, 1005770, 1005771, 1005772, 1005773],
"verse_ids": [39002001],
"verses": [{
"verse_id": 39002001,
"version": "rahlfsa"
"verse": [{
"wid": 1005765,
"text": "καὶ",
"trailer": " "
},
{
"wid": 1005766,
"text": "νῦν",
"trailer": " "
},
{
"wid": 1005767,
"text": "ἡ",
"trailer": " "
},
{
"wid": 1005768,
"text": "ἐντολὴ",
"trailer": " "
},
{
"wid": 1005769,
"text": "αὕτη",
"trailer": " "
},
{
"wid": 1005770,
"text": "πρὸς",
"trailer": " "
},
{
"wid": 1005771,
"text": "ὑμᾶς",
"trailer": " "
},
{
"wid": 1005772,
"text": "οἱ",
"trailer": " "
},
{
"wid": 1005773,
"text": "ἱερεῖς",
"trailer": " "
}
]
}]
}
}
` ` `
*/