@@ -143,8 +143,10 @@ public, err = client.PublicStats(ctx, "secret", spoo.PublicStatsQuery{
143143Without explicit dates the API returns only the last 7 days; request up to
144144` spoo.MaxRangeDays ` (90) explicitly for more.
145145
146- Exports stream and carry the server-suggested filename. The csv format
147- arrives as a ZIP archive with one CSV per dimension:
146+ Exports stream and carry the server-suggested filename, reduced to a bare
147+ name so it is safe to pass to ` os.Create ` even against a self-hosted or
148+ untrusted deployment. The csv format arrives as a ZIP archive with one CSV
149+ per dimension:
148150
149151``` go
150152file , err := client.Export (ctx, spoo.StatsQuery {}, " xlsx" )
@@ -180,6 +182,7 @@ Common branches have predicates and sentinels:
180182| --- | --- |
181183| ` spoo.IsNotFound(err) ` | 404: no such resource, or not yours |
182184| ` spoo.IsRateLimited(err) ` | 429: budget exhausted even after retries |
185+ | ` errors.Is(err, spoo.ErrMissingLongURL) ` | ` Shorten ` was called with an empty ` LongURL ` ; nothing was sent |
183186| ` errors.Is(err, spoo.ErrSessionExpired) ` | the refresh token no longer works; log in again |
184187| ` errors.Is(err, spoo.ErrLinkPasswordProtected) ` | the link's stats need the link password |
185188| ` spoo.IsBlocked(err) ` | 451: the link was taken down by the safety pipeline |
@@ -237,6 +240,16 @@ client := spoo.NewClient(
237240process, implement the two-method ` TokenSource ` interface over your keyring,
238241file, or database, and rotated tokens persist through it.
239242
243+ ## Scope
244+
245+ The SDK covers the v1 data plane end to end: shortening, link management,
246+ claiming, bulk operations, stats, exports, public stats and previews, the
247+ emoji alias policy, identity (` Me ` ), and the Sign in with Spoo device flow.
248+ Deliberately out of scope: API key management, health checks, the contact
249+ endpoint, profile management, and all legacy v0 routes. Anything the API
250+ grows before the SDK does is reachable through the raw request methods
251+ below.
252+
240253## API coverage
241254
242255| Method | Endpoint |
@@ -255,6 +268,22 @@ file, or database, and rotated tokens persist through it.
255268| ` Me ` | ` GET /auth/me ` |
256269| ` ExchangeDeviceCode ` , ` RefreshTokens ` , ` DeviceAuthURL ` | ` POST /auth/device/token ` , ` POST /auth/device/refresh ` |
257270
271+ ## Raw requests
272+
273+ For endpoints the SDK has no typed method for yet, ` Get ` , ` Post ` , ` Put ` ,
274+ ` Patch ` , and ` Delete ` on the client take an API path directly and reuse
275+ the configured auth, token refresh, retries, client tag, and error
276+ mapping:
277+
278+ ``` go
279+ var out map [string ]any
280+ err := client.Get (ctx, " /api/v1/new-endpoint" , url.Values {" page" : {" 2" }}, &out)
281+ ```
282+
283+ These are supported, not a workaround. Needing one means the SDK surface
284+ has a gap, and that gap is worth
285+ [ an issue] ( https://github.com/spoo-me/spoo-go/issues ) .
286+
258287## License
259288
260289AGPL-3.0. See [ LICENSE] ( LICENSE ) .
0 commit comments