Skip to content

emilsivervik/pexels-uri-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(())
}

About

Create URI's for Pexels API.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages