Crates.io | pexels-cli |
lib.rs | pexels-cli |
version | 0.0.5 |
source | src |
created_at | 2024-12-31 10:47:04.60671+00 |
updated_at | 2025-01-15 17:02:46.190145+00 |
description | A Rust client for the Pexels API |
homepage | https://github.com/houseme/pexels |
repository | https://github.com/houseme/pexels.git |
max_upload_size | |
id | 1499900 |
size | 52,538 |
Pexels CLI is a command-line interface for interacting with the Pexels API. It allows you to search for photos, videos, and collections, as well as retrieve individual media items by their ID.
Clone the repository:
git clone https://github.com/houseme/pexels.git
Navigate to the project directory:
cd pexels/pexels-cli
Build the project:
cargo build
Before using the CLI, make sure to set your Pexels API key in a .env
file:
PEXELS_API_KEY=your_api_key_here
Search Photos:
cargo run -- search-photos --query "nature" --per-page 10 --page 1
Search Videos:
cargo run -- search-videos --query "nature" --per-page 10 --page 1
Get Photo by ID:
cargo run -- get-photo --id 12345
Get Video by ID:
cargo run -- get-video --id 12345
Search Collections:
cargo run -- search-collections --per-page 10 --page 1
Search Media:
cargo run -- search-media --query "nature" --per-page 10 --page 1 --type "photo" --sort "latest"
For detailed documentation, please refer to Documentation.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 or MIT license, shall be dual licensed as above, without any additional terms or conditions.