Skip to content

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

Merged
zimeg merged 3 commits into
mainfrom
clack/canvases-method-examples
Nov 2, 2026
Merged

zimeg merged 3 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

The canvasesGetContent method shipped in slack-api-client 1.53.0 (slackapi/java-slack-sdk#1664). main pins that release (#101), and this branch merges it in.

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
zimeg and others added 2 commits October 28, 2026 09:47
Brings in the slack-api-client 1.53.0 bump from main (#101), which adds
canvasesGetContent to the client, so the methods build compiles.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg marked this pull request as ready for review November 2, 2026 19:39
@zimeg
zimeg requested a review from a team as a code owner November 2, 2026 19:39
@zimeg
zimeg merged commit 0de5a2d into main Nov 2, 2026
4 checks passed
@zimeg
zimeg deleted the clack/canvases-method-examples branch November 2, 2026 19:39
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