Repository navigation
Conversation
Add the canvases.getContent Web API method, which gets the content of a canvas as markdown (default) or HTML. Takes a required canvas_id and an optional content_type of html or markdown. The java-slack-sdk json-logs have no canvases.getContent sample yet, so CanvasesGetContentResponse is produced by running the codegen's quicktype command on a sample shaped like the documented response, matching the generated output shape. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: c55a86d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2797 +/- ##
==========================================
+ Coverage 89.32% 89.36% +0.03%
==========================================
Files 65 65
Lines 10548 10555 +7
Branches 480 480
==========================================
+ Hits 9422 9432 +10
+ Misses 1094 1091 -3
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
🐙 A few words more before requesting kind review
| CanvasesEditArguments, | ||
| CanvasesGetContentArguments, | ||
| CanvasesSectionsLookupArguments, | ||
| ConversationsCanvasesCreateArguments, |
There was a problem hiding this comment.
👁️🗨️ note: I think we might want to move this to "conversations" export but no rush in meantime?
| // https://docs.slack.dev/reference/methods/canvases.getContent | ||
| export interface CanvasesGetContentArguments extends CanvasID, TokenOverridable { | ||
| /** @description Format in which to return the canvas content. Defaults to markdown. */ | ||
| content_type?: 'html' | 'markdown'; |
There was a problem hiding this comment.
📣 note: This is more strict than most method arguments but we might expand this as needed while starting correct? This can also be a string.
Summary
This pull request adds the
canvases.getContentmethod to@slack/web-api.client.canvases.getContent({ canvas_id, content_type })takes a requiredcanvas_idand an optionalcontent_typeofhtmlormarkdown(the API defaults tomarkdown).CanvasesGetContentResponseadds thecontentstring. The response type is generated from the documented example response, since no recorded API response exists yet.Testing
canvases:readscope, callclient.canvases.getContent({ canvas_id: 'F0123456789' })on a canvas you can read and confirmcontentcomes back as markdown.content_type: 'html'and confirmcontentcomes back as HTML.Requirements
🤖 Generated with Claude Code