aboutsummaryrefslogtreecommitdiff
path: root/Backend/Api/Api/Interfaces/IPostService.cs
blob: fc2ae03eb8d95684550db55885d8d239d2f0a7d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using Api.Models;

namespace Api.Interfaces
{
    public interface IPostService
    {
        Task<PostSend> addPost(PostReceive post);
        Task<List<PostSend>> getAllPosts();
        Task<PostSend> getPostById(string id,string userid);
        Task<PostSend> postToPostSend(Post post);
        Task<Boolean> AddOrReplaceRating(RatingReceive rating, string userid);
        Task<Boolean> RemoveRating(string postid, string userid);
        Task<Comment> AddComment(CommentReceive cmnt, string userid, string postid);
        Task<List<CommentSend>> ListComments(string postid);
        Task<List<CommentSend>> CascadeComments(string parentid, Post p);
        Task<Boolean> DeleteComments(string postid, string cmntid,string userid);
        Task CascadeDeleteComments(string cmntid, Post p);
        Task<PostSendPage> SearchPosts(string locid, int page = 0, int sorttype = 1, int filterdate = 1);
        int DateEnumToDays(int filterdate);
        Task<List<PostSend>> GetUsersPosts(string id);
    }
}