Commited681522Recorded25 Mar 2026Repositorysigil-twitch

Rename (sigil twitch) namespace to (twitch)

Message

External service wrappers use their service name as the top-level namespace. Core (sigil ...) is reserved for Sigil infrastructure.

  • Move src/sigil/twitch.sgl → src/twitch.sgl
  • Move src/sigil/twitch/.sgl → src/twitch/.sgl
  • Update all define-library and import forms
  • Update tests and README
Changed
 .gitignore                           |  4 +---
 README.md                            | 20 ++++++++++----------
 src/{sigil => }/twitch.sgl           |  4 ++--
 src/{sigil => }/twitch/analytics.sgl |  6 +++---
 src/{sigil => }/twitch/chat.sgl      |  6 +++---
 src/{sigil => }/twitch/eventsub.sgl  |  6 +++---
 src/{sigil => }/twitch/schedule.sgl  |  6 +++---
 test/analytics-test.sgl              |  6 +++---
 test/chat-test.sgl                   |  6 +++---
 test/eventsub-test.sgl               |  6 +++---
 test/schedule-test.sgl               |  6 +++---
 test/twitch-test.sgl                 |  4 ++--
 12 files changed, 39 insertions(+), 41 deletions(-)
Diff
.gitignoremodified
@@ -1,3 +1 @@
1
build/
2
lib
3
.mcp.json
+1
build/\nlib
README.mdmodified
@@ -22,18 +22,18 @@ interaction, and EventSub real-time events.
22
23
| Module | Description |
24
|--------|-------------|
25
| `(sigil twitch)` | Core client, auth, HTTP helpers, channels, streams, users, search, pagination |
26
| `(sigil twitch schedule)` | Schedule segments, vacation, iCalendar export |
27
| `(sigil twitch analytics)` | Followers, subscribers, clips, VODs, extension/game analytics |
28
| `(sigil twitch chat)` | Chat messages, chatters, settings, announcements |
29
| `(sigil twitch eventsub)` | EventSub WebSocket message parsing, subscription management |
+25
| `(twitch)` | Core client, auth, HTTP helpers, channels, streams, users, search, pagination |
+26
| `(twitch schedule)` | Schedule segments, vacation, iCalendar export |
+27
| `(twitch analytics)` | Followers, subscribers, clips, VODs, extension/game analytics |
+28
| `(twitch chat)` | Chat messages, chatters, settings, announcements |
+29
| `(twitch eventsub)` | EventSub WebSocket message parsing, subscription management |
30
31
## Usage
32
33
### Client Setup
34
35
```scheme
36
(import (sigil twitch))
+36
(import (twitch))
37
38
;; Create a client with your Twitch credentials
39
(define client
@@ -88,7 +88,7 @@ interaction, and EventSub real-time events.
88
89
```scheme
90
;; Auto-paginate through all followers
91
(import (sigil twitch analytics))
+91
(import (twitch analytics))
92
93
(let ((all-followers
94
(twitch-paginate
@@ -109,7 +109,7 @@ interaction, and EventSub real-time events.
109
### Schedule
110
111
```scheme
112
(import (sigil twitch schedule))
+112
(import (twitch schedule))
113
114
;; Get the schedule
115
(let ((result (twitch-schedule client "141981764")))
@@ -129,7 +129,7 @@ interaction, and EventSub real-time events.
129
### Chat
130
131
```scheme
132
(import (sigil twitch chat))
+132
(import (twitch chat))
133
134
;; Send a chat message
135
(twitch-send-chat-message client
@@ -141,7 +141,7 @@ interaction, and EventSub real-time events.
141
### EventSub
142
143
```scheme
144
(import (sigil twitch eventsub))
+144
(import (twitch eventsub))
145
146
;; After connecting to the WebSocket and receiving a welcome message:
147
(let* ((msg (parse-eventsub-message raw-json))
src/sigil/twitch.sgl → src/twitch.sglrenamed
@@ -1,4 +1,4 @@
1
;;; (sigil twitch) - Twitch Helix API client library.
+1
;;; (twitch) - Twitch Helix API client library.
2
;;;
3
;;; Core module providing authentication, HTTP helpers, record types,
4
;;; and functions for channel management, stream info, user lookup,
@@ -7,7 +7,7 @@
7
;;; All Helix API requests require both a Client-Id header and a
8
;;; Bearer access token.
9
10
(define-library (sigil twitch)
+10
(define-library (twitch)
11
(import (sigil core)
12
(sigil dict)
13
(sigil string)
src/sigil/twitch/analytics.sgl → src/twitch/analytics.sglrenamed
@@ -1,17 +1,17 @@
1
;;; (sigil twitch analytics) - Twitch analytics, followers, subscribers,
+1
;;; (twitch analytics) - Twitch analytics, followers, subscribers,
2
;;; clips, and videos.
3
;;;
4
;;; Provides access to follower/subscriber data, clip management,
5
;;; VOD/highlight retrieval, and extension/game analytics.
6
7
(define-library (sigil twitch analytics)
+7
(define-library (twitch analytics)
8
(import (sigil core)
9
(sigil dict)
10
(sigil string)
11
(sigil struct)
12
(sigil json)
13
(sigil http client)
14
(sigil twitch))
+14
(twitch))
15
16
(export ;; Records
17
twitch-clip
src/sigil/twitch/chat.sgl → src/twitch/chat.sglrenamed
@@ -1,16 +1,16 @@
1
;;; (sigil twitch chat) - Twitch chat operations.
+1
;;; (twitch chat) - Twitch chat operations.
2
;;;
3
;;; Send chat messages, list chatters, manage chat settings,
4
;;; and send announcements via the Helix REST API.
5
6
(define-library (sigil twitch chat)
+6
(define-library (twitch chat)
7
(import (sigil core)
8
(sigil dict)
9
(sigil string)
10
(sigil struct)
11
(sigil json)
12
(sigil http client)
13
(sigil twitch))
+13
(twitch))
14
15
(export ;; Parsing
16
parse-chatters-response
src/sigil/twitch/eventsub.sgl → src/twitch/eventsub.sglrenamed
@@ -1,4 +1,4 @@
1
;;; (sigil twitch eventsub) - Twitch EventSub WebSocket client.
+1
;;; (twitch eventsub) - Twitch EventSub WebSocket client.
2
;;;
3
;;; Connects to the Twitch EventSub WebSocket endpoint to receive
4
;;; real-time push notifications for stream and chat events.
@@ -15,14 +15,14 @@
15
;;; - Must subscribe within the keepalive timeout or connection closes
16
;;; - Max 3 connections per user token, 300 subscriptions per connection
17
18
(define-library (sigil twitch eventsub)
+18
(define-library (twitch eventsub)
19
(import (sigil core)
20
(sigil dict)
21
(sigil string)
22
(sigil struct)
23
(sigil json)
24
(sigil http client)
25
(sigil twitch))
+25
(twitch))
26
27
(export ;; Records
28
twitch-eventsub-session
src/sigil/twitch/schedule.sgl → src/twitch/schedule.sglrenamed
@@ -1,4 +1,4 @@
1
;;; (sigil twitch schedule) - Twitch stream schedule management.
+1
;;; (twitch schedule) - Twitch stream schedule management.
2
;;;
3
;;; CRUD operations for schedule segments (recurring and non-recurring),
4
;;; vacation settings, and iCalendar export.
@@ -6,14 +6,14 @@
6
;;; Requires channel:manage:schedule scope for write operations.
7
;;; Read operations work with any app or user token.
8
9
(define-library (sigil twitch schedule)
+9
(define-library (twitch schedule)
10
(import (sigil core)
11
(sigil dict)
12
(sigil string)
13
(sigil struct)
14
(sigil json)
15
(sigil http client)
16
(sigil twitch))
+16
(twitch))
17
18
(export ;; Records
19
twitch-schedule-segment
test/analytics-test.sglmodified
@@ -1,4 +1,4 @@
1
;;; Tests for (sigil twitch analytics) — analytics module
+1
;;; Tests for (twitch analytics) — analytics module
2
;;;
3
;;; Tests record construction and JSON parsing for clips and videos.
4
@@ -8,8 +8,8 @@
8
(sigil struct)
9
(sigil json)
10
(sigil test)
11
(sigil twitch)
12
(sigil twitch analytics))
+11
(twitch)
+12
(twitch analytics))
13
14
;; ---------------------------------------------------------------
15
;; Test fixtures
test/chat-test.sglmodified
@@ -1,4 +1,4 @@
1
;;; Tests for (sigil twitch chat) — chat module
+1
;;; Tests for (twitch chat) — chat module
2
;;;
3
;;; Tests response parsing, body building, and data transformation
4
;;; for chat messages, chatters, settings, and announcements.
@@ -9,8 +9,8 @@
9
(sigil struct)
10
(sigil json)
11
(sigil test)
12
(sigil twitch)
13
(sigil twitch chat))
+12
(twitch)
+13
(twitch chat))
14
15
;; ---------------------------------------------------------------
16
;; Test fixtures — JSON response samples
test/eventsub-test.sglmodified
@@ -1,4 +1,4 @@
1
;;; Tests for (sigil twitch eventsub) — EventSub module
+1
;;; Tests for (twitch eventsub) — EventSub module
2
;;;
3
;;; Tests message parsing, session extraction, and notification handling
4
;;; using fixture data (no real WebSocket connection).
@@ -9,8 +9,8 @@
9
(sigil struct)
10
(sigil json)
11
(sigil test)
12
(sigil twitch)
13
(sigil twitch eventsub))
+12
(twitch)
+13
(twitch eventsub))
14
15
;; ---------------------------------------------------------------
16
;; Test fixtures — WebSocket message samples
test/schedule-test.sglmodified
@@ -1,4 +1,4 @@
1
;;; Tests for (sigil twitch schedule) — schedule module
+1
;;; Tests for (twitch schedule) — schedule module
2
;;;
3
;;; Tests record construction and JSON parsing for schedule segments.
4
@@ -8,8 +8,8 @@
8
(sigil struct)
9
(sigil json)
10
(sigil test)
11
(sigil twitch)
12
(sigil twitch schedule))
+11
(twitch)
+12
(twitch schedule))
13
14
;; ---------------------------------------------------------------
15
;; Test fixtures
test/twitch-test.sglmodified
@@ -1,4 +1,4 @@
1
;;; Tests for (sigil twitch) — core module
+1
;;; Tests for (twitch) — core module
2
;;;
3
;;; Tests record construction, JSON response parsing, URL building,
4
;;; and query string encoding using fixture data (no real API calls).
@@ -9,7 +9,7 @@
9
(sigil struct)
10
(sigil json)
11
(sigil test)
12
(sigil twitch))
+12
(twitch))
13
14
;; ---------------------------------------------------------------
15
;; Test fixtures — JSON response samples