blob: 073cbe7e7977a255e045cffe759884e0a48c1109 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import {sendRequest} from "../index";
import {getById} from "./util";
export function getPath(pathId) {
return getById("/paths/{pathId}", {pathId});
}
export function getBranchesOfPath(pathId) {
return getById("/paths/{pathId}/branches", {pathId});
}
export function branchFromPath(pathId, section) {
return sendRequest({
path: "/paths/{pathId}/branches",
method: "POST",
parameters: {
body: {
section
},
path: {
pathId
},
query: {}
}
});
}
export function getSectionsOfPath(pathId) {
return getById("/paths/{pathId}/sections", {pathId});
}
|