mainnomad.blogg.se

Command line slack client
Command line slack clientcommand line slack client

The default store that tracks all changes. Tracking with a local store can be disabled with Slack::RealTime::Client.new(store_class: nil). It also tracks changes, such as users being renamed, added or deleted, therefore ers is always up-to-date. Propertyĭetails on the authenticated user's team.Ī hash of channel objects, one for every channel visible to the authenticated user.Ī hash of group objects, one for every group the authenticated user is in.Ī hash of IM objects, one for every direct message channel visible to the authenticated user.ĭetails of the integrations set up on this team. The Real Time Messaging API is a WebSocket-based API that allows you to receive events from Slack in real time and send messages as user.īy default, the RealTime client exposes and maintains a local store with the properties of rtm.start upon a successful connection. In any other case, a Faraday::ClientError will be raised. 200 OK with Slack unavailable HTML page) and Slack::Web::Api::Errors::HttpRequestError subclasses for connection failures ( Slack::Web::Api::Errors::TimeoutError for read/open timeouts & Slack::Web::Api::Errors::UnavailableError for 5xx HTTP responses). Specifically Slack::Web::Api::Errors::ParsingError will be raised on non-json response (i.e. (Starting with 0.18.0 this is no longer a subclass of Slack::Web::Api::Errors::SlackError.) When Slack is temporarily unavailable a subclass of Slack::Web::Api::Errors::ServerError will be raised and the original Faraday::Error will be accesible via exception.cause. (This does not inherit from Slack::Web::Api::Errors::SlackError.) Other Errors If you exceed Slack’s rate limits, a Slack::Web::Api::Errors::TooManyRequestsError will be raised instead. The response_metadata is accessible with slack_error.response_metadata. The original response is also accessible using the response attribute. In case of multiple errors, the error message contains the error codes separated by commas, or they are accessible as an array with slack_error.errors. In all of these cases the error message contains the error code, which is also accessible with slack_error.error. (Update the Web API if you find that errors are missing - see CONTRIBUTING.) If there's a new error type that is not yet known by this library, then it will raise Slack::Web::Api::Errors::SlackError. Rescue Slack:: Web:: Api:: Errors:: SlackError => e # capture all Slack errors end See UPGRADING when upgrading from an older version. Please see the documentation for the last stable release, v0.17.0 unless you're integrating with HEAD. You're reading the documentation for the next release of slack-ruby-client.

  • To roll out a complete service using the Real Time Messaging API with Slack button integration to multiple teams, check out slack-ruby-bot-server, which is built on top of slack-ruby-bot, which uses this library.
  • To build a bot using the Real Time Messaging API, use slack-ruby-bot, which uses this library.
  • To respond to slash commands, interactive components or events, implement a web application using your favorite web framework and use this library to call the Slack Web API and to verify that events are coming from Slack.
  • This library will let you send messages to Slack via the Web API, send and receive messages via the Real Time Messaging API and facilitate integration with the Events API.
  • command line slack client

    If you are not familiar with these concepts, you might want to watch this video. Comes with a handy command-line client, too.

    command line slack client

    A Ruby client for the Slack Web, RealTime Messaging and Events APIs.

    Command line slack client