Package: pyswit
Pyswit: Python + Swit.ioPython interface forSwit.ioRESTful APIRequirementsThis library requires Python 3.6 or later.Installation$pipinstallpyswitAuthenticationYou needaccess tokento use Swit Open API.Please referGetting started with authenticationExamplesfrompyswitimportPyswitaccess_token="<your access token>"swit=Pyswit(access_token)# Userprint(swit.user.info())# Create a messagechannel_id="<your_channel_id>"# not channel nameresponse=swit.message.create(channel_id=channel_id,content="Hello, World!")# Get message_idmessage_id=response["data"]["message"]["message_id"]# React to a messageswit.message.reaction.create(message_id=message_id,reaction_name=":smile:")# Comment on a messageswit.message.comment.create(message_id=message_id,content="Comment string here")WebhookPyswit supports webhook.Webhook API does not require access tokencurl-XPOST-H'Content-type: application/json'--data'{"text":"Hello, World!"}'<your_webhook_url>The above curl request can be implemented with pyswit as follows.frompyswit.webhookimportwebhookwebhook_url="<your_webhook_url>"webhook(url=webhook_url,text="Hello, World!")DocumentationSwit.io Developer documentationCurrently, Pyswit supports the following API.HTTPendpointpyswitUsersGETuser.info:white_check_mark:WorkspacesGETworkspace.info:white_check_mark:GETworkspace.list:white_check_mark:POSTworkspace.update:white_check_mark:GETworkspace.user.info:white_check_mark:GETworkspace.user.list:white_check_mark:POSTworkspace.user.update:white_check_mark:ChannelsPOSTchannel.archive:white_check_mark:POSTchannel.create:white_check_mark:POSTchannel.createDirect:white_check_mark:GETchannel.info:white_check_mark:GETchannel.list:white_check_mark:POSTchannel.update:white_check_mark:MessagesPOSTmessage.comment.create:white_check_mark:GETmessage.comment.list:white_check_mark:POSTmessage.comment.remove:white_check_mark:POSTmessage.create:white_check_mark:GETmessage.info:white_check_mark:GETmessage.list:white_check_mark:POSTmessage.reaction.create:white_check_mark:POSTmessage.reaction.remove:white_check_mark:POSTmessage.remove:white_check_mark:IdeasPOSTidea.comment.create:white_check_mark:GETidea.comment.list:white_check_mark:POSTidea.comment.remove:white_check_mark:POSTidea.create:white_check_mark:GETidea.info:white_check_mark:GETidea.list:white_check_mark:POSTidea.remove:white_check_mark:POSTidea.reaction.create:white_check_mark:POSTidea.reaction.remove:white_check_mark:ProjectsPOSTproject.archive:white_check_mark:POSTproject.create:white_check_mark:GETproject.info:white_check_mark:GETproject.list:white_check_mark:GETproject.tagList:white_check_mark:POSTproject.update:white_check_mark:GETproject.user.list:white_check_mark:Project bucketsPOSTproject.bucket.create:white_check_mark:GETproject.bucket.info:white_check_mark:GETproject.bucket.list:white_check_mark:POSTproject.bucket.update:white_check_mark:TasksPOSTtask.assignee.add:white_check_mark:POSTtask.asignee.remove:white_check_mark:POSTtask.checklist.create:white_check_mark:GETtask.checklist.info:white_check_mark:GETtask.checklist.list:white_check_mark:POSTtask.checklist.remove:white_check_mark:POSTtask.checklist.update:white_check_mark:POSTtask.comment.create:white_check_mark:GETtask.comment.list:white_check_mark:POSTtask.comment.remove:white_check_mark:POSTtask.comment.update:white_check_mark:POSTtask.create:white_check_mark:POSTtask.follow.add:white_check_mark:POSTtask.follow.remove:white_check_mark:GETtask.info:white_check_mark:GETtask.list:white_check_mark:GETtask.listByColumn:white_check_mark:POSTtask.move:white_check_mark:GETtask.myTaskList:white_check_mark:POSTtask.remove:white_check_mark:POSTtask.update:white_check_mark:Posts:x:Boards:x:Custom fileds:x:Approvals:x:Advanced Only API:Posts,Boards,Custom fileds,ApprovalsPyswit has no plan to support Advanced Only API