[−][src]Macro twitch_helix::helix_url
Creates a url to a helix page
Usage
This macro takes any number of arguments, identifiers,
separated by slashes, /
, to build the full url.
There may not exist a trailing /
.
Examples
The following examples demonstrates how to use the macro
assert_eq!( helix_url!().as_str(), "https://api.twitch.tv/helix" ); assert_eq!( helix_url!(my/page).as_str(), "https://api.twitch.tv/helix/my/page" );
The following example doesn't compile because of the trailing /
ⓘThis example deliberately fails to compile
let my_url = helix_url!(my/page/); // Error: trailing `/`