pexels-uri 0.1.0

Create URI's for Pexels API
Documentation
  • Coverage
  • 30%
    21 out of 70 items documented4 out of 8 items with examples
  • Size
  • Source code size: 45.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • emilsivervik/pexels-uri-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • emilsivervik

pexels-uri

Create URI's for Pexels API using the builderpattern.

API Documentation

This is not an official crate from Pexels, their documentation can be found here

Examples

use pexels_uri::{videos, Orientation};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let uri_builder = videos::Search::builder()
        .query("Dogs running")
        .orientation(Orientation::Landscape)
        .per_page(25)
        .build();

    assert_eq!(
        "https://api.pexels.com/videos/search?query=Dogs+running&per_page=25&orientation=landscape",
        uri_builder.create_uri()?
    );
    Ok(())
}