social
Public social engagement count endpoints backed by Disqus, sharedcount.com, and DynamoDB TTL caches.
| Field | Value |
|---|---|
| Serverless service | drive-api-social |
| Runtime | nodejs22.x, arm64 |
| Deployed HTTP operations | 4 (/social/sharecount is API Gateway ANY) |
| Auth | Public |
| OpenAPI | /openapi/social.yaml · interactive |
Deployed routes
| Function | Method | Path | Input | Output |
|---|---|---|---|---|
commentCount | GET | /social/commentcount | Query threadIdentifiers; optional ttl | {status, threads} keyed by thread identifier |
sharedCount | GET | /social/sharecount | Query url; optional include, ttl, apiVersion | {status, hash, url, networks, shareCount, expiresAt} |
sharedCount | POST | /social/sharecount | Body url; optional include, ttl, apiVersion | Same as GET |
sharedCountBulk | GET | /social/sharecount-bulk | Query paths; optional host, include, ttl | {status, host, include, paths} |
Handler-only behaviour
commentCount and sharedCountBulk contain POST parsing branches in code, but only GET routes are mounted in serverless.yml. The OpenAPI spec intentionally documents only the deployed HTTP methods for those paths.
Behaviour notes
commentCountcalls Disqusthreads/list.json; cache keys areident:<threadIdentifier>, andstatusin the response is304when every thread came from cache.sharedCountcurrently always calls sharedcount.com v1 even though the source contains a v2 URL constant.sharedCountrejects URLs whose host does not match(drivemustang|drive).com.au.sharedCountBulktakeshostplus comma-separatedpaths; it does not accept aurls[]array. Per-path failures returnshareCount: nullfor that path while the overall response remains200.- Error paths emit CloudWatch metrics for user input, unsupported input, external origin, and DynamoDB failures.
Source map
- Routes and caches:
services/social/serverless.yml - Handlers:
services/social/functions/commentCount.ts,services/social/functions/sharedCount.ts,services/social/functions/sharedCountBulk.ts - Types:
services/social/types/