Added: downloading and returning wikipedia articles

This commit is contained in:
Oliwier Adamczyk
2025-10-04 23:14:41 +02:00
parent f542f01b49
commit 6df63dc4c1
26 changed files with 636 additions and 100 deletions

16
api/article/request.go Normal file
View File

@@ -0,0 +1,16 @@
package article
import "scrap/api/httpio"
type ArticleQueryRequest struct {
Title string `json:"title"`
}
func (a ArticleQueryRequest) Validate() *httpio.HTTPError {
titleLength := len(a.Title)
if titleLength < 1 || titleLength > 255 {
return &ErrHttpArticleTitleInvalidLength
}
return nil
}