redgifs 0.0.3
redgifs: ^0.0.3 copied to clipboard
This library propose a simple [http] based wrapper for the [https://redgifs.com] API. The wrapper implements all endpoints referenced in the public redgifs API
example/redgifs_example.dart
import 'dart:io';
import 'package:redgifs/redgifs.dart';
void main() async {
final RedgifsClient client = RedgifsClient();
const String id = 'example';
final gif = await client.getGif(id);
var url = gif.urls[Gif.qualityHD]!;
File file = File('test.mp4');
await file.writeAsBytes((await client.get(Uri.parse(url))).bodyBytes);
print('File $id downloaded to ${file.path}');
}