SurfboardAPI
A Swift implementation of a basic API for Tildes.net
Install / Use
/learn @tarrouye/SurfboardAPIREADME
SurfboardAPI
A Swift implementation of a basic API for Tildes.net
Warnings
This is an incomplete and imperfect implementation. As long as this message is still here, no support is guaranteed, and breaking changes may happen at any point. Documentation is incomplete. Some parts may be broken or incomplete because this was ripped from a larger project and has not been properly modularized yet.
Implementation
Data Structures
CommentBasicCommentFeedItemPostMarkdownStringFeedOrderFeedOrderPeriodCommentOrderSBNotificationCreatePostResponseUserPageTypeUserPageResponse
Interface
Login/Logout
logIntoAccountasync- parameters:
username: String,password: String - returns:
error: String?- if
error==2fa, you should followup with a call totwoFactorLogin - if
errorisnil, the login was successful - if
erroris notniland not2fa, then some error occurrred.
- if
- parameters:
twoFactorLoginasync- parameters:
code: String - returns:
error: String?- if
errorisnil, the login was successful - if
erroris notnil, some error occurred.
- if
- parameters:
logoutasync- returns:
error: String?
- returns:
Notifications
loadNotificationsasync- parameters:
unread: Bool->falsemeans load read notifications,truemeans load unread notifications - returns:
notifications: [SBNotification]- WARNING: Currently this only fetches the first page
- parameters:
Feeds
loadFeedasync- parameters:
group: String?,order: FeedOrder,period: FeedOrderPeriod?,after: String?,search: String?,unfiltered: Bool - returns:
(items: [FeedItem], isFiltered: Bool?, error: String?)
- parameters:
Posts
-
loadPostasync- parameters:
id: String,group: String,commentOrder: CommentOrder - returns:
(post: Post, comments: [Comment])?
- parameters:
-
createPostasync- parameters:
group: String,title: String,link: String,markdown: String,tags: [String] - returns:
CreatePostResponse
- parameters:
-
editPostasync- parameters:
id: String,body: String - returns:
(statusCode: Int, newBody: String) - WARNING: Currently this can only edit the post BODY
- parameters:
-
replyToPostasync -
deletePostasync -
putVoteOnPostasync -
deleteVoteOnPostasync -
putBookmarkOnPostasync -
deleteBookmarkOnPostasync -
putIgnoreOnPostasync -
deleteIgnoreOnPostasync
Comments
editCommentasyncdeleteCommentasyncreplyToCommentasyncputVoteOnCommentasyncdeleteVoteOnCommentasyncputBookmarkOnCommentasyncdeleteBookmarkOnCommentasyncmarkCommentReadasync
Groups
loadGroupsasyncsubscribeToGroupasyncunsubscribeFromGroupasync
User Pages
loadUserPageasync- paginated
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
