{"id":18643811,"url":"https://github.com/zabirauf/ex_microsoftbot","last_synced_at":"2025-04-11T12:30:46.886Z","repository":{"id":8453659,"uuid":"58184532","full_name":"zabirauf/ex_microsoftbot","owner":"zabirauf","description":"Elixir client for Microsoft bot framework","archived":false,"fork":false,"pushed_at":"2022-04-26T15:05:23.000Z","size":124,"stargazers_count":35,"open_issues_count":4,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T13:39:24.597Z","etag":null,"topics":["bot-framework","elixir-client","microsoft-bot-framework"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zabirauf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-06T06:03:18.000Z","updated_at":"2024-11-18T10:29:42.000Z","dependencies_parsed_at":"2022-08-07T04:16:34.181Z","dependency_job_id":null,"html_url":"https://github.com/zabirauf/ex_microsoftbot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Fex_microsoftbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Fex_microsoftbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Fex_microsoftbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Fex_microsoftbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zabirauf","download_url":"https://codeload.github.com/zabirauf/ex_microsoftbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248145844,"owners_count":21055215,"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-client","microsoft-bot-framework"],"created_at":"2024-11-07T06:08:21.883Z","updated_at":"2025-04-11T12:30:46.538Z","avatar_url":"https://github.com/zabirauf.png","language":"Elixir","readme":"[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/zabirauf/ex_microsoftbot/master/LICENSE.md) [![hex.pm version](https://img.shields.io/hexpm/v/httpotion.svg?style=flat)](https://hex.pm/packages/ex_microsoftbot) [![Build Status](https://travis-ci.org/zabirauf/ex_microsoftbot.svg?branch=master)](https://travis-ci.org/zabirauf/ex_microsoftbot) [![Inline docs](http://inch-ci.org/github/zabirauf/ex_microsoftbot.svg)](http://inch-ci.org/github/zabirauf/ex_microsoftbot) \u003ca href=\"http://github.com/syl20bnr/spacemacs\"\u003e\u003cimg src=\"https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg\" alt=\"Made with Spacemacs\"\u003e\u003c/a\u003e\n\nElixir Microsoft Bot Framework Client\n=====================================\n\nThis library provides Elixir API wrapper for the Microsoft Bot Framework and handles authentication and token management.\n\n## Documentation\n\nAPI documentation is available at [https://hexdocs.pm/ex_microsofbot](https://hexdocs.pm/ex_microsoftbot).\n\n## Installation\n\n1. Add `ex_microsoftbot` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:ex_microsoftbot, \"~\u003e 3.0.0\"}]\nend\n```\n\n2. Add the registered bot app id and app password in your config:\n\n```elixir\nconfig :ex_microsoftbot,\n  app_id: \"BOT_APP_ID\",\n  app_password: \"BOT_APP_PASSWORD\"\n```\n\n3. Start the `ex_microsoftbot`:\n\n```elixir\ndef application do\n  [applications: [:ex_microsoftbot]]\nend\n```\n\n## Usage\n\nThe main functionality is provided by three main modules that match each of the corresponding API endpoints of the Microsoft Bot Framework:\n\n* `ExMicrosoftBot.Client.Attachments`,\n* `ExMicrosoftBot.Client.Conversations`\n* `ExMicrosoftBot.Client.Teams`\n\nExample usage:\n\n```elixir\nalias ExMicrosoftBot.Client.Conversations\n\ndef reply(activity = %Activity{}) do\n  text = \"Hello, world!\"\n\n  resp_activity =\n    %Activity{\n      type: \"message\",\n      conversation: activity.conversation,\n      recipient: activity.from,\n      from: activity.recipient,\n      replyToId: activity.id,\n      text: text\n    }\n\n  Conversations.reply_to_activity(\n    activity.serviceUrl,\n    activity.conversation.id,\n    activity.id,\n    resp_activity\n  )\nend\n```\n\n## Config\n\nIn addition to the required auth configs mentioned in [Installation](#installation), there are a few more options available to customize this lib:\n\n```elixir\nconfig :ex_microsoftbot,\n  using_bot_emulator: false,\n  scope: \"https://api.botframework.com/.default\",\n  http_client_opts: nil\n```\n\n#### `using_bot_emulator`\n\nDefault `false`. Set this to `true` to disable the auth token manager, and instead use a fake auth token in all requests.\n\n#### `scope`\n\nDefault `\"https://api.botframework.com/.default\"`. This sets the scope used when authorizing with the BotFramework.\n\n#### `http_client_opts`\n\nThis is passed on each request to the underlying HTTP client, [HTTPoison](https://github.com/edgurgel/httpoison). See the `:options` key [in their docs here](https://hexdocs.pm/httpoison/HTTPoison.Request.html) for all available options.\n\n##### Connection Pools\n\nThis is currently undocumented in the link above, but HTTPoison allows [specifying a connection pool](https://github.com/edgurgel/httpoison#connection-pools) and other `:hackney` options via the `:hackney` atom in the HTTP options. For example, to configure this library to use the `:bot_framework` dedicated pool:\n\n```elixir\nconfig :ex_microsoft_bot,\n  http_client_opts: [\n    hackney: [pool: :bot_framework]\n  ]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabirauf%2Fex_microsoftbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzabirauf%2Fex_microsoftbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabirauf%2Fex_microsoftbot/lists"}