pexels 0.1.1 copy "pexels: ^0.1.1" to clipboard
pexels: ^0.1.1 copied to clipboard

Unofficial wrapper of Pexels REST API for the Dart Language.

example/example.dart

import "dart:io";
import "../lib/pexels.dart";

void main() async {

  var client = new PexelsClient('key');

  var p = await client.getPhoto(); // get a random video.
  var link = p.get(ImageFormats.small);
  stdout.write(link);

  var vid = await client.getVideo(id:857251);
  stdout.write(vid.sources[0].link);

  var result = await client.searchPhotos("tree");
  var photo = result[0];
  stdout.write(photo.sources['original'].link);

  var result2 = await client.searchVideos("balloon");
  var video = result2[0];
  stdout.write(video.sources[0].link);

  var quota = await client.getQuota();
  stdout.write(quota);
  
}
1
likes
40
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

Unofficial wrapper of Pexels REST API for the Dart Language.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on pexels