Generates a new instance of LemmyHttp.
the base url, without the vX version: https://lemmy.ml -> goes to https://lemmy.ml/api/vX
Optional options: { Optional fetchOptional init: RequestInitOptional init: RequestInitOptional headers?: { Private #apiPrivate #fetchOptional init: RequestInitOptional init: RequestInitPrivate #headersPrivate #pictrsPrivate #buildPrivate #wrapperAdd an admin to your site.
HTTP.POST /admin/add
Optional options: RequestOptionsAdd a moderator to your community.
HTTP.POST /community/mod
Optional options: RequestOptionsApprove a registration application
HTTP.PUT /admin/registration_application/approve
Optional options: RequestOptionsBan a user from a community.
HTTP.POST /community/ban_user
Optional options: RequestOptionsBan a person from your site.
HTTP.POST /user/ban
Optional options: RequestOptionsBlock a community.
HTTP.POST /community/block
Optional options: RequestOptionsBlock an instance.
HTTP.Post /site/block
Optional options: RequestOptionsBlock a person.
HTTP.POST /user/block
Optional options: RequestOptionsChange your user password.
HTTP.PUT /user/change_password
Optional options: RequestOptionsCreate a comment.
HTTP.POST /comment
Optional options: RequestOptionsReport a comment.
HTTP.POST /comment/report
Optional options: RequestOptionsCreate a new community.
HTTP.POST /community
Optional options: RequestOptionsCreate a new custom emoji
HTTP.POST /custom_emoji
Optional options: RequestOptionsCreate a post.
HTTP.POST /post
Optional options: RequestOptionsReport a post.
HTTP.POST /post/report
Optional options: RequestOptionsCreate a private message.
HTTP.POST /private_message
Optional options: RequestOptionsCreate a report for a private message.
HTTP.POST /private_message/report
Optional options: RequestOptionsCreate your site.
HTTP.POST /site
Optional options: RequestOptionsDelete your account.
HTTP.POST /user/delete_account
Optional options: RequestOptionsDelete a comment.
HTTP.POST /comment/delete
Optional options: RequestOptionsDelete a community.
HTTP.POST /community/delete
Optional options: RequestOptionsDelete a custom emoji
HTTP.Post /custom_emoji/delete
Optional options: RequestOptionsDelete a pictrs image
Optional options: RequestOptionsDelete a post.
HTTP.POST /post/delete
Optional options: RequestOptionsDelete a private message.
HTTP.POST /private_message/delete
Optional options: RequestOptionsDistinguishes a comment (speak as moderator)
HTTP.POST /comment/distinguish
Optional options: RequestOptionsMark donation dialog as shown, so it isn't displayed anymore.
HTTP.POST /user/donation_dialog_shown
Optional options: RequestOptionsEdit a comment.
HTTP.PUT /comment
Optional options: RequestOptionsEdit a community.
HTTP.PUT /community
Optional options: RequestOptionsEdit an existing custom emoji
HTTP.PUT /custom_emoji
Optional options: RequestOptionsEdit a post.
HTTP.PUT /post
Optional options: RequestOptionsEdit a private message.
HTTP.PUT /private_message
Optional options: RequestOptionsEdit your site.
HTTP.PUT /site
Optional options: RequestOptionsA moderator can feature a community post ( IE stick it to the top of a community ).
HTTP.POST /post/feature
Optional options: RequestOptionsFollow / subscribe to a community.
HTTP.POST /community/follow
Optional options: RequestOptionsGenerate a TOTP / two-factor secret.
Afterwards you need to call /user/totp/update with a valid token to enable it.
HTTP.POST /user/totp/generate
Optional options: RequestOptionsGet a list of banned users
HTTP.GET /user/banned
Optional options: RequestOptionsFetch a Captcha.
HTTP.GET /user/get_captcha
Optional options: RequestOptionsGet / fetch comment.
HTTP.GET /comment
Optional options: RequestOptionsGet / fetch comments.
HTTP.GET /comment/list
Optional options: RequestOptionsGet / fetch a community.
HTTP.GET /community
Optional options: RequestOptionsFetch federated instances.
HTTP.Get /federated_instances
Optional options: RequestOptionsGet the modlog.
HTTP.GET /modlog
Optional options: RequestOptionsGet the details for a person.
HTTP.GET /user
Optional options: RequestOptionsGet mentions for your user.
HTTP.GET /user/mention
Optional options: RequestOptionsGet / fetch a post.
HTTP.GET /post
Optional options: RequestOptionsGet / fetch posts, with various filters.
HTTP.GET /post/list
Optional options: RequestOptionsGet / fetch private messages.
HTTP.GET /private_message/list
Optional options: RequestOptionsGet the application a user submitted when they first registered their account
HTTP.GET /admin/registration_application
Optional options: RequestOptionsGet comment replies.
HTTP.GET /user/replies
Optional options: RequestOptionsGet counts for your reports
HTTP.GET /user/report_count
Optional options: RequestOptionsGets the site, and your user data.
HTTP.GET /site
Optional options: RequestOptionsFetch metadata for any given site.
HTTP.GET /post/site_metadata
Optional options: RequestOptionsGet your unread counts
HTTP.GET /user/unread_count
Optional options: RequestOptionsGet the unread registration applications count.
HTTP.GET /admin/registration_application/count
Optional options: RequestOptionsHide a community from public / "All" view. Admins only.
HTTP.PUT /community/hide
Optional options: RequestOptionsHide a post from list views.
HTTP.POST /post/hide
Optional options: RequestOptionsImport a backup of your user settings.
HTTP.POST /user/import_settings
Optional options: RequestOptionsLeave the Site admins.
HTTP.POST /user/leave_admin
Optional options: RequestOptionsLike / vote on a comment.
HTTP.POST /comment/like
Optional options: RequestOptionsLike / vote on a post.
HTTP.POST /post/like
Optional options: RequestOptionsList all the media known to your instance.
HTTP.GET /admin/list_all_media
Optional options: RequestOptionsList a comment's likes. Admin-only.
HTTP.GET /comment/like/list
Optional options: RequestOptionsList comment reports.
HTTP.GET /comment/report/list
Optional options: RequestOptionsList communities, with various filters.
HTTP.GET /community/list
Optional options: RequestOptionsList login tokens for your user
HTTP.GET /user/list_logins
Optional options: RequestOptionsList all the media for your user
HTTP.GET /account/list_media
Optional options: RequestOptionsList a post's likes. Admin-only.
HTTP.GET /post/like/list
Optional options: RequestOptionsList post reports.
HTTP.GET /post/report/list
Optional options: RequestOptionsList private message reports.
HTTP.GET /private_message/report/list
Optional options: RequestOptionsList the registration applications.
HTTP.GET /admin/registration_application/list
Optional options: RequestOptionsA moderator can lock a post ( IE disable new comments ).
HTTP.POST /post/lock
Optional options: RequestOptionsLog into lemmy.
HTTP.POST /user/login
Optional options: RequestOptionsInvalidate the currently used auth token.
HTTP.POST /user/logout
Optional options: RequestOptionsMark all replies as read.
HTTP.POST /user/mark_all_as_read
Optional options: RequestOptionsMark a comment as read.
HTTP.POST /comment/mark_as_read
Optional options: RequestOptionsMark a person mention as read.
HTTP.POST /user/mention/mark_as_read
Optional options: RequestOptionsMark a post as read.
HTTP.POST /post/mark_as_read
Optional options: RequestOptionsMark a private message as read.
HTTP.POST /private_message/mark_as_read
Optional options: RequestOptionsChange your password from an email / token based reset.
HTTP.POST /user/password_change
Optional options: RequestOptionsReset your password.
HTTP.POST /user/password_reset
Optional options: RequestOptionsPurge / Delete a comment from the database.
HTTP.POST /admin/purge/comment
Optional options: RequestOptionsPurge / Delete a community from the database.
HTTP.POST /admin/purge/community
Optional options: RequestOptionsPurge / Delete a person from the database.
HTTP.POST /admin/purge/person
Optional options: RequestOptionsPurge / Delete a post from the database.
HTTP.POST /admin/purge/post
Optional options: RequestOptionsRegister a new user.
HTTP.POST /user/register
Optional options: RequestOptionsA moderator remove for a comment.
HTTP.POST /comment/remove
Optional options: RequestOptionsA moderator remove for a community.
HTTP.POST /community/remove
Optional options: RequestOptionsA moderator remove for a post.
HTTP.POST /post/remove
Optional options: RequestOptionsResolve a comment report. Only a mod can do this.
HTTP.PUT /comment/report/resolve
Optional options: RequestOptionsFetch a non-local / federated object.
HTTP.GET /resolve_object
Optional options: RequestOptionsResolve a post report. Only a mod can do this.
HTTP.PUT /post/report/resolve
Optional options: RequestOptionsResolve a report for a private message.
HTTP.PUT /private_message/report/resolve
Optional options: RequestOptionsSave a comment.
HTTP.PUT /comment/save
Optional options: RequestOptionsSave a post.
HTTP.PUT /post/save
Optional options: RequestOptionsSave your user settings.
HTTP.PUT /user/save_user_settings
Optional options: RequestOptionsSearch lemmy.
HTTP.GET /search
Optional options: RequestOptionsTransfer your community to an existing moderator.
HTTP.POST /community/transfer
Optional options: RequestOptionsEnable / Disable TOTP / two-factor authentication.
To enable, you need to first call /user/totp/generate and then pass a valid token to this.
Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
HTTP.POST /user/totp/update
Optional options: RequestOptionsUpload an image to the server.
Optional options: RequestOptionsReturns an error message if your auth token is invalid
HTTP.GET /user/validate_auth
Optional options: RequestOptionsVerify your email
HTTP.POST /user/verify_email
Optional options: RequestOptions
Helps build lemmy HTTP requests.