{"id":18017533,"url":"https://github.com/cakekindel/slack-blocks-rs","last_synced_at":"2025-07-28T07:05:47.736Z","repository":{"id":37177121,"uuid":"264480964","full_name":"cakekindel/slack-blocks-rs","owner":"cakekindel","description":"slack messages at warp speed!","archived":false,"fork":false,"pushed_at":"2023-08-29T17:41:34.000Z","size":470,"stargazers_count":16,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T07:51:20.381Z","etag":null,"topics":["data-structures","json","library","models","rust","rust-crate","rust-library","slack","slack-block-kit","slack-messages"],"latest_commit_sha":null,"homepage":"https://docs.rs/slack-blocks/latest","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cakekindel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-16T16:40:51.000Z","updated_at":"2023-04-14T04:58:46.000Z","dependencies_parsed_at":"2022-08-17T23:45:33.920Z","dependency_job_id":null,"html_url":"https://github.com/cakekindel/slack-blocks-rs","commit_stats":null,"previous_names":["cakekindel/slack-block-kit-rs"],"tags_count":92,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakekindel%2Fslack-blocks-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakekindel%2Fslack-blocks-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakekindel%2Fslack-blocks-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakekindel%2Fslack-blocks-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cakekindel","download_url":"https://codeload.github.com/cakekindel/slack-blocks-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245722812,"owners_count":20661830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","json","library","models","rust","rust-crate","rust-library","slack","slack-block-kit","slack-messages"],"created_at":"2024-10-30T04:23:31.102Z","updated_at":"2025-03-26T19:33:56.964Z","avatar_url":"https://github.com/cakekindel.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/slack-blocks.svg)](https://crates.io/crates/slack-blocks)\n[![docs.rs](https://docs.rs/slack-blocks/badge.svg)](https://docs.rs/slack-blocks/latest)\n![Maintenance](https://img.shields.io/badge/maintenance-activly--developed-brightgreen.svg)\n\n# slack-blocks\n\nThis crate brings Slack's terrific [Block Kit 🔗] to\nthe Rust ecosystem.\n\nInside, you'll find models for all of Slack's Layout Blocks,\nBlock Elements, and Composition Objects. Each structure has Slack's API\ndocumentation copied in-place so you don't have to leave your editor to\nremember the details of the block kit API.\n\nEvery model has builders that leverage Rust's type system\nto help you provide every required field, so you can be confident in your app.\n\n### Troubleshooting common compiler errors\n`Method build not found for ...Builder` - Dig into the error message,\nyou'll find something like `RequiredMethodNotCalled\u003cmethod::foo\u003e`,\nmeaning you need to call `.foo()` before you can call `.build()`!\n\n## Example\nUsing an example from Slack's Documentation:\n```json\n{\n  \"type\": \"section\",\n  \"text\": {\n    \"text\": \"*Sally* has requested you set the deadline for the Nano launch project\",\n    \"type\": \"mrkdwn\"\n  },\n  \"accessory\": {\n    \"type\": \"datepicker\",\n    \"action_id\": \"datepicker123\",\n    \"initial_date\": \"1990-04-28\",\n    \"placeholder\": {\n      \"type\": \"plain_text\",\n      \"text\": \"Select a date\"\n    }\n  }\n}\n```\n\nYou can use raw Builders like so:\n```rust\nuse slack_blocks::{text::ToSlackMarkdown, blocks::Section, elems::DatePicker};\n\nlet section = Section::builder()\n                      .text(\"*Sally* has requested you set the deadline for the Nano launch project\".markdown())\n                      .accessory(DatePicker::builder()\n                                            .action_id(\"datepicker123\")\n                                            .initial_date((28, 4, 1990))\n                                            .placeholder(\"Select a date\")\n                                            .build()\n                      )\n                      .build();\n```\n\nOr enable the `unstable` feature and use xml macros:\n```rust\nuse slack_blocks::blox::*;\n\nlet pick_date = blox! {\n  \u003cdate_picker action_id=\"datepicker123\"\n               placeholder=\"Select a date\"\n               initial_date=(28, 4, 1990) /\u003e\n};\n\nlet section = blox! {\n  \u003csection_block accessory=pick_date\u003e\n    \u003ctext kind=plain\u003e\"*Sally* has requested you set the deadline for the Nano launch project\"\u003c/text\u003e\n  \u003c/section_block\u003e\n};\n```\n\n[Block Kit 🔗]: https://api.slack.com/block-kit\n[`cargo-make`]: https://github.com/sagiegurari/cargo-make/\n[issues]: https://github.com/cakekindel/slack-blocks-rs/issues/\n[Conventional Commits]: https://www.conventionalcommits.org/en/v1.0.0/\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakekindel%2Fslack-blocks-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcakekindel%2Fslack-blocks-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakekindel%2Fslack-blocks-rs/lists"}