cixtor / slackapi

Slack API package for Go projects with full RTM support. It includes a CLI to interact with the API via your terminal application and a custom command to open a chat session for quick communication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slack API GoReport GoDoc

Slack, the "messaging app for teams" offers an API that has been used to build multiple projects around it, from bots to independent clients as well as integrations with other external services. This project aims to offer a low level experience for advanced users that want to either drop the web client or interact with the API for testing purpose.

Installation CLI

go get -u github.com/cixtor/slackcli

Installation Source

package main

import (
    "fmt"
    "github.com/cixtor/slackapi"
)

func main() {
    client := slackapi.New()
    fmt.Println(client.Version())
}

Features

The client is built on top of the Bot Users documentation. Most if not all the methods available in the API are implemented and can be executed placing a colon character as the suffix of each method.

Note that the client runs with the same chat session of the user that is using the program, but technically speaking the interaction is similar to that of a bot. This offers some advantages, for example, like other APIs and integrations, bot users are free. Unlike regular users, the actions they can perform are somewhat limited. For teams on the Free Plan, each bot user counts as a separate integration.

Implemented API Endpoints

  • πŸ”΅ means the method has been implemented
  • πŸ”΄ means the method is not implemented yet
  • πŸ’€ means the method has been deprecated without a replacement
:shipit: Method Description
πŸ”΄ admin.apps.approve Approve an app for installation on a workspace
πŸ”΄ admin.apps.restrict Restrict an app for installation on a workspace
πŸ”΄ admin.apps.approved.list List approved apps for an org or workspace
πŸ”΄ admin.apps.requests.list List app requests for a team/workspace
πŸ”΄ admin.apps.restricted.list List restricted apps for an org or workspace
πŸ”΄ admin.conversations.restrictAccess.addGroup Add an allowlist of IDP groups for accessing a channel
πŸ”΄ admin.conversations.restrictAccess.listGroups List all IDP Groups linked to a channel
πŸ”΄ admin.conversations.restrictAccess.removeGroup Remove a linked IDP group linked from a private channel
πŸ”΄ admin.conversations.setTeams Set the workspaces in an Enterprise grid org that connect to a channel
πŸ”΄ admin.emoji.add Add an emoji
πŸ”΄ admin.emoji.addAlias Add an emoji alias
πŸ”΄ admin.emoji.list List emoji for an Enterprise Grid organization
πŸ”΄ admin.emoji.remove Remove an emoji across an Enterprise Grid organization
πŸ”΄ admin.emoji.rename Rename an emoji
πŸ”΄ admin.inviteRequests.approve Approve a workspace invite request
πŸ”΄ admin.inviteRequests.deny Deny a workspace invite request
πŸ”΄ admin.inviteRequests.list List all pending workspace invite requests
πŸ”΄ admin.inviteRequests.approved.list List all approved workspace invite requests
πŸ”΄ admin.inviteRequests.denied.list List all denied workspace invite requests
πŸ”΄ admin.teams.admins.list List all of the admins on a given workspace
πŸ”΄ admin.teams.create Create an Enterprise team
πŸ”΄ admin.teams.list List all teams on an Enterprise organization
πŸ”΄ admin.teams.owners.list List all of the owners on a given workspace
πŸ”΄ admin.teams.settings.info Fetch information about settings in a workspace
πŸ”΄ admin.teams.settings.setDefaultChannels Set the default channels of a workspace
πŸ”΄ admin.teams.settings.setDescription Set the description of a given workspace
πŸ”΄ admin.teams.settings.setDiscoverability An API method that allows admins to set the discoverability of a given workspace
πŸ”΄ admin.teams.settings.setIcon Sets the icon of a workspace
πŸ”΄ admin.teams.settings.setName Set the name of a given workspace
πŸ”΄ admin.usergroups.addChannels Add up to one hundred default channels to an IDP group
πŸ”΄ admin.usergroups.addTeams Associate one or more default workspaces with an organization-wide IDP group
πŸ”΄ admin.usergroups.listChannels List the channels linked to an org-level IDP group (user group)
πŸ”΄ admin.usergroups.removeChannels Remove one or more default channels from an org-level IDP group (user group)
πŸ”΄ admin.users.assign Add an Enterprise user to a workspace
πŸ”΄ admin.users.invite Invite a user to a workspace
πŸ”΄ admin.users.list List users on a workspace
πŸ”΄ admin.users.remove Remove a user from a workspace
πŸ”΄ admin.users.setAdmin Set an existing guest, regular user, or owner to be an admin user
πŸ”΄ admin.users.setExpiration Set an expiration for a guest user
πŸ”΄ admin.users.setOwner Set an existing guest, regular user, or admin user to be a workspace owner
πŸ”΄ admin.users.setRegular Set an existing guest user, admin user, or owner to be a regular user
πŸ”΄ admin.users.session.reset Wipes all valid sessions on all devices for a given user
πŸ”΅ api.test Checks API calling code
πŸ”΅ apps.list Lists associated applications
πŸ”΅ apps.connections.open Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over
πŸ”΅ apps.event.authorizations.list Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to
πŸ”΅ apps.manifest.create Create an app from an app manifest
πŸ”΅ apps.manifest.delete Permanently deletes an app created through app manifests
πŸ”΅ apps.manifest.export Export an app manifest from an existing app
πŸ”΅ apps.manifest.update Update an app from an app manifest
πŸ”΅ apps.manifest.validate Validate an app manifest
πŸ”΅ apps.uninstall Uninstalls your app from a workspace
πŸ”΅ auth.revoke Revokes a token
πŸ”΅ auth.teams.list List the workspaces a token can access
πŸ”΅ auth.test Checks authentication and identity
πŸ”΅ bots.info Gets information about a bot user
πŸ”΄ calls.add Registers a new Call
πŸ”΄ calls.end Ends a Call
πŸ”΄ calls.info Returns information about a Call
πŸ”΄ calls.update Updates information about a Call
πŸ”΄ calls.participants.add Registers new participants added to a Call
πŸ”΄ calls.participants.remove Registers participants removed from a Call
πŸ”΅ chat.delete Deletes a message
πŸ”΅ chat.deleteAttachment Deletes a message attachment
πŸ”΄ chat.deleteScheduledMessage Deletes a pending scheduled message from the queue
πŸ”΄ chat.getPermalink Retrieve a permalink URL for a specific extant message
πŸ”΅ chat.meMessage Share a me message into a channel
πŸ”΄ chat.postEphemeral Sends an ephemeral message to a user in a channel
πŸ”΅ chat.postMessage Sends a message to a channel
πŸ”΄ chat.scheduleMessage Schedules a message to be sent to a channel
πŸ”΄ chat.scheduledMessages.list Returns a list of scheduled messages
πŸ”΄ chat.unfurl Provide custom unfurl behavior for user-posted URLs
πŸ”΅ chat.update Updates a message
πŸ”΅ client.counts List mentions in different conversations
πŸ”΅ client.shouldReload Determine if the Slack client must reload or not
πŸ”΅ conversations.acceptSharedInvite Accepts an invitation to a Slack Connect channel
πŸ”΅ conversations.approveSharedInvite Approves an invitation to a Slack Connect channel
πŸ”΅ conversations.archive Archives a conversation
πŸ”΅ conversations.close Closes a direct message or multi-person direct message
πŸ”΅ conversations.create Initiates a public or private channel-based conversation
πŸ”΅ conversations.declineSharedInvite Declines a Slack Connect channel invite
πŸ”΅ conversations.genericInfo Retrieve information about various channels
πŸ”΅ conversations.history Fetches a conversation's history of messages and events
πŸ”΅ conversations.info Retrieve information about a conversation
πŸ”΅ conversations.invite Invites users to a channel
πŸ”΅ conversations.inviteShared Sends an invitation to a Slack Connect channel
πŸ”΅ conversations.join Joins an existing conversation
πŸ”΅ conversations.kick Removes a user from a conversation
πŸ”΅ conversations.leave Leaves a conversation
πŸ”΅ conversations.list Lists all channels in a Slack team
πŸ”΅ conversations.listConnectInvites Lists shared channel invites that have been generated or received but have not been approved by all parties
πŸ”΅ conversations.mark Sets the read cursor in a channel
πŸ”΅ conversations.members Retrieve members of a conversation
πŸ”΅ conversations.open Opens or resumes a direct message or multi-person direct message
πŸ”΅ conversations.rename Renames a conversation
πŸ”΅ conversations.replies Retrieve a thread of messages posted to a conversation
πŸ”΅ conversations.setPurpose Sets the purpose for a conversation
πŸ”΅ conversations.setTopic Sets the topic for a conversation
πŸ”΅ conversations.suggestions List Slack suggestions to join conversations
πŸ”΅ conversations.unarchive Reverses conversation archival
πŸ”΄ dialog.open Open a dialog with a user
πŸ”΅ dnd.endDnd Ends the current user's "Do Not Disturb" session immediately
πŸ”΅ dnd.endSnooze Ends the current user's snooze mode immediately
πŸ”΅ dnd.info Retrieves a user's current "Do Not Disturb" status
πŸ”΅ dnd.setSnooze Turns on "Do Not Disturb" mode for the current user, or changes its duration
πŸ”΅ dnd.teamInfo Retrieves the "Do Not Disturb" status for up to 50 users on a team
πŸ”΅ emoji.list Lists custom emoji for a team
πŸ”΅ eventlog.history Lists all the events since the specified time
πŸ”΅ files.comments.add Add a comment to an existing file
πŸ”΅ files.comments.delete Deletes an existing comment on a file
πŸ”΅ files.comments.edit Edit an existing file comment
πŸ”΅ files.delete Deletes a file
πŸ”΅ files.info Gets information about a team file
πŸ”΅ files.list Lists and filters team files
πŸ”΅ files.listAfterTime Lists and filters team files after this timestamp (inclusive)
πŸ”΅ files.listBeforeTime Lists and filters team files before this timestamp (inclusive)
πŸ”΅ files.listByChannel Lists and filters team files in a specific channel
πŸ”΅ files.listByType Lists and filters team files by type: all, posts, snippets, images, gdocs, zips, pdfs
πŸ”΅ files.listByUser Lists and filters team files created by a single user
πŸ”΅ files.revokePublicURL Revokes public/external sharing access for a file
πŸ”΅ files.sharedPublicURL Enables a file for public/external sharing
πŸ”΅ files.upload Uploads or creates a file
πŸ”΄ files.remote.add Adds a file from a remote service
πŸ”΄ files.remote.info Retrieve information about a remote file added to Slack
πŸ”΄ files.remote.list Retrieve information about a remote file added to Slack
πŸ”΄ files.remote.remove Remove a remote file
πŸ”΄ files.remote.share Share a remote file into a channel
πŸ”΄ files.remote.update Updates an existing remote file
πŸ”΅ help.issues.list List issues reported by the current user
πŸ”΅ migration.exchange For Enterprise Grid workspaces, map local user IDs to global user IDs
πŸ”΄ oauth.access Exchanges a temporary OAuth code for an API token
πŸ”΄ oauth.token Exchanges a temporary OAuth verifier code for a workspace token
πŸ”΄ oauth.v2.access Exchanges a temporary OAuth verifier code for an access token
πŸ”΅ pins.add Pins an item to a channel
πŸ”΅ pins.list Lists items pinned to a channel
πŸ”΅ pins.remove Un-pins an item from a channel
πŸ”΅ reactions.add Adds a reaction to an item
πŸ”΅ reactions.get Gets reactions for an item
πŸ”΅ reactions.list Lists reactions made by a user
πŸ”΅ reactions.remove Removes a reaction from an item
πŸ”΄ reminders.add Creates a reminder
πŸ”΄ reminders.complete Marks a reminder as complete
πŸ”΄ reminders.delete Deletes a reminder
πŸ”΄ reminders.info Gets information about a reminder
πŸ”΄ reminders.list Lists all reminders created by or for a given user
πŸ”΄ rtm.connect Starts a Real Time Messaging session
πŸ”΅ rtm.start Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead
πŸ”΅ rtm.events Prints the API events in real time
πŸ”΅ search.all Searches for messages and files matching a query
πŸ”΅ search.files Searches for files matching a query
πŸ”΅ search.messages Searches for messages matching a query
πŸ”΅ search.modules Searches for modules matching a query
πŸ”΅ search.users Search users by name or email address
πŸ”΅ signup.checkEmail Checks if an email address is valid
πŸ”΅ signup.confirmEmail Confirm an email address for signup
πŸ”΅ stars.add Adds a star to an item
πŸ”΅ stars.list Lists stars for a user
πŸ”΅ stars.remove Removes a star from an item
πŸ”΅ team.accessLogs Gets the access logs for the current team
πŸ”΅ team.billableInfo Gets billable users information for the current team
πŸ”΅ team.billing.info Reads a workspace's billing plan information
πŸ”΅ team.channels.info Retrieve a list of channels in a specific team
πŸ”΅ team.channels.membership Retrieve membership information about a team
πŸ”΅ team.info Gets information about the current team
πŸ”΅ team.integrationLogs Gets the integration logs for the current team
πŸ”΅ team.listExternal List external teams and their corresponding information
πŸ”΅ team.preferences.list Retrieve a list of a workspace's team preferences
πŸ”΅ team.profile.get Retrieve a team's profile
πŸ”΄ usergroups.create Create a User Group
πŸ”΄ usergroups.disable Disable an existing User Group
πŸ”΄ usergroups.enable Enable a User Group
πŸ”΄ usergroups.list List all User Groups for a team
πŸ”΄ usergroups.update Update an existing User Group
πŸ”΄ usergroups.users.list List all users in a User Group
πŸ”΄ usergroups.users.update Update the list of users for a User Group
πŸ”΄ users.conversations List conversations the calling user may access
πŸ”΅ users.deletePhoto Delete the user profile photo
πŸ”΅ users.getPresence Gets user presence information
πŸ”΅ users.identity Get a user's identity
πŸ”΅ users.info Gets information about a user
πŸ”΅ users.list Lists all users in a Slack team
πŸ”΅ users.lookupByEmail Find a user with an email address
πŸ”΅ users.prefs.get Get user account preferences
πŸ”΅ users.prefs.set Set user account preferences
πŸ”΅ users.preparePhoto Upload a picture to use as the avatar
πŸ”΅ users.profile.get Retrieves a user's profile information
πŸ”΅ users.profile.set Set the profile information for a user
πŸ”΅ users.setAvatar Upload a picture and set it as the avatar
πŸ”΅ users.setEmail Changes the email address without confirmation
πŸ”΅ users.setPhoto Set the user profile photo
πŸ”΅ users.setPresence Manually sets user presence
πŸ”΅ users.setStatus Set the status message and emoji
πŸ”΅ users.setUsername Changes the username without admin privileges
πŸ”΅ version Displays the program version number
πŸ”΄ views.open Open a view for a user
πŸ”΄ views.publish Publish a static view for a User
πŸ”΄ views.push Push a view onto the stack of a root view
πŸ”΄ views.update Update an existing view
πŸ”΅ workflows.stepCompleted Indicate that an app's step in a workflow completed execution
πŸ”΅ workflows.stepFailed Indicate that an app's step in a workflow failed to execute
πŸ”΅ workflows.updateStep Update the configuration for a workflow step

About

Slack API package for Go projects with full RTM support. It includes a CLI to interact with the API via your terminal application and a custom command to open a chat session for quick communication.

License:MIT License


Languages

Language:Go 99.7%Language:Makefile 0.3%