Skip to content

Commit ed43b60

Browse files
committed
close #7; checked and updated all JSON response examples from the docs
1 parent 7264c26 commit ed43b60

11 files changed

Lines changed: 181 additions & 21 deletions

tests/data/collection/collection_docs_response_one.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@id": "lasciva_roma",
55
"@type": "Collection",
66
"collection": "/api/dts/collection/{?id,page,nav}",

tests/data/collection/collection_docs_response_readable.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@id": "urn:cts:latinLit:phi1103.phi001.lascivaroma-lat1",
55
"@type" : "Resource",
66
"title" : "Priapeia",
@@ -32,7 +32,6 @@
3232
"citationTrees": [
3333
{
3434
"@type": "CitationTree",
35-
"maxCiteDepth" : 2,
3635
"citeStructure" : [
3736
{
3837
"citeType": "poem",

tests/data/collection/collection_docs_response_root.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
33
"@id": "general",
44
"@type": "Collection",
55
"collection": "/api/dts/collection/{?id,page,nav}",
6-
"dtsVersion": "1-alpha",
6+
"dtsVersion": "1.0",
77
"totalParents": 0,
88
"totalChildren": 2,
99
"title": "Collection Générale de l'École Nationale des Chartes",

tests/data/entry/entry_docs_response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@id": "/api/dts/",
55
"@type": "EntryPoint",
66
"collection": "/api/dts/collection/{?id,page,nav}",

tests/data/navigation/Untitled

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
{
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
4+
"@type": "Navigation",
5+
"@id": "https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula&down=1&start=C1&end=C3",
6+
"resource": {
7+
"@id": "https://en.wikisource.org/wiki/Dracula",
8+
"@type": "Resource",
9+
"document": "https://example.org/api/dts/document/?resource=https://en.wikisource.org/wiki/Dracula{&ref,start,end,tree,mediaType}",
10+
"collection": "https://example.org/api/dts/collection/?resource=https://en.wikisource.org/wiki/Dracula{&page,nav}",
11+
"navigation": "https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula{&ref,down,start,end,tree,page}",
12+
"citationTrees": [
13+
{
14+
"@type": "CitationTree",
15+
"citeStructure": [
16+
{
17+
"@type": "CiteStructure",
18+
"citeType": "Chapter",
19+
"citeStructure": [
20+
{
21+
"@type": "CiteStructure",
22+
"citeType": "Journal Entry",
23+
"citeStructure": [
24+
{
25+
"@type": "CiteStructure",
26+
"citeType": "Paragraph"
27+
}
28+
]
29+
}
30+
]
31+
}
32+
]
33+
}
34+
]
35+
},
36+
"start": {
37+
"identifier": "C1",
38+
"@type": "CitableUnit",
39+
"level": 1,
40+
"parent": null,
41+
"citeType": "Chapter",
42+
"dublinCore": {
43+
"title": [{"lang": "en", "value": "Chapter 1: Jonathan Harker's Journal"}]
44+
}
45+
},
46+
"end": {
47+
"identifier": "C3",
48+
"@type": "CitableUnit",
49+
"level": 1,
50+
"parent": null,
51+
"citeType": "Chapter",
52+
"dublinCore": {
53+
"title": [{"lang": "en", "value": "Chapter 3: Jonathan Harker's Journal - Continued"}]
54+
}
55+
},
56+
"member": [
57+
{
58+
"identifier": "C1",
59+
"@type": "CitableUnit",
60+
"level": 1,
61+
"parent": null,
62+
"citeType": "Chapter",
63+
"dublinCore": {
64+
"title": [{"lang": "en", "value": "Chapter 1: Jonathan Harker's Journal"}]
65+
}
66+
},
67+
{
68+
"identifier": "C1.E1",
69+
"@type": "CitableUnit",
70+
"level": 2,
71+
"parent": "C1",
72+
"citeType": "Journal Entry",
73+
"dublinCore": {
74+
"title": [{"lang": "en", "value": "3 May. Bistritz"}]
75+
}
76+
},
77+
{
78+
"identifier": "C1.E2",
79+
"@type": "CitableUnit",
80+
"level": 2,
81+
"parent": "C1",
82+
"citeType": "Journal Entry",
83+
"dublinCore": {
84+
"title": [{"lang": "en", "value": "4 May"}]
85+
}
86+
},
87+
/* ... */
88+
{
89+
"identifier": "C2",
90+
"@type": "CitableUnit",
91+
"level": 1,
92+
"parent": null,
93+
"citeType": "Chapter",
94+
"dublinCore": {
95+
"title": [{"lang": "en", "value": "Chapter 2: Jonathan Harker's Journal - Continued"}]
96+
}
97+
},
98+
{
99+
"identifier": "C2.E1",
100+
"@type": "CitableUnit",
101+
"level": 2,
102+
"parent": "C2",
103+
"citeType": "Journal Entry",
104+
"dublinCore": {
105+
"title": [{"lang": "en", "value": "5 May"}]
106+
}
107+
},
108+
{
109+
"identifier": "C2.E2",
110+
"@type": "CitableUnit",
111+
"level": 2,
112+
"parent": "C2",
113+
"citeType": "Journal Entry",
114+
"dublinCore": {
115+
"title": [{"lang": "en", "value": "7 May"}]
116+
}
117+
},
118+
/* ... */
119+
{
120+
"identifier": "C3",
121+
"@type": "CitableUnit",
122+
"level": 1,
123+
"parent": null,
124+
"citeType": "Chapter",
125+
"dublinCore": {
126+
"title": [{"lang": "en", "value": "Chapter 3: Jonathan Harker's Journal - Continued"}]
127+
}
128+
},
129+
{
130+
"identifier": "C3.E1",
131+
"@type": "CitableUnit",
132+
"level": 2,
133+
"parent": "C3",
134+
"citeType": "Journal Entry",
135+
"dublinCore": {
136+
"title": [{"lang": "en", "value": "8 May continued"}]
137+
}
138+
},
139+
{
140+
"identifier": "C3.E2",
141+
"@type": "CitableUnit",
142+
"level": 2,
143+
"parent": "C3",
144+
"citeType": "Journal Entry",
145+
"dublinCore": {
146+
"title": [{"lang": "en", "value": "Midnight"}]
147+
}
148+
}
149+
/* ... */
150+
{
151+
"identifier": "C3.E6",
152+
"@type": "CitableUnit",
153+
"level": 2,
154+
"parent": "C3",
155+
"citeType": "Journal Entry",
156+
"dublinCore": {
157+
"title": [{"lang": "en", "value": "Later: the Morning of 16 May"}]
158+
}
159+
}
160+
]
161+
}

tests/data/navigation/navigation_docs_response_down_one.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@type": "Navigation",
55
"@id": "https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula&ref=C1&down=-1",
66
"resource": {

tests/data/navigation/navigation_docs_response_down_two.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@id":"https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula&down=2",
55
"@type": "Navigation",
66
"resource": {

tests/data/navigation/navigation_docs_response_low_ref_down_one.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@type": "Navigation",
55
"@id": "https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula&ref=C1.E1&down=1",
66
"resource": {

tests/data/navigation/navigation_docs_response_range_plus_down.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@type": "Navigation",
55
"@id": "https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula&down=1&start=C1&end=C3",
66
"resource": {

tests/data/navigation/navigation_docs_response_ref.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"@context": "https://distributed-text-services.github.io/specifications/context/1-alpha1.json",
3-
"dtsVersion": "1-alpha",
2+
"@context": "https://dtsapi.org/context/v1.0.json",
3+
"dtsVersion": "1.0",
44
"@type": "Navigation",
55
"@id": "https://example.org/api/dts/navigation/?resource=https://en.wikisource.org/wiki/Dracula&ref=C1&down=-1",
66
"resource": {

0 commit comments

Comments
 (0)