slack_chat_api/
team_profile.rs1use crate::Client;
2use crate::ClientResult;
3
4pub struct TeamProfile {
5 pub client: Client,
6}
7
8impl TeamProfile {
9 #[doc(hidden)]
10 pub fn new(client: Client) -> Self {
11 TeamProfile { client }
12 }
13
14 pub async fn get(
27 &self,
28 visibility: &str,
29 ) -> ClientResult<crate::Response<crate::types::TeamProfileGetSuccessSchema>> {
30 let mut query_args: Vec<(String, String)> = Default::default();
31 if !visibility.is_empty() {
32 query_args.push(("visibility".to_string(), visibility.to_string()));
33 }
34 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
35 let url = self
36 .client
37 .url(&format!("/team.profile.get?{}", query_), None);
38 self.client
39 .get(
40 &url,
41 crate::Message {
42 body: None,
43 content_type: None,
44 },
45 )
46 .await
47 }
48}