镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
LemmurOrgPublic archive

About

Dart lemmy client

Topics

Resources

Stars

17 stars

Watchers

2 watching

Forks

Repository files navigation

⚠️ THIS PROJECT IS NOT MAINTAINED ANYMORE ⚠️

This project has been officially dropped due to lack of interest and political differences. If anyone is interested in continuing developement, feel free to fork it. For any questions you can message krawieck (who was responsible for the flutter app) or shilangyu (who was responsible for lemmy_api_client).


Lemmy Dart API client

A Dart client for the Lemmy API

Features

  • Future-based
  • Works both for Web and Native environments
  • Strictly typed responses
  • Room websocket joins
  • Pictrs endpoints
  • Models have a .instanceHost property that indicate the instance that returned this model

Example

import 'package:lemmy_api_client/v3.dart';

Future<void> main() async {
  // instantiate your lemmy instance with the host uri
  const lemmy = LemmyApiV3('lemmy.ml');

  // call methods that are named after op codes from the lemmy docs
  final response =
      await lemmy.run(const Login(usernameOrEmail: 'asd', password: 'ads'));

  final messages = await lemmy
      .run(GetPrivateMessages(unreadOnly: true, auth: response.jwt!.raw));

  print(messages);
}

check out Lemmur, a mobile Lemmy client in Flutter


Original Lemmy logo made by Andy Cuccaro (@andycuccaro) under the CC-BY-SA 4.0 license. Remixed by Marcin Wojnarowski (@shilangyu) and re-released under the CC-BY-SA 4.0 license.

About

Dart lemmy client

Topics

Resources

Stars

17 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages