Added search

This commit is contained in:
Juan Gilsanz Polo
2024-02-24 01:08:53 +01:00
parent a11355227c
commit a2d621ba9b
20 changed files with 834 additions and 103 deletions

View File

@@ -76,9 +76,16 @@ class ApiClient {
}
}
Future<ApiResponse<Tags>> fetchTags() async {
Future<ApiResponse<Tags>> fetchTags({String? q, int? limit, int? offset}) async {
try {
final response = await dioInstance.get("/tags/");
final response = await dioInstance.get(
"/tags/",
queryParameters: {
"q": q,
"limit": limit,
"offset": offset,
},
);
return ApiResponse(
successful: true,
content: Tags.fromJson(response.data),