[−][src]Function sanity::create
pub fn create(
project_id: &str,
data_set: &str,
token: &str,
use_prod: bool
) -> SanityConfig
Initialize the Sanity config
Here we take in the api key as well as data set you'll use, and return the convenience config
Example usage:
extern crate sanity; use sanity::helpers::get_json; fn main() { let mut sn = sanity::create( "proj_id", // Sanity project ID to use "data_set", // Data set to query. i.e. "development" "Long_string_for_token", // Bearer token false, // Use prod cdn or not ); }