Skip to content

struct

Contentful

pub struct Contentful {
    /* private fields */
}

A Contentful space, read through its Content Delivery API (or the Preview API).

Methods

new

pub fn new(space: &str, access_token: &str) -> Contentful

A space id and a Content Delivery API access token.

environment

pub fn environment(self, env: &str) -> Contentful

The space's environment (master unless set).

preview

pub fn preview(self, on: bool) -> Contentful

Use the Preview API (drafts); pass a Preview API token to new.

entries

pub fn entries(&self, q: &Entries) -> Request

The entries q asks for.

entry

pub fn entry(&self, id: &str) -> Request

The entry with id.

assets

pub fn assets(&self, q: &Entries) -> Request

The assets (images and files) q asks for.

Trait implementations