pub struct Client { /* fields omitted */ }
A client type to connect to the StoryBoard API
Retrieves all the projects from the storyboard API.
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
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.
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(())
}
Search stories with the given search string
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.
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(())
}
Search tasks with the given search string
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
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(())
}
Creates a new client for the StoryBoard API.
Receives the url of the API endpoint to perform the operations.
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.
Search users with the given search string
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.