Skip to content

Commit 3531130

Browse files
committed
Streamline documentation
1 parent ab982ac commit 3531130

File tree

2 files changed

+54
-139
lines changed

2 files changed

+54
-139
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/api-v2",
3-
"version": "2.1.5",
3+
"version": "2.1.6",
44
"description": "An API for stratigraphic and geological information (Version 2).",
55
"main": "server.js",
66
"repository": {

v2/defs.ts

Lines changed: 53 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,62 @@
11
(function () {
2+
3+
const sharedUnitFilters = {
4+
unit_id: "integer, a valid unit id",
5+
section_id: "integer, a valid section id",
6+
col_id: "integer, a valid column id",
7+
col_type: "string, a column type",
8+
interval_name: "string, chronostratigraphic time interval name",
9+
int_id:
10+
"integer, a chronostratigraphic time interval ID from /defs/intervals",
11+
age: "numerical age in millions of years before present",
12+
age_top:
13+
"numerical age (Ma) - must be used with age_bottom and be less than age_bottom",
14+
age_bottom:
15+
"numerical age (Ma) - must be used with age_top and be greater than age_top",
16+
lith_id: "integer, ID of a lithology from /defs/lithologies",
17+
lith: "string, specific lithology name (e.g., shale, sandstone)",
18+
lith_type:
19+
"string, groups of lithologies (e.g., carbonate, siliciclastic)",
20+
lith_class:
21+
"string, general lithologies (sedimentary, igneous, metamorphic)",
22+
lith_att_id:
23+
"integer, ID of a lithology attribute from /defs/lithology_attributes",
24+
lith_att:
25+
"string, specific lithology attribute name (e.g. fine, olivine, poorly washed)",
26+
lith_att_type:
27+
"string, specific category of lithology attribute (e.g. grains, lithology, bedform)",
28+
environ_id:
29+
"integer, specific environment ID from /defs/environments",
30+
environ: "string, specific environment",
31+
environ_type: "string, groups of environments",
32+
environ_class: "string, general environments",
33+
econ_id: "integer, ID of an economic attribute from /defs/econs",
34+
econ: "string, name of an economic attribute",
35+
econ_type: "string, name of an economic attribute type",
36+
econ_class: "string, name of an economic attribute class",
37+
cltn_id: "integer, one or more Paleobiology Database collection IDs",
38+
strat_name: "a fuzzy stratigraphic name to match units to",
39+
strat_name_id:
40+
"integer, a single or comma-separated list of stratigraphic IDs from /defs/strat_names",
41+
strat_name_concept_id:
42+
"integer, a single or comma-separated list of stratigraphic name concept IDs from /defs/strat_name_concepts",
43+
lat: "number, decimal degree latitude, WGS84",
44+
lng: "number, decimal degree longitude, WGS84",
45+
adjacents:
46+
"boolean, if lat/lng or col_id is specified, optionally return all units in columns that touch the polygon containing the supplied lat/lng",
47+
project_id: "a Macrostrat project ID",
48+
response: "Any available response_type. Default is short.",
49+
format: "string, desired output format",
50+
}
51+
252
var defs = {
353
"/columns": {
454
description:
555
"Search and summarize columns based on unit properties or geographic location",
656
visible: true,
757
options: {
858
parameters: {
9-
unit_id: "integer, a valid unit id",
10-
section_id: "integer, a valid section id",
11-
col_id: "integer, a valid column id",
12-
col_type: "string, a column type",
13-
interval_name: "string, chronostratigraphic time interval name",
14-
int_id:
15-
"integer, a chronostratigraphic time interval ID from /defs/intervals",
16-
age: "numerical age in millions of years before present",
17-
age_top:
18-
"numerical age (Ma) - must be used with age_bottom and be less than age_bottom",
19-
age_bottom:
20-
"numerical age (Ma) - must be used with age_top and be greater than age_top",
21-
lith_id: "integer, ID of a lithology from /defs/lithologies",
22-
lith: "string, specific lithology name (e.g., shale, sandstone)",
23-
lith_type:
24-
"string, groups of lithologies (e.g., carbonate, siliciclastic)",
25-
lith_class:
26-
"string, general lithologies (sedimentary, igneous, metamorphic)",
27-
lith_att_id:
28-
"integer, ID of a lithology attribute from /defs/lithology_attributes",
29-
lith_att:
30-
"string, specific lithology attribute name (e.g. fine, olivine, poorly washed)",
31-
lith_att_type:
32-
"string, specific category of lithology attribute (e.g. grains, lithology, bedform)",
33-
environ_id:
34-
"integer, specific environment ID from /defs/environments",
35-
environ: "string, specific environment",
36-
environ_type: "string, groups of environments",
37-
environ_class: "string, general environments",
38-
econ_id: "integer, ID of an economic attribute from /defs/econs",
39-
econ: "string, name of an economic attribute",
40-
econ_type: "string, name of an economic attribute type",
41-
econ_class: "string, name of an economic attribute class",
42-
cltn_id: "integer, one or more Paleobiology Database collection IDs",
43-
strat_name: "a fuzzy stratigraphic name to match units to",
44-
strat_name_id:
45-
"integer, a single or comma-separated list of stratigraphic IDs from /defs/strat_names",
46-
lat: "number, decimal degree latitude, WGS84",
47-
lng: "number, decimal degree longitude, WGS84",
48-
adjacents:
49-
"boolean, if lat/lng or col_id is specified, optionally return all units in columns that touch the polygon containing the supplied lat/lng",
50-
project_id: "a Macrostrat project ID",
51-
response: "Any available response_type. Default is short.",
52-
format: "string, desired output format",
59+
...sharedUnitFilters,
5360
},
5461
response_types: ["short", "long"],
5562
output_formats: [
@@ -96,52 +103,7 @@
96103
visible: true,
97104
options: {
98105
parameters: {
99-
unit_id: "integer, a valid unit id",
100-
section_id: "integer, a valid section id",
101-
col_id: "integer, a valid column id",
102-
interval_name: "string, chronostratigraphic time interval name",
103-
int_id:
104-
"integer, a chronostratigraphic time interval ID from /defs/intervals",
105-
age: "numerical age in millions of years before present",
106-
age_top:
107-
"numerical age (Ma) - must be used with age_bottom and be less than age_bottom",
108-
age_bottom:
109-
"numerical age (Ma) - must be used with age_top and be greater than age_top",
110-
lith_id: "integer, ID of a lithology from /defs/lithologies",
111-
lith: "string, specific lithology name (e.g., shale, sandstone)",
112-
lith_group: "string, group of lithologies (e.g., unconsolidated)",
113-
lith_type:
114-
"string, type of lithologies (e.g., carbonate, siliciclastic)",
115-
lith_class:
116-
"string, general lithologies (sedimentary, igneous, metamorphic)",
117-
lith_att_id:
118-
"integer, ID of a lithology attribute from /defs/lithology_attributes",
119-
lith_att:
120-
"string, specific lithology attribute name (e.g. fine, olivine, poorly washed)",
121-
lith_att_type:
122-
"string, specific category of lithology attribute (e.g. grains, lithology, bedform)",
123-
environ_id:
124-
"integer, specific environment ID from /defs/environments",
125-
environ: "string, specific environment",
126-
environ_type: "string, groups of environments",
127-
environ_class: "string, general environments",
128-
econ_id: "integer, ID of an economic attribute from /defs/econs",
129-
econ: "string, name of an economic attribute",
130-
econ_type: "string, name of an economic attribute type",
131-
econ_class: "string, name of an economic attribute class",
132-
cltn_id: "integer, one or more Paleobiology Database collection IDs",
133-
strat_name: "a fuzzy stratigraphic name to match units to",
134-
strat_name_id:
135-
"integer, a single or comma-separated list of stratigraphic IDs from /defs/strat_names",
136-
strat_name_concept_id:
137-
"integer, a single or comma-separated list of stratigraphic name concept IDs from /defs/strat_name_concepts",
138-
lat: "number, decimal degree latitude, WGS84",
139-
lng: "number, decimal degree longitude, WGS84",
140-
adjacents:
141-
"boolean, if lat/lng or col_id is specified, optionally return all units in columns that touch the polygon containing the supplied lat/lng",
142-
project_id: "a Macrostrat project ID",
143-
response: "Any available response_type. Default is short.",
144-
format: "string, desired output format",
106+
...sharedUnitFilters,
145107
},
146108
output_formats: ["json", "csv"],
147109
response_types: ["short", "long"],
@@ -170,60 +132,13 @@
170132
visible: true,
171133
options: {
172134
parameters: {
173-
unit_id: "integer, a valid unit id",
174-
section_id: "integer, a valid section id",
175-
col_id: "integer, a valid column id",
176-
col_type: "string, a column type",
177-
interval_name: "string, chronostratigraphic time interval name",
178-
int_id:
179-
"integer, a chronostratigraphic time interval ID from /defs/intervals",
180-
age: "numerical age in millions of years before present",
181-
age_top:
182-
"numerical age (Ma) - must be used with age_bottom and be less than age_bottom",
183-
age_bottom:
184-
"numerical age (Ma) - must be used with age_top and be greater than age_top; note that returned units may not be entirely contained by age_top and age_bottom, but they will intersect that age range in whole or in part",
185-
lith_id: "integer, ID of a lithology from /defs/lithologies",
186-
lith: "string, specific lithology name (e.g., shale, sandstone)",
187-
lith_group:
188-
"string, groups of lithologies (e.g., sandstones, mudrocks, unconsolidated)",
189-
lith_type:
190-
"string, types of lithologies (e.g., carbonate, siliciclastic)",
191-
lith_class:
192-
"string, general lithologies (sedimentary, igneous, metamorphic)",
193-
lith_att_id:
194-
"integer, ID of a lithology attribute from /defs/lithology_attributes",
195-
lith_att:
196-
"string, specific lithology attribute name (e.g. fine, olivine, poorly washed)",
197-
lith_att_type:
198-
"string, specific category of lithology attribute (e.g. grains, lithology, bedform)",
199-
environ_id:
200-
"integer, specific environment ID from /defs/environments",
201-
environ: "string, specific environment",
202-
environ_type: "string, groups of environments",
203-
environ_class: "string, general environments",
204-
econ_id: "integer, ID of an economic attribute from /defs/econs",
205-
econ: "string, name of an economic attribute",
206-
econ_type: "string, name of an economic attribute type",
207-
econ_class: "string, name of an economic attribute class",
208-
cltn_id: "integer, one or more Paleobiology Database collection IDs",
209-
strat_name: "a fuzzy stratigraphic name to match units to",
210-
strat_name_id:
211-
"integer, a single or comma-separated list of stratigraphic IDs from /defs/strat_names",
212-
strat_name_concept_id:
213-
"integer, a single or comma-separated list of stratigraphic name concept IDs from /defs/strat_name_concepts",
214-
lat: "number, decimal degree latitude, WGS84",
215-
lng: "number, decimal degree longitude, WGS84",
216-
adjacents:
217-
"boolean, if lat/lng or col_id is specified, optionally return all units in columns that touch the polygon containing the supplied lat/lng",
218-
project_id: "a Macrostrat project ID",
219-
response: "Any available response_type. Default is short.",
135+
...sharedUnitFilters,
220136
geom_age:
221137
"If requesting a geographic format, specifies which age to use for the primary coordinates. Accepted parameters are 'modern' (clat, clng), 'top' (t_plat, t_plng) and 'bottom' (b_plat, b_plng). Default is 'modern'",
222138
summarize_measures:
223139
"If present, returns summary statistics about the measurements associated with each unit",
224140
show_position:
225141
"If present, return the unit top and bottom position in section",
226-
format: "string, desired output format",
227142
},
228143
response_types: ["short", "long"],
229144
output_formats: [

0 commit comments

Comments
 (0)