https://github.com/stardustdl/loment
Loment is a light comment service.
https://github.com/stardustdl/loment
acblog comment-system comments dotnet golang
Last synced: 21 days ago
JSON representation
Loment is a light comment service.
- Host: GitHub
- URL: https://github.com/stardustdl/loment
- Owner: StardustDL
- License: apache-2.0
- Created: 2020-07-14T11:57:39.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T06:56:39.000Z (about 2 years ago)
- Last Synced: 2025-03-07T15:51:56.838Z (about 2 months ago)
- Topics: acblog, comment-system, comments, dotnet, golang
- Language: Go
- Homepage:
- Size: 74.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# loment
   [](https://www.nuget.org/packages/Loment/)
Loment is a Light cOmMENT service.
## API
- **Post** `/` with *Comment* body: Create comment, return id
- **Post** `/query` with *CommentQuery* body: Query comments, return list of comments
- - **Post** `/count` with *CommentQuery* body: Query and count comments, return the number of comments
- **Get** `/id`: Get comment by id, return comment
- **Delete** `/id`: Delete comment by id, return if done
- **Put** `/id` with *Comment* body: Update comment by id, return if done## Models
```go
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
}
```## SDK
For C#.
```sh
dotnet add package Loment
```API:
```csharp
public interface ILomentService
{
Task Create(Comment comment, CancellationToken cancellationToken = default);Task> Query(CommentQuery query, CancellationToken cancellationToken = default);
Task Count(CommentQuery query, CancellationToken cancellationToken = default);
Task Get(string id, CancellationToken cancellationToken = default);
Task Delete(string id, CancellationToken cancellationToken = default);
Task Update(Comment comment, CancellationToken cancellationToken = default);
}
```## Status
