1
0
mirror of https://github.com/krawieck/lemmur/ synced 2024-12-17 02:48:47 +01:00
lemmur-app-android/lib/client/v1/post_endpoint.dart

98 lines
2.4 KiB
Dart
Raw Normal View History

import 'package:flutter/foundation.dart';
2020-08-09 00:27:13 +02:00
import '../models/post.dart';
import 'main.dart';
extension PostEndpoint on V1 {
/// POST /post
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#post
2020-08-09 00:27:13 +02:00
Future<PostView> createPost({
@required String name,
String url,
String body,
@required bool nsfw,
@required int communityId,
@required String auth,
}) {
throw UnimplementedError();
}
/// GET /post
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#get-post
String getPost({
@required int id,
String auth,
}) {
throw UnimplementedError();
}
/// GET /post/list
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#get-posts
2020-08-09 00:27:13 +02:00
Future<PostView> getPosts({
@required String type,
@required String sort,
int page,
int limit,
int communityId,
String communityName,
}) {
throw UnimplementedError();
}
/// POST /post/like
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#create-post-like
2020-08-09 00:27:13 +02:00
Future<PostView> createPostLike({
@required int postId,
2020-08-08 23:24:34 +02:00
@required Vote score,
@required String auth,
}) {
throw UnimplementedError();
}
/// PUT /post
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#edit-post
2020-08-09 00:27:13 +02:00
Future<PostView> editPost({
@required int editId,
@required String name,
String url,
String body,
@required bool nsfw,
@required String auth,
}) {
throw UnimplementedError();
}
/// POST /post/delete
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#delete-post
/// delete a post in a user deleting their own kind of way
2020-08-09 00:27:13 +02:00
Future<PostView> deletePost({
@required int editId,
@required bool deleted,
@required String auth,
}) {
throw UnimplementedError();
}
/// POST /post/remove
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#remove-post
/// remove post in an admin kind of way
2020-08-09 00:27:13 +02:00
Future<PostView> removePost({
@required int editId,
@required bool removed,
String reason,
@required String auth,
}) {
throw UnimplementedError();
}
/// POST /post/save
/// https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#save-post
2020-08-09 00:27:13 +02:00
Future<PostView> savePost({
@required int postId,
@required bool save,
@required String auth,
}) {
throw UnimplementedError();
}
}