Skip to content

feat(methods): add canvases.create and canvases.getContent examples - #98

Draft
zimeg wants to merge 2 commits into
mainfrom
clack/canvases-method-examples
Draft

zimeg wants to merge 2 commits into
mainfrom
clack/canvases-method-examples

Conversation

@zimeg

@zimeg zimeg commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds a canvases family of Web API method examples under methods/src/main/java/canvases/.

  • canvases.create creates a canvas with a title and document_content.
  • canvases.getContent reads a canvas back as markdown with canvas_id and content_type.
  • The manifest requests the canvases:read and canvases:write bot scopes.
  • The methods/README.md lists both methods in a new canvases section.

Dependency, stays DRAFT

This waits on slackapi/java-slack-sdk#1664 (canvasesGetContent) shipping in a slack-api-client release and the pinned version in methods/pom.xml being bumped. Until then mvn compile fails against 1.52.0 on just this unreleased method.

Testing

  1. Create an app from methods/src/main/java/canvases/manifest.json and install it to a workspace.
  2. Export the bot token with export SLACK_TOKEN=xoxb-example.
  3. Run mvn compile exec:java -Dexec.mainClass=canvases.CanvasesCreate and confirm the response is ok with a canvas_id.
  4. Replace F1234ABCD in CanvasesGetContent.java with the canvas ID from the last response, then run mvn compile exec:java -Dexec.mainClass=canvases.CanvasesGetContent and confirm the response content contains the markdown.

🤖 Generated with Claude Code

@zimeg zimeg added enhancement New feature or request java Pull requests that update java code labels Oct 28, 2026
@zimeg zimeg self-assigned this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant