From 150af69655e493da4753e987acc0e1cc23306082 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 5 Apr 2026 06:22:19 -0500 Subject: chore: gitignore and untrack data/ directory --- .gitignore | 7 +-- data/skyfi-api.rest | 85 ------------------------------ data/tutorial-api.rest | 140 ------------------------------------------------- 3 files changed, 2 insertions(+), 230 deletions(-) delete mode 100644 data/skyfi-api.rest delete mode 100644 data/tutorial-api.rest diff --git a/.gitignore b/.gitignore index d63611e1..d89ad92d 100644 --- a/.gitignore +++ b/.gitignore @@ -78,8 +78,5 @@ history /v2mom.org /.time-zones.el -# Calendar sync generated data -/data/gcal.org -/data/pcal.org -/data/dcal.org -/data/calendar-sync-state.el +# Data directory (calendar sync output, API rest files) +/data/ diff --git a/data/skyfi-api.rest b/data/skyfi-api.rest deleted file mode 100644 index 9a5a4267..00000000 --- a/data/skyfi-api.rest +++ /dev/null @@ -1,85 +0,0 @@ -# -*- restclient -*- -# -# SkyFi Satellite Imagery API -# https://app.skyfi.com/platform-api/redoc -# -# KEY INJECTION: -# The :skyfi-key variable below is auto-populated from authinfo.gpg -# when you open this file via C-; R s. The key is NEVER stored on disk. -# If you see PLACEHOLDER, run C-; R s again or check your authinfo.gpg. -# -# authinfo.gpg entry format: -# machine app.skyfi.com login apikey password YOUR_API_KEY_HERE - -:skyfi-key = PLACEHOLDER -:skyfi-base = https://app.skyfi.com/platform-api - -# -# ============================================================ -# Archive Search — find available satellite imagery -# ============================================================ -# - -# Search for imagery over an area of interest (AOI) -# Adjust the GeoJSON polygon, date range, and cloud cover as needed -POST :skyfi-base/archive/search -Content-Type: application/json -APIKey: :skyfi-key - -{ - "aoi": { - "type": "Polygon", - "coordinates": [[ - [-90.10, 29.95], - [-90.05, 29.95], - [-90.05, 29.98], - [-90.10, 29.98], - [-90.10, 29.95] - ]] - }, - "dateFrom": "2025-01-01T00:00:00Z", - "dateTo": "2025-12-31T23:59:59Z", - "cloudCover": 20 -} - -# -# ============================================================ -# Pricing — get cost estimate for an archive item -# ============================================================ -# - -# Replace ARCHIVE_ID with an ID from the search results above -# TIP: Use jq to extract IDs: -> jq-set-var :archive-id .[0].id -POST :skyfi-base/pricing -Content-Type: application/json -APIKey: :skyfi-key - -{ - "archiveId": "ARCHIVE_ID_HERE", - "aoi": { - "type": "Polygon", - "coordinates": [[ - [-90.10, 29.95], - [-90.05, 29.95], - [-90.05, 29.98], - [-90.10, 29.98], - [-90.10, 29.95] - ]] - } -} - -# -# ============================================================ -# Orders — place and check orders -# ============================================================ -# - -# Check order status (replace ORDER_ID) -GET :skyfi-base/orders/ORDER_ID_HERE -APIKey: :skyfi-key - -# - -# List recent orders -GET :skyfi-base/orders -APIKey: :skyfi-key diff --git a/data/tutorial-api.rest b/data/tutorial-api.rest deleted file mode 100644 index 6820cd87..00000000 --- a/data/tutorial-api.rest +++ /dev/null @@ -1,140 +0,0 @@ -# -*- restclient -*- -# -# REST API Tutorial — Free Public APIs -# -# QUICK START: -# 1. Place cursor on any request line (GET, POST, etc.) -# 2. C-c C-c — execute request, results appear below -# 3. C-c C-p — jump to previous request -# 4. C-c C-n — jump to next request -# 5. TAB — hide/show response body -# -# SYNTAX BASICS: -# - Lines starting with # are comments -# - Blank line separates comment/header blocks from the request -# - :var = value defines a variable, use it as :var in requests -# - Requests: METHOD URL, then headers, then body after blank line -# -# VARIABLES: -# Define once, reuse everywhere. Variables persist across requests -# in the same buffer. - -:jsonplaceholder = https://jsonplaceholder.typicode.com -:httpbin = https://httpbin.org - -# -# ============================================================ -# JSONPlaceholder — fake REST API for testing -# ============================================================ -# - -# GET a single post -GET :jsonplaceholder/posts/1 - -# - -# GET all posts by user 1 -GET :jsonplaceholder/posts?userId=1 - -# - -# POST a new post (returns 201 with fake ID) -POST :jsonplaceholder/posts -Content-Type: application/json - -{ - "title": "Testing from Emacs", - "body": "restclient.el is great for API exploration.", - "userId": 1 -} - -# - -# PUT (full update) — replaces post 1 -PUT :jsonplaceholder/posts/1 -Content-Type: application/json - -{ - "id": 1, - "title": "Updated Title", - "body": "Updated body text.", - "userId": 1 -} - -# - -# PATCH (partial update) — only update the title -PATCH :jsonplaceholder/posts/1 -Content-Type: application/json - -{ - "title": "Just the title changed" -} - -# - -# DELETE a post -DELETE :jsonplaceholder/posts/1 - -# -# ============================================================ -# httpbin — HTTP echo service -# ============================================================ -# - -# Echo back request headers (great for debugging auth) -GET :httpbin/headers - -# - -# Send custom headers and see them echoed back -GET :httpbin/headers -X-Custom-Header: hello-from-emacs -Accept: application/json - -# - -# Test Basic Auth (user: testuser, pass: testpass) -# httpbin checks credentials and returns 200 or 401 -GET :httpbin/basic-auth/testuser/testpass -Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= - -# - -# See your external IP -GET :httpbin/ip - -# - -# Test different status codes (change 418 to any HTTP status) -GET :httpbin/status/418 - -# - -# POST with form data -POST :httpbin/post -Content-Type: application/x-www-form-urlencoded - -name=Craig&tool=restclient - -# -# ============================================================ -# Tips & Tricks -# ============================================================ -# -# JQ FILTERING (requires jq installed + restclient-jq): -# Add -> jq-set-var :varname .path after a request to capture -# a value from the JSON response into a restclient variable. -# -# MULTI-LINE BODIES: -# Just write the JSON/XML body after a blank line. restclient -# sends everything until the next # comment line. -# -# FILE ORGANIZATION: -# Save related requests together in .rest files (e.g., per API -# or per project). Open them with C-; R o. -# -# WORKFLOW: -# 1. Start with C-; R n (scratch buffer) for quick experiments -# 2. Save working requests to a .rest file for reuse -# 3. Use variables for base URLs and auth tokens -- cgit v1.2.3