Struct storyboard_client::Client[][src]

pub struct Client { /* fields omitted */ }

A client type to connect to the StoryBoard API

Methods

impl Client
[src]

Retrieves all the projects from the storyboard API.

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let projects = client.get_all_projects()?;
    assert_ne!(projects.len(), 0);
    Ok(())
}

Search projects with the given search string

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let projects = client.search_projects("stx")?;
    assert_ne!(projects.len(), 0);
    Ok(())
}

Get all registered project groups.

Get a project group by it's name.

Retrieves all projects in a project group.

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error, ProjectGroup};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let group = ProjectGroup { id: 86, ..Default::default() };
    let projects = client.get_projects_in_group(&group)?;
    assert_ne!(projects.len(), 0);
    Ok(())
}

impl Client
[src]

Search stories with the given search string

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let stories = client.search_stories("stx")?;
    assert_ne!(stories.len(), 0);
    Ok(())
}

Gets all the tasks within a story.

Example

extern crate storyboard_client;


fn example() -> Result<(), Error> {
    let story = Story { id: 19, ..Default::default() };
    let tasks = client.get_tasks_in_story(&story)?;
    assert_ne!(tasks.len(), 0);
    Ok(())
}

impl Client
[src]

Search tasks with the given search string

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let tasks = client.search_tasks("stx")?;
    assert_ne!(tasks.len(), 0);
    Ok(())
}

Get all tasks with the given ProjectGroup

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error, ProjectGroup};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let group = ProjectGroup { id: 86, ..Default::default() };
    let tasks = client.get_tasks_in_project_group(&group)?;
    assert_ne!(tasks.len(), 0);
    Ok(())
}

impl Client
[src]

Creates a new client for the StoryBoard API.

Receives the url of the API endpoint to perform the operations.

Example

extern crate storyboard_client;

use storyboard_client::Client;

fn main() {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
}

Function that performs the request with the specified url.

impl Client
[src]

Search users with the given search string

Example

extern crate storyboard_client;

use storyboard_client::{Client, Error};

fn example() -> Result<(), Error> {
    let client = Client::new("https://storyboard.openstack.org/api/v1");
    let users = client.search_users("erich")?;
    assert_ne!(users.len(), 0);
    Ok(())
}

Search users with the given email.

Auto Trait Implementations

impl Send for Client

impl Sync for Client