diff --git a/methods/README.md b/methods/README.md index e8a7928..114f272 100644 --- a/methods/README.md +++ b/methods/README.md @@ -74,6 +74,7 @@ $ mvn compile exec:java -Dexec.mainClass=chat.ChatPostMessage # Make the reques - **[slackbot.skillSets.items.add](https://docs.slack.dev/reference/methods/slackbot.skillSets.items.add)**: Adds skills to a Slackbot skill set. [Implementation](./src/main/java/slackbot/skillSets/items/SlackbotSkillSetsItemsAdd.java). - **[slackbot.skillSets.items.remove](https://docs.slack.dev/reference/methods/slackbot.skillSets.items.remove)**: Removes skills from a Slackbot skill set. [Implementation](./src/main/java/slackbot/skillSets/items/SlackbotSkillSetsItemsRemove.java). - **[slackbot.skillSets.library.add](https://docs.slack.dev/reference/methods/slackbot.skillSets.library.add)**: Adds a Slackbot skill set to the caller's library. [Implementation](./src/main/java/slackbot/skillSets/library/SlackbotSkillSetsLibraryAdd.java). +- **[slackbot.skillSets.library.remove](https://docs.slack.dev/reference/methods/slackbot.skillSets.library.remove)**: Removes a Slackbot skill set from the caller's library. [Implementation](./src/main/java/slackbot/skillSets/library/SlackbotSkillSetsLibraryRemove.java). - **[slackbot.skills.create](https://docs.slack.dev/reference/methods/slackbot.skills.create)**: Creates a skill from markdown instructions, or turns an existing canvas the caller owns into a skill. [Implementation](./src/main/java/slackbot/skills/SlackbotSkillsCreate.java). - **[slackbot.skills.delete](https://docs.slack.dev/reference/methods/slackbot.skills.delete)**: Deletes a Slackbot skill and its canvas, and removes it from every library, skill set, and the org catalog. [Implementation](./src/main/java/slackbot/skills/SlackbotSkillsDelete.java). - **[slackbot.skills.info](https://docs.slack.dev/reference/methods/slackbot.skills.info)**: Returns one Slackbot skill, including its instructions. [Implementation](./src/main/java/slackbot/skills/SlackbotSkillsInfo.java). diff --git a/methods/src/main/java/slackbot/skillSets/library/SlackbotSkillSetsLibraryRemove.java b/methods/src/main/java/slackbot/skillSets/library/SlackbotSkillSetsLibraryRemove.java new file mode 100644 index 0000000..d99c04b --- /dev/null +++ b/methods/src/main/java/slackbot/skillSets/library/SlackbotSkillSetsLibraryRemove.java @@ -0,0 +1,28 @@ +package slackbot.skillSets.library; + +import com.slack.api.Slack; +import com.slack.api.methods.MethodsClient; +import com.slack.api.methods.SlackApiException; +import com.slack.api.methods.request.slackbot.skill_sets.library.SlackbotSkillSetsLibraryRemoveRequest; +import com.slack.api.methods.response.slackbot.skill_sets.library.SlackbotSkillSetsLibraryRemoveResponse; +import java.io.IOException; + +public class SlackbotSkillSetsLibraryRemove { + + public static void main(String[] args) throws IOException, SlackApiException { + // Read a token from an environment variable + String token = System.getenv("SLACK_TOKEN"); + + // Initialize + MethodsClient methods = Slack.getInstance().methods(token); + + // Call the slackbot.skillSets.library.remove method + SlackbotSkillSetsLibraryRemoveRequest request = SlackbotSkillSetsLibraryRemoveRequest.builder() + .skillSetId("F0789IJKL") + .build(); + SlackbotSkillSetsLibraryRemoveResponse response = methods.slackbotSkillSetsLibraryRemove(request); + + // Inspect the response + System.out.println(response); + } +}