imgur 1.0.21 copy "imgur: ^1.0.21" to clipboard
imgur: ^1.0.21 copied to clipboard

outdated

A high-level Imgur API Client Library that uses Imgur's v3 API.

imgur.dart #

An Imgur API Client Library that uses Imgur's v3 API for Dart.

Usage #

A simple usage example to get your uploaded images:

import 'package:imgur/imgur.dart';

main() async {
  final client = Imgur(Authentication.fromToken('YOUR_IMGUR_ACCESS_TOKEN'));

  final resp = await client.account.getImages();
  print(resp.data);
}

Upload an image:

import 'package:imgur/imgur.dart';

main() async {
  final client = Imgur(Authentication.fromToken('YOUR_IMGUR_ACCESS_TOKEN'));

  /// Upload an image from path
  await client.image
      .uploadImage(
          imagePath: '/path/of/the/image.png',
          title: 'A title',
          description: 'A description')
      .then((resp) => print('Uploaded image to: ${resp.data.link}'));
}

Documentation #

A generated documentation is available at pub.dev.

Testing #

pub run test test/*

License #

This project is licensed under the MIT License - see the LICENSE file for details

7
likes
0
pub points
66%
popularity

Publisher

verified publishershellbear.me

A high-level Imgur API Client Library that uses Imgur's v3 API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, json_annotation

More

Packages that depend on imgur