[−][src]Struct domo_pitchfork::pitchfork::StreamsRequestBuilder
Request Builder for all Stream API interactions
Fields
auth: &'t str
method: Method
url: String
resp_t: PhantomData<*const T>
body: Option<String>
Methods
impl<'t> StreamsRequestBuilder<'t, StreamDataset>
[src]
Request Builder for Stream API Endpoints
pub fn info(self, stream_id: u64) -> Result<StreamDataset, PitchforkError>
[src]
Retrieve details for a given Domo Stream
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let stream_id = 123; // stream id to get details for. let stream_info = domo.streams().info(stream_id)?; println!("Stream Details: \n{:#?}", stream_info);
pub fn list(
self,
limit: u32,
offset: u32
) -> Result<Vec<StreamDataset>, PitchforkError>
[src]
self,
limit: u32,
offset: u32
) -> Result<Vec<StreamDataset>, PitchforkError>
List Domo Streams. Max limit is 500. Offset is the offset of the Stream ID to begin list of streams within the response
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let list = domo.streams().list(5,0)?; list.iter().map(|s| println!("Dataset Name: {}", s.dataset.name.as_ref().unwrap()));
pub fn search(
self,
query: StreamSearchQuery
) -> Result<Vec<StreamDataset>, PitchforkError>
[src]
self,
query: StreamSearchQuery
) -> Result<Vec<StreamDataset>, PitchforkError>
Returns a list of StreamDataset
s that meet the search query criteria.
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let user_id = 123; // User Id to search for streams for. let query = StreamSearchQuery::DatasetOwnerId(user_id); let list = domo.streams().search(query)?; list.iter().map(|s| println!("Dataset Name: {}", s.dataset.name.as_ref().unwrap()));
pub fn create(
self,
ds_meta: &StreamDatasetSchema
) -> Result<StreamDataset, PitchforkError>
[src]
self,
ds_meta: &StreamDatasetSchema
) -> Result<StreamDataset, PitchforkError>
Create a new StreamDataset
to create executions and upload data to.
pub fn delete(self, stream_id: u64) -> Result<(), PitchforkError>
[src]
Delete a given Domo Stream. Warning: this action is destructive and cannot be reversed.
Example
let domo = DomoPitchfork::with_token(&token); let stream_id = 123; //id of stream to delete. // if it fails to delete print err msg. if let Err(e) = domo.streams().delete(stream_id) { println!("{}", e) }
pub fn modify_update_method(
self,
stream_id: u64,
update_method: UpdateMethod
) -> Result<Dataset, PitchforkError>
[src]
self,
stream_id: u64,
update_method: UpdateMethod
) -> Result<Dataset, PitchforkError>
Updates Stream Update Method settings
pub fn create_stream_execution(
self,
stream_id: u64
) -> Result<StreamExecution, PitchforkError>
[src]
self,
stream_id: u64
) -> Result<StreamExecution, PitchforkError>
Create a StreamExecution
to upload data parts to and update the data in Domo.
Warning: Creating an Execution on a Stream will abort all other Executions on that Stream.
Each Stream can only have one active Execution at a time.
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let stream_id = 123; // stream id to create execution for. let execution_info = domo.streams().create_stream_execution(stream_id)?; println!("Stream Execution Details: \n{:#?}", execution_info);
pub fn execution_info(
self,
stream_id: u64,
execution_id: u32
) -> Result<StreamExecution, PitchforkError>
[src]
self,
stream_id: u64,
execution_id: u32
) -> Result<StreamExecution, PitchforkError>
Details for a StreamExecution
for a given StreamDataset
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let stream_id = 123; // stream id to get execution info for. let ex_id = 1; // execution id to get info for. let execution_info = domo.streams().execution_info(stream_id, ex_id)?; println!("Stream Execution Details: \n{:#?}", execution_info);
pub fn list_executions(
self,
stream_id: u64,
limit: u32,
offset: u32
) -> Result<Vec<StreamExecution>, PitchforkError>
[src]
self,
stream_id: u64,
limit: u32,
offset: u32
) -> Result<Vec<StreamExecution>, PitchforkError>
List Domo Executions for a given Domo Stream. Max limit is 500. Offset is the offset of the Stream ID to begin list of streams within the response
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let stream_id = 123; // stream id to retrieve executions for. let list = domo.streams().list_executions(stream_id, 50,0)?; list.iter().map(|s| println!("Execution Id: {}", s.id));
pub fn upload_part(
self,
stream_id: u64,
execution_id: u32,
part: u32,
csv_part: &str
) -> Result<StreamExecution, PitchforkError>
[src]
self,
stream_id: u64,
execution_id: u32,
part: u32,
csv_part: &str
) -> Result<StreamExecution, PitchforkError>
Upload a data part to a stream execution in progress. Parts can be uploaded simultaneously and in any order.
pub fn upload_serializable_part<T: Serialize>(
self,
stream_id: u64,
execution_id: u32,
part: u32,
data: &[T]
) -> Result<StreamExecution, PitchforkError>
[src]
self,
stream_id: u64,
execution_id: u32,
part: u32,
data: &[T]
) -> Result<StreamExecution, PitchforkError>
Upload a data part to a stream execution in progress where the data part
is a Serializable
vec of T.
Parts can be uploaded simultaneously and in any order.
pub fn commit_execution(
self,
stream_id: u64,
execution_id: u32
) -> Result<StreamExecution, PitchforkError>
[src]
self,
stream_id: u64,
execution_id: u32
) -> Result<StreamExecution, PitchforkError>
Commit a stream execution and finalize insertion of dataparts into Domo Stream Dataset.
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let stream_id = 123; // stream id to finish execution for. let ex_id = 1; // execution id to finalize and commit. let execution_info = domo.streams().commit_execution(stream_id, ex_id)?; println!("Stream Execution Details: \n{:#?}", execution_info);
pub fn abort_stream_execution(
self,
stream_id: u64,
execution_id: u32
) -> Result<(), PitchforkError>
[src]
self,
stream_id: u64,
execution_id: u32
) -> Result<(), PitchforkError>
Abort a stream execution in progress and discard all data parts uploaded to the execution.
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let stream_id = 123; // stream id to abort execution for. let ex_id = 1; // execution id to abort. let execution_info = domo.streams().abort_stream_execution(stream_id, ex_id)?; println!("Stream Execution Details: \n{:#?}", execution_info);
Trait Implementations
impl<'t, T> BaseRequest for StreamsRequestBuilder<'t, T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn auth(&self) -> &str
[src]
fn url(&self) -> &str
[src]
fn method(&self) -> Method
[src]
fn body(&self) -> Option<String>
[src]
impl<'t, T> DomoRequest<T> for StreamsRequestBuilder<'t, T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn run(&self) -> Result<T, PitchforkError> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn retrieve_and_deserialize_json(&self) -> Result<T, PitchforkError> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn send_csv(&self) -> Result<Response, PitchforkError>
[src]
fn send_json(&self) -> Result<Response, PitchforkError>
[src]
impl<'t, T> From<DomoRequestBuilder<'t, T>> for StreamsRequestBuilder<'t, T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn from(drb: DomoRequestBuilder<'t, T>) -> Self
[src]
Auto Trait Implementations
impl<'t, T> !Send for StreamsRequestBuilder<'t, T>
impl<'t, T> !Sync for StreamsRequestBuilder<'t, T>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto for T where
U: TryFrom<T>,
U: TryFrom<T>,