Feat/manual indexer (#9)

* new: feat: add manual torrents support

* chg: docs: update documentation

* chg: chore: fix lint ci

---------

Co-authored-by: Felipe Marinho <felipe.marinho@ifood.com.br>
This commit is contained in:
2024-06-18 12:38:08 -03:00
committed by GitHub
parent 2812c203c9
commit ced533cd40
4 changed files with 170 additions and 15 deletions

View File

@@ -56,20 +56,35 @@ func HandlerIndex(w http.ResponseWriter, r *http.Request) {
err := json.NewEncoder(w).Encode(map[string]interface{}{
"time": currentTime,
"endpoints": map[string]interface{}{
"/indexers/comando_torrents": map[string]interface{}{
"method": "GET",
"description": "Indexer for comando torrents",
"query_params": map[string]string{
"q": "search query",
"filter_results": "if results with similarity equals to zero should be filtered (true/false)",
"/indexers/comando_torrents": []map[string]interface{}{
{
"method": "GET",
"description": "Indexer for comando torrents",
"query_params": map[string]string{
"q": "search query",
"filter_results": "if results with similarity equals to zero should be filtered (true/false)",
},
},
},
"/indexers/bludv": map[string]interface{}{
"method": "GET",
"description": "Indexer for bludv",
"query_params": map[string]string{
"q": "search query",
"filter_results": "if results with similarity equals to zero should be filtered (true/false)",
"/indexers/bludv": []map[string]interface{}{
{
"method": "GET",
"description": "Indexer for bludv",
"query_params": map[string]string{
"q": "search query",
"filter_results": "if results with similarity equals to zero should be filtered (true/false)",
}},
},
"/indexers/manual": []map[string]interface{}{
{
"method": "POST",
"description": "Add a manual torrent entry to the indexer for 12 hours",
"body": map[string]interface{}{
"magnetLink": "magnet link",
}},
{
"method": "GET",
"description": "Get all manual torrents",
},
},
},