Struct slack_chat_api::files_remote::FilesRemote
source · [−]pub struct FilesRemote {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl FilesRemote
impl FilesRemote
sourcepub async fn add(&self) -> Result<DndEndSchema>
pub async fn add(&self) -> Result<DndEndSchema>
This function performs a POST to the /files.remote.add endpoint.
Adds a file from a remote service
sourcepub async fn info(&self, file: &str, external_id: &str) -> Result<DndEndSchema>
pub async fn info(&self, file: &str, external_id: &str) -> Result<DndEndSchema>
This function performs a GET to the /files.remote.info endpoint.
Retrieve information about a remote file added to Slack
FROM: https://api.slack.com/methods/files.remote.info
Parameters:
token: &str– Authentication token. Requires scope:remote_files:read.file: &str– Specify a file by providing its ID.external_id: &str– Creator defined GUID for the file.
sourcepub async fn list(
&self,
channel: &str,
ts_from: f64,
ts_to: f64,
limit: i64,
cursor: &str
) -> Result<DndEndSchema>
pub async fn list(
&self,
channel: &str,
ts_from: f64,
ts_to: f64,
limit: i64,
cursor: &str
) -> Result<DndEndSchema>
This function performs a GET to the /files.remote.list endpoint.
Retrieve information about a remote file added to Slack
FROM: https://api.slack.com/methods/files.remote.list
Parameters:
token: &str– Authentication token. Requires scope:remote_files:read.channel: &str– Filter files appearing in a specific channel, indicated by its ID.ts_from: f64– Filter files created after this timestamp (inclusive).ts_to: f64– Filter files created before this timestamp (inclusive).limit: i64– The maximum number of items to return.cursor: &str– Paginate through collections of data by setting thecursorparameter to anext_cursorattribute returned by a previous request’sresponse_metadata. Default value fetches the first “page” of the collection. See pagination for more detail.
sourcepub async fn remove(&self) -> Result<DndEndSchema>
pub async fn remove(&self) -> Result<DndEndSchema>
This function performs a POST to the /files.remote.remove endpoint.
Remove a remote file.
This function performs a GET to the /files.remote.share endpoint.
Share a remote file into a channel.
FROM: https://api.slack.com/methods/files.remote.share
Parameters:
token: &str– Authentication token. Requires scope:remote_files:share.file: &str– Specify a file registered with Slack by providing its ID. Either this field orexternal_idor both are required.external_id: &str– The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field orfileor both are required.channels: &str– Comma-separated list of channel IDs where the file will be shared.
sourcepub async fn update(&self) -> Result<DndEndSchema>
pub async fn update(&self) -> Result<DndEndSchema>
This function performs a POST to the /files.remote.update endpoint.
Updates an existing remote file.
Auto Trait Implementations
impl !RefUnwindSafe for FilesRemote
impl Send for FilesRemote
impl Sync for FilesRemote
impl Unpin for FilesRemote
impl !UnwindSafe for FilesRemote
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more