Skip to content

Commit 44ec789

Browse files
authored
32 add info and examples on tsdm green tsdm dead and fc endpoints (#33)
* Remove spaces after line continuation symbols in the examples. * Add gettsdmgreenstats example * Update valid chaining sequences * Added FC example and reformatted tsdm responses to make the attributes easier to read. * Handle the outstanding todos. * Add chaining example 2. * Tidy comments in example 2.
1 parent 41cc37d commit 44ec789

5 files changed

Lines changed: 400 additions & 56 deletions

File tree

afm.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ to send requests to the API. They assume:
2121
GET https://data.afm.cibolabs.com/getimagedates
2222

2323
```bash
24-
curl -s -X GET \
25-
--output data.json \
26-
-H "Content-Type: application/json" \
27-
-H "Authorization: Bearer ${TOKEN}" \
24+
curl -s -X GET \
25+
--output data.json \
26+
-H "Content-Type: application/json" \
27+
-H "Authorization: Bearer ${TOKEN}" \
2828
"https://data.afm.cibolabs.com/getimagedates
2929
```
3030
@@ -56,12 +56,11 @@ geojson=$(cat "$geojson_file")
5656
startdate="20240101"
5757
enddate="20251231"
5858
percentiles="5,95"
59-
60-
curl -s -X POST \
61-
--output data.json \
62-
-H "Content-Type: application/json" \
63-
-H "Authorization: Bearer ${TOKEN}" \
64-
-d "$geojson" \
59+
curl -s -X POST \
60+
--output data.json \
61+
-H "Content-Type: application/json" \
62+
-H "Authorization: Bearer ${TOKEN}" \
63+
-d "$geojson" \
6564
"https://data.afm.cibolabs.com/gettsdmstats?startdate=$startdate&enddate=$enddate&percentiles=$percentiles"
6665
```
6766
@@ -146,11 +145,11 @@ startdate="20250101"
146145
enddate="20250430"
147146
percentiles="5,95"
148147
149-
curl -s -X POST \
150-
--output data.json \
151-
-H "Content-Type: application/json" \
152-
-H "Authorization: Bearer ${TOKEN}" \
153-
-d "$geojson" \
148+
curl -s -X POST \
149+
--output data.json \
150+
-H "Content-Type: application/json" \
151+
-H "Authorization: Bearer ${TOKEN}" \
152+
-d "$geojson" \
154153
"https://data.afm.cibolabs.com/gettsdmstats?startdate=$startdate&enddate=$enddate&percentiles=$percentiles"
155154
```
156155
@@ -279,12 +278,12 @@ POST https://data.afm.cibolabs.com/gettsdmthumbail
279278
geojson_file="your_area_of_interest.geojson"
280279
geojson=$(cat "$geojson_file")
281280
282-
curl -s -X POST \
283-
--output data.json \
284-
-H "Content-Type: application/json" \
285-
-H "Authorization: Bearer ${TOKEN}" \
281+
curl -s -X POST \
282+
--output data.json \
283+
-H "Content-Type: application/json" \
284+
-H "Authorization: Bearer ${TOKEN}" \
286285
-H "Accept: image/png" \
287-
-d "$geojson" \
286+
-d "$geojson" \
288287
"https://data.afm.cibolabs.com/gettsdmthumbail"
289288
```
290289

login.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ CREDENTIALS=$(printf "%s:%s" "$CIBO_CLIENT_ID" "$CIBO_CLIENT_SECRET" | base64 -w
3232

3333
# Exchange your credentials for an access token
3434

35-
TOKEN=$(curl -s -X POST \
36-
-H "Content-Type: application/x-www-form-urlencoded" \
37-
-H "Authorization: Basic ${CREDENTIALS}" \
38-
-d "grant_type=client_credentials" \
35+
TOKEN=$(curl -s -X POST \
36+
-H "Content-Type: application/x-www-form-urlencoded" \
37+
-H "Authorization: Basic ${CREDENTIALS}" \
38+
-d "grant_type=client_credentials" \
3939
"https://login.cibolabs.com/oauth2/token" \
4040
| jq -r '.access_token')
4141

0 commit comments

Comments
 (0)