pexels_client 2.0.0 copy "pexels_client: ^2.0.0" to clipboard
pexels_client: ^2.0.0 copied to clipboard

An unofficial dart wrapper for the [Pexels API](https://www.pexels.com/api/).

example/pexels_client_example.dart

import 'package:pexels_client/pexels_client.dart';

Future<void> main() async {
  final client = PexelsClient(apiKey: '');

  // Photo
  final searchPhotos = await client.searchPhotos(query: 'nature');
  print(searchPhotos);

  final curatedPhotos = await client.curatedPhotos();
  print(curatedPhotos);

  final photo = await client.getPhoto(id: 139324);
  print(photo);

  // Videos
  final searchVideos = await client.searchVideos(query: 'nature');
  print(searchVideos);

  final popularVideos = await client.popularVideos();
  print(popularVideos);

  final video = await client.getVideo(id: 2499611);
  print(video);

  // Collections
  final featuredCollections = await client.featuredCollections();
  print(featuredCollections);

  final myCollections = await client.myCollections();
  print(myCollections);

  final collectionMedia = await client.collectionMedia(id: '8xntbhr');
  print(collectionMedia);
}
1
likes
160
points
59
downloads

Publisher

verified publishermarkivan.dev

Weekly Downloads

An unofficial dart wrapper for the [Pexels API](https://www.pexels.com/api/).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, json_annotation

More

Packages that depend on pexels_client