Future<Response>
getChaptersResponse(- String mangaId,
- {String? ids,
- String? title,
- String? groups,
- String? uploader,
- String? volume,
- String? chapter,
- String? translatedLanguage,
- String? createdAtSince,
- String? updatedAtSince,
- String? publishedAtSince,
- String? includes,
- int? limit,
- int? offset}
)
Implementation
Future<http.Response> getChaptersResponse(String mangaId,
{String? ids,
String? title,
String? groups,
String? uploader,
String? volume,
String? chapter,
String? translatedLanguage,
String? createdAtSince,
String? updatedAtSince,
String? publishedAtSince,
String? includes,
int? limit,
int? offset}) async {
var unencodedPath = '/chapter';
var MangaId = mangaId;
var Limit = limit != null ? '&limit=$limit' : '&limit=10';
var Offset = offset != null ? '&offset=$offset' : '&offset=0';
var Ids = ids != null ? '&ids[]=$ids' : '';
var Title = title != null ? '&title=$title' : '';
var Groups = groups != null ? '&groups[]=$groups' : '';
var Uploader = uploader != null ? '&uploader=$uploader' : '';
var Volume = volume != null ? '&volume=$volume' : '';
var Chapter = chapter != null ? '&chapter=$chapter' : '';
var TranslatedLanguage = translatedLanguage != null
? '&translatedLanguage[]=$translatedLanguage'
: '';
var CreatedAtSince =
createdAtSince != null ? '&createdAtSince=$createdAtSince' : '';
var UpdatedAtSince =
updatedAtSince != null ? '&updatedAtSince=$updatedAtSince' : '';
var PublishedAtSince =
publishedAtSince != null ? '&publishedAtSince=$publishedAtSince' : '';
var Includes = includes != null ? '&includes[]=$includes' : '';
final url =
'https://$authority$unencodedPath?&manga=$MangaId$Limit$Offset$Ids$Title$Groups$Uploader$Volume$Chapter$TranslatedLanguage$CreatedAtSince$UpdatedAtSince$PublishedAtSince$Includes';
var response = await http.get(Uri.parse(url),
headers: {HttpHeaders.contentTypeHeader: 'application/json'});
print(url);
return response;
}