{"id":19468274,"url":"https://github.com/skrepr/teams-connector","last_synced_at":"2025-04-25T11:32:21.881Z","repository":{"id":50315600,"uuid":"414607600","full_name":"skrepr/teams-connector","owner":"skrepr","description":"This package allows you to send notifications to Microsoft Teams.","archived":false,"fork":false,"pushed_at":"2023-02-09T17:10:47.000Z","size":30,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-01T10:17:42.609Z","etag":null,"topics":["composer","microsoft","packagist","php","teams"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/skrepr/teams-connector","language":"PHP","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/skrepr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null}},"created_at":"2021-10-07T13:14:23.000Z","updated_at":"2024-01-04T23:54:29.000Z","dependencies_parsed_at":"2022-08-28T05:11:24.124Z","dependency_job_id":null,"html_url":"https://github.com/skrepr/teams-connector","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/skrepr%2Fteams-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrepr%2Fteams-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrepr%2Fteams-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrepr%2Fteams-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skrepr","download_url":"https://codeload.github.com/skrepr/teams-connector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223999713,"owners_count":17238974,"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":["composer","microsoft","packagist","php","teams"],"created_at":"2024-11-10T18:40:23.286Z","updated_at":"2024-11-10T18:40:24.483Z","avatar_url":"https://github.com/skrepr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://skrepr.com/\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg width=\"200\" height=\"100\" src=\"https://skrepr.com/theme/skrepr/img/skrepr.svg?a3d5f79941\" alt=\"skrepr\" /\u003e\n  \u003c/p\u003e\n\u003c/a\u003e\n\u003ch1 align=\"center\"\u003eTeams connector\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/skrepr/teams-connector.svg\" alt=\"Releases\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/skrepr/teams-connector\" alt=\"LICENSE\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/skrepr/teams-connector.svg\" alt=\"Issues\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/pulls\"\u003e\u003cimg src=\"https://img.shields.io/github/issues-pr/skrepr/teams-connector.svg\" alt=\"PR\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/commit-activity/m/skrepr/teams-connector\" alt=\"Commits\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/stars\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/skrepr/teams-connector.svg\" alt=\"Stars\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n  \u003ca href=\"https://github.com/skrepr/teams-connector/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/skrepr/teams-connector.svg\" alt=\"Forks\"/\u003e\u003c/a\u003e\u003ca\u003e \u003c/a\u003e\n\u003c/div\u003e\n\nThis package allows you to send notifications to Microsoft Teams.\n\n## Installation\n\nYou can install the package using the [Composer](https://getcomposer.org/) package manager. You can install it by running this command in your project root:\n\n```sh\ncomposer require skrepr/teams-connector\n```\n\nThen [create an incoming webhook](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) on your Microsoft teams channel for the package to use.\n\n## Basic Usage\n\n### Create a simple card\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Skrepr\\TeamsConnector\\Card;\nuse Skrepr\\TeamsConnector\\CardInterface;\nuse Skrepr\\TeamsConnector\\Client;\n\n$endPoint = 'https://...';\n$httpClient = new \\GuzzleHttp\\Client();\n$teamsClient = new Client($endPoint, $httpClient);\n\n$card = (new Card('Larry Bryant created a new task'))\n    -\u003esetText('Yes, he did')\n    -\u003esetThemeColor(CardInterface::STATUS_DEFAULT)\n    -\u003esetTitle('Adding Title to the card');\n\n$teamsClient-\u003esend($card);\n```\n\n### Adding a section\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Skrepr\\TeamsConnector\\Card;\nuse Skrepr\\TeamsConnector\\Client;\nuse Skrepr\\TeamsConnector\\Section\\Section;\n\n$endPoint = 'https://...';\n$httpClient = new \\GuzzleHttp\\Client();\n$teamsClient = new Client($endPoint, $httpClient);\n\n$card = new Card('Larry Bryant created a new task');\n\n$section = (new Section('![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)Larry Bryant created a new task'))\n    -\u003esetActivitySubtitle('On Project Tango')\n    -\u003esetActivityImage('https://teamsnodesample.azurewebsites.net/static/img/image5.png')\n    -\u003eaddFact('Assigned to', 'Unassigned')\n    -\u003eaddFact('Due date', 'Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)');\n\n$card-\u003eaddSection($section);\n\n$teamsClient-\u003esend($card);\n```\n\n### Adding actions and inputs to the card\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Skrepr\\TeamsConnector\\Actions\\ActionCard;\nuse Skrepr\\TeamsConnector\\Actions\\HttpPostAction;\nuse Skrepr\\TeamsConnector\\Card;\nuse Skrepr\\TeamsConnector\\Client;\nuse Skrepr\\TeamsConnector\\Inputs\\TextInput;\n\n$endPoint = 'https://...';\n$httpClient = new \\GuzzleHttp\\Client();\n$teamsClient = new Client($endPoint, $httpClient);\n\n$card = new Card('Larry Bryant created a new task');\n$card-\u003esetText('Yes, he did');\n\n$actionCard = (new ActionCard('Add a comment'))\n    -\u003eaddInput(new TextInput('comment', 'Add a comment here for this task'))\n    -\u003eaddAction(new HttpPostAction('Add comment', 'http://...'));\n\n$card-\u003eaddPotentialAction($actionCard);\n\n$teamsClient-\u003esend($card);\n```\n\n### HTTP Clients\nIn order to talk to Microsoft Teams API, you need an HTTP adapter. We rely on HTTPlug\nwhich defines how HTTP message should be sent and received. You can use any library to send HTTP messages\nthat implements [php-http/client-implementation](https://packagist.org/providers/php-http/client-implementation).\n\n## Testing\n``` bash\ncomposer test\n```\n\n## Credits\n- [Skrepr](https://skrepr.com)\n- [Evert Jan Hakvoort](https://github.com/EJTJ3)\n- [Jon Mulder](https://github.com/jonmldr)\n- [All Contributors](../../contributors)\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## License\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskrepr%2Fteams-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskrepr%2Fteams-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskrepr%2Fteams-connector/lists"}