{"id":28725469,"url":"https://github.com/yuyabee/bot_framework","last_synced_at":"2025-06-15T12:01:53.570Z","repository":{"id":45979101,"uuid":"64476025","full_name":"yuyabee/bot_framework","owner":"yuyabee","description":"Microsoft Bot Framework Client for Elixir","archived":false,"fork":false,"pushed_at":"2021-11-23T09:40:04.000Z","size":17,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T16:42:08.924Z","etag":null,"topics":["bot-framework","elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuyabee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-29T11:35:21.000Z","updated_at":"2024-06-12T03:01:29.000Z","dependencies_parsed_at":"2022-09-26T18:41:17.394Z","dependency_job_id":null,"html_url":"https://github.com/yuyabee/bot_framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuyabee/bot_framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuyabee%2Fbot_framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuyabee%2Fbot_framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuyabee%2Fbot_framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuyabee%2Fbot_framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuyabee","download_url":"https://codeload.github.com/yuyabee/bot_framework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuyabee%2Fbot_framework/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259971257,"owners_count":22940002,"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":["bot-framework","elixir"],"created_at":"2025-06-15T12:00:43.631Z","updated_at":"2025-06-15T12:01:53.563Z","avatar_url":"https://github.com/yuyabee.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BotFramework\n\n[Microsoft Bot Framework (V3)](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0) Client in Elixir.\n\n## Installation\n\n  1. Add `bot_framework` to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:bot_framework, \"~\u003e 0.2.0\"}]\n  end\n  ```\n\n  2. Ensure `bot_framework` is started before your application:\n\n  ```elixir\n  def application do\n    [applications: [:bot_framework]]\n  end\n  ```\n\n  3. Configure API key:\n\n  ```elixir\n  config :bot_framework,\n    client_id: \"CLIENT_ID\",\n    client_secret: \"CLIENT_SECRET\"\n  ```\n\n## Usage with [Phoenix framework](https://github.com/phoenixframework/phoenix)\n\n  1. Define route:\n  ```elixir\n  defmodule BotTest.Router do\n    use BotFramework.Phoenix.Router\n\n    # ... other stuff ...\n\n    scope \"/api\", BotTest do\n      bf_handler \"/handle_message\", MessageController\n    end\n  end\n  ```\n\n  2. Write handler(See [BotFramework.Callback](lib/bot_framework/callback.ex) for more information)\n  ```elixir\n  defmodule BotTest.MessageController do\n    use BotTest.Web, :controller\n    use BotFramework.Phoenix.Controller\n\n    alias BotFramework.Models.{Activity}\n\n    # handle text message\n    def handle_activity(%Activity{type: \"message\", text: text}) when is_bitstring(text) do\n      case text |\u003e String.downcase do\n        \"hi\" -\u003e [text: \"Hi this is a bot\"]\n        \"how are you?\" -\u003e [text: \"Good. Thanks. And you?\"]\n        \"hero\" -\u003e\n          [text: \"Hero sample\", attachments: [%{\n             contentType: \"application/vnd.microsoft.card.hero\",\n             content: %{\n               title: \"I'm a hero card\",\n               subtitle: \"Search Google\",\n               images: [\n                 %{ url: \"https://www.gstatic.com/webp/gallery3/1_webp_a.png\" },\n               ],\n               buttons: [%{\n                 type: \"openUrl\",\n                 title: \"Google\",\n                 value: \"https://www.google.com\"\n               }]\n           }}]]\n        \"bad\" -\u003e [text: \"Okay\"]\n        \"fine\" -\u003e [text: \"Okay\"]\n        _ -\u003e [text: \"Pardon me?\"]\n      end\n    end\n\n    # handle attachments\n    def handle_activity(%Activity{type: \"message\", text: nil, attachments: attachments}) do\n      # do something with the attachments\n      [text: \"Received attachment\"]\n    end\n  end\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuyabee%2Fbot_framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuyabee%2Fbot_framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuyabee%2Fbot_framework/lists"}