Loment is a light comment service.
Loment is a Light cOmMENT service.
/
with Comment body: Create comment, return id/query
with CommentQuery body: Query comments, return list of comments/count
with CommentQuery body: Query and count comments, return the number of comments/id
: Get comment by id, return comment/id
: Delete comment by id, return if done/id
with Comment body: Update comment by id, return if done
type Comment struct {
Id string
CreationTime time.Time
ModificationTime time.Time
Content string
Uri string
Author string
Email string
Link string
Extra string
}
type CommentQuery struct {
Id string
CreationTime time.Time
ModificationTime time.Time
Content string
Uri string
Author string
Email string
Link string
Offset int
Limit int
}
For C#.
dotnet add package Loment
API:
public interface ILomentService
{
Task<string?> Create(Comment comment, CancellationToken cancellationToken = default);
Task<IList<Comment>> Query(CommentQuery query, CancellationToken cancellationToken = default);
Task<long> Count(CommentQuery query, CancellationToken cancellationToken = default);
Task<Comment?> Get(string id, CancellationToken cancellationToken = default);
Task<bool> Delete(string id, CancellationToken cancellationToken = default);
Task<bool> Update(Comment comment, CancellationToken cancellationToken = default);
}