Exemplo n.º 1
0
        public PresenceResponse GetPresence(string userId)
        {
            var apiPath  = _request.BuildApiPath("/users.getPresence", user => userId);
            var response = _request.ExecuteAndDeserializeRequest <PresenceResponse>(apiPath);

            return(response);
        }
Exemplo n.º 2
0
        public ChatDeleteResponse Delete(string channelId, string timestamp)
        {
            var apiPath  = _request.BuildApiPath("/chat.delete", channel => channelId, ts => timestamp);
            var response = _request.ExecuteAndDeserializeRequest <ChatDeleteResponse>(apiPath);

            return(response);
        }
Exemplo n.º 3
0
        public ResponseBase Delete(string fileId)
        {
            var apiPath  = _request.BuildApiPath("/files.delete", file => fileId);
            var response = _request.ExecuteAndDeserializeRequest <ResponseBase>(apiPath);

            return(response);
        }
Exemplo n.º 4
0
        public CloseResponse Close(string imId)
        {
            var apiPath  = _request.BuildApiPath("/im.close", channel => imId);
            var response = _request.ExecuteAndDeserializeRequest <CloseResponse>(apiPath);

            return(response);
        }
Exemplo n.º 5
0
        public ResponseBase Add(string reaction, string fileId = null, string commentId = null, string channelId = null, string ts = null)
        {
            var apiPath = _request.BuildApiPath("/reactions.add",
                                                name => reaction,
                                                file => fileId,
                                                fileComment => commentId,
                                                channel => channelId,
                                                timestamp => ts);

            var response = _request.ExecuteAndDeserializeRequest <ResponseBase>(apiPath);

            return(response);
        }
Exemplo n.º 6
0
        public OauthAccessResponse Access(string clientId, string clientSecret, string callbackCode, string redirectUri = null)
        {
            var apiPath  = _request.BuildApiPath("/oauth.access", client_id => clientId, client_secret => clientSecret, code => callbackCode, redirect_uri => redirectUri);
            var response = _request.ExecuteAndDeserializeRequest <OauthAccessResponse>(apiPath);

            return(response);
        }
Exemplo n.º 7
0
        public TeamAccessLogs AccessLogs(int?messageCount = null, int?pageNumber = null)
        {
            var apiPath  = _request.BuildApiPath("/team.accessLogs", count => messageCount, page => pageNumber);
            var response = _request.ExecuteAndDeserializeRequest <TeamAccessLogs>(apiPath);

            return(response);
        }
Exemplo n.º 8
0
        public StarsResponse List(string userId = null, int?messageCount = null, int?pageNumber = null)
        {
            var apiPath = _request.BuildApiPath("/stars.list",
                                                user => userId,
                                                count => messageCount,
                                                page => pageNumber);

            var response = _request.ExecuteAndDeserializeRequest <StarsResponse>(apiPath);

            return(response);
        }
Exemplo n.º 9
0
        public SearchResponse All(string queryString, SearchSortType?sortType = null,
                                  SortDirection?sortDir = null, bool?isHighlighted = null, int?messageCount = null,
                                  int?pageNumber        = null)
        {
            string highlighted = null;

            if (isHighlighted.HasValue)
            {
                highlighted = isHighlighted.Value ? "1" : "0";
            }

            var apiPath = _request.BuildApiPath("/search.all",
                                                query => queryString,
                                                sort => sortType,
                                                sort_dir => sortDir,
                                                highlight => highlighted,
                                                count => messageCount,
                                                page => pageNumber);

            var response = _request.ExecuteAndDeserializeRequest <SearchResponse>(apiPath);

            return(response);
        }
Exemplo n.º 10
0
        public ResponseBase Archive(string channelId)
        {
            var apiPath  = _request.BuildApiPath("/channels.archive", channel => channelId);
            var response = _request.ExecuteAndDeserializeRequest <ResponseBase>(apiPath);

            return(response);
        }