Skip to main content

Guides

Guides are per-game wiki pages written in Markdown ("How to install mods for Deadlock", tool guides). Each guide lives in one language (locale = en or ru), has a numeric id, a slug that is unique within the game, and a public revision history. On the site a guide is at /games/{game}/guides/{slug}.

Read​

GET /games/{game}/guides?locale=en&limit=20
GET /games/{game}/guides/{slug}

The list returns published guides, newest first, with the usual cursor envelope. GET /games/{game}/guides/{slug} returns the Markdown (body), sanitized HTML (bodyHtml, headings start at h2) and what the caller may do (canEdit, canPublish, canModerate). Drafts and hidden guides are visible only to their author and to editors; everyone else gets 404.

#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${GLITCHMUG_API:-https://api.glitchmug.com/v1}"

# Published guides of a game in one language, newest first
curl -fsS "$BASE_URL/games/deadlock/guides?locale=en&limit=20"

Write​

POST /games/{game}/guides
PATCH /games/{game}/guides/{slug}

Writing needs an API key with mods:write or a site session.

  • Anyone signed in can create a guide (10 a day). It starts as a draft unless you ask for status: "published" and hold guide:publish (trusted authors and moderators).
  • The author can edit their guide; guide:edit (game moderators and up) edits any guide. 60 edits an hour.
  • Changing status between draft and published needs guide:publish.
  • Every create, edit and revert adds a revision. The slug is picked from the title at creation and never changes.
  • Too many requests: 429 guide_rate_limited.
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${GLITCHMUG_API:-https://api.glitchmug.com/v1}"

# Needs scope mods:write. Without the guide:publish permission the guide starts as a draft.
curl -fsS -X POST "$BASE_URL/games/deadlock/guides" \
-H "Authorization: Bearer $GLITCHMUG_TOKEN" \
-H "Content-Type: application/json" \
-d '{"locale": "en", "title": "How to install mods", "summary": "Folders and tools.", "body": "## Steps\n\n1. Download the mod.", "status": "published"}'

History​

GET /games/{game}/guides/{slug}/revisions
GET /games/{game}/guides/{slug}/revisions/{rev}
POST /games/{game}/guides/{slug}/revisions/{rev}/revert

History is public for visible guides. revert (needs guide:edit) restores the title, summary and text of an older revision as a new revision; nothing is deleted.

Moderation​

POST /games/{game}/guides/{slug}/hide takes a rule code (and an optional reason); POST …/unhide shows the guide again. Both need guide:hide in the game and are written to the moderation log.