this is the centralised backend for all of rotur.
Environment Variables (loaded from root ../.env with optional local overrides):
USERS_FILE_PATH - where in the file system the users.json is
LOCAL_POSTS_PATH - where to store claw posts, eg: posts.json
FOLLOWERS_FILE_PATH - where to store the follower data for claw, eg: ./clawusers.json
ITEMS_FILE_PATH - where to store item data for rotur, eg: ./items.json
KEYS_FILE_PATH - where to store key data for rotur, eg: ./keys.json
EVENTS_HISTORY_PATH - where to put account events, eg: ./events_history.json
DAILY_CLAIMS_FILE_PATH - where to store daily claim data, eg: ./rotur_daily.json
SYSTEMS_FILE_PATH - where in the file system info about rotur systems is, eg: ./systems.json
WEBSOCKET_SERVER_URL - claw events go here
EVENT_SERVER_URL - websocket events go here
SUBSCRIPTION_CHECK_INTERVAL - 3600
BANNED_WORDS_URL - a list of banned words for claw posts and other user data, eg: "http://www.bannedwordlist.com/lists/swearWords.txt"
DISCORD_WEBHOOK_URL - where to log claw posts to
KEY_OWNERSHIP_CACHE_TTL - 600
ADMIN_TOKEN - a token used for authenticating locally between other rotur apis
All endpoints are served on port 5602 (example: http://localhost:5602
). Unless otherwise noted, query parameters are passed via ?param=value
. JSON bodies are used for POST/PATCH where described.
GET /post
Create a post (query:auth
,content
, optionalattachment
,os
,profile_only=1
)GET /reply
Reply to a postGET /delete
Delete a postGET /rate
Rate (like?) a postGET /repost
Repost a postGET /pin_post
Pin a post to profileGET /unpin_post
Unpin a postGET /search_posts
Search posts (query-based)GET /top_posts
Get top liked posts within time/limit
GET /feed
Public feed (params:limit
,offset
)GET /following_feed
Feed of followed users
GET /follow
Follow a userGET /unfollow
Unfollow a userGET /followers
List followers of a userGET /following
List following for a userGET /notifications
Get notifications for authenticated user
GET /profile
Get profile by usernameGET /get_user
Get user by auth key or username (legacy/new alias:/get_user_new
)POST /create_user
Register a new user (JSON body)PATCH /users
Update a user key/value (JSON body:auth
,key
,value
)DELETE /users/:username
Delete (admin?) user by usernameDELETE /users
Delete user using auth key (JSON?)POST /me/update
Update current user (alias of update)DELETE /me/delete
Delete current user (key-based)GET /me
Get current user (auth)POST /me/refresh_token
Refresh an auth tokenPOST /me/transfer
Transfer creditsPOST /me/gamble
Gamble credits
GET /search_users
Search users
GET /systems
List systemsGET /reload_systems
Reload system definitions (admin)
GET /generate_validator
Generate validator tokenGET /validate
Validate a token
GET /status
General status (startup uptime etc.)GET /status/update
Set status (auth)GET /status/clear
Clear statusGET /status/get
Get status for user
GET /stats/economy
Economy statsGET /stats/users
User statsGET /stats/rich
Rich listGET /stats/aura
Aura statsGET /stats/systems
System statsGET /stats/followers
Followers statsGET /supporters
Supporters listGET /claim_daily
Claim daily reward
GET /items/transfer/:name
Transfer ownershipGET /items/buy/:name
Buy itemGET /items/stop_selling/:name
Stop sellingGET /items/set_price/:name
Set price (seller/admin?)GET /items/create
Create itemGET /items/get/:name
Get item infoGET /items/delete/:name
Delete itemGET /items/list/:username
List a user's itemsGET /items/update/:name
Update item metaGET /items/sell/:name
Put item for saleGET /items/selling
List currently selling itemsGET /items/admin_add/:id
Admin add user to item
GET /keys/create
Create keyGET /keys/mine
List my keysGET /keys/check/:username
Check if user owns keyGET /keys/revoke/:id
Revoke keyGET /keys/delete/:id
Delete keyGET /keys/update/:id
Update key metadataGET /keys/name/:id
Set key nameGET /keys/get/:id
Get key infoGET /keys/admin_add/:id
Admin add user to keyGET /keys/admin_remove/:id
Admin remove user from keyGET /keys/buy/:id
Buy keyGET /keys/cancel/:id
Cancel key purchaseGET /keys/debug_subscriptions
Debug subscription status
POST /friends/request/:username
Send friend requestPOST /friends/accept/:username
Accept requestPOST /friends/reject/:username
Reject requestPOST /friends/remove/:username
Remove friendGET /friends
List friends & pending
POST /marriage/propose/:username
Propose marriagePOST /marriage/accept
Accept marriage proposalPOST /marriage/reject
Reject marriage proposalPOST /marriage/cancel
Cancel marriage proposalPOST /marriage/divorce
Divorce spouseGET /marriage/status
Get marriage status
GET /link/code
Request a link codePOST /link/code
Link code to accountGET /link/status
Get link statusGET /link/user
Get linked user info
POST /devfund/escrow_transfer
Start escrow transferPOST /devfund/escrow_release
Release escrow
GET /admin/get_user_by
Get user by fieldPOST /admin/update_user
Admin update user (typed operations)POST /admin/delete_user
Admin delete user
POST /accept_tos
Accept terms of service
NOTE: This list is generated from main.go
; keep it in sync when new routes are added.