pexels_client
An unofficial dart wrapper for the Pexels API.
Get Started
NOTE: You will need an API Key, which can be obtained by creating an account here.
Install the pexels_client
package:
dependencies:
pexels_client: ^1.0.0
Then you can import it in your Dart code:
import 'package:pexels_client/pexels_client.dart';
Usage
final client = PexelsClient(apiKey: '<API-KEY>');
// Photo
final searchPhotos = await client.searchPhotos(query: 'nature');
final curatedPhotos = await client.curatedPhotos();
final photo = await client.getPhoto(id: 139324);
// Videos
final searchVideos = await client.searchVideos(query: 'nature');
final popularVideos = await client.popularVideos();
final video = await client.getVideo(id: 2499611);
// Collections
final featuredCollections = await client.featuredCollections();
final myCollections = await client.myCollections();
final collectionMedia = await client.collectionMedia(id: '8xntbhr');
Support
If you like my work and want to support me, buying me a coffee would be awesome! Thanks for your support!
Mark Ivan Basto • GitHub @MarkIvanDev
Libraries
- pexels_client
- An unofficial dart wrapper for the Pexels API.