{"id":21313748,"url":"https://github.com/vanderhoop/slender_channel","last_synced_at":"2025-03-15T21:13:44.412Z","repository":{"id":57549149,"uuid":"89315211","full_name":"vanderhoop/slender_channel","owner":"vanderhoop","description":"A small, dependency-free module that exposes helpful macros for working with Phoenix Channels.","archived":false,"fork":false,"pushed_at":"2020-05-31T02:59:18.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T10:15:03.305Z","etag":null,"topics":["elixir","elixir-library","hex-package","phoenix-channels","phoenix-framework"],"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/vanderhoop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-25T03:52:19.000Z","updated_at":"2022-09-21T19:16:04.000Z","dependencies_parsed_at":"2022-08-27T01:40:30.095Z","dependency_job_id":null,"html_url":"https://github.com/vanderhoop/slender_channel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanderhoop%2Fslender_channel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanderhoop%2Fslender_channel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanderhoop%2Fslender_channel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanderhoop%2Fslender_channel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanderhoop","download_url":"https://codeload.github.com/vanderhoop/slender_channel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790999,"owners_count":20348385,"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":["elixir","elixir-library","hex-package","phoenix-channels","phoenix-framework"],"created_at":"2024-11-21T18:08:31.763Z","updated_at":"2025-03-15T21:13:44.388Z","avatar_url":"https://github.com/vanderhoop.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/vanderhoop/slender_channel.svg?style=shield)](https://circleci.com/gh/stride-nyc/remote_retro)\n[![Hex.pm](https://img.shields.io/hexpm/v/slender_channel.svg)]()\n\n# SlenderChannel\n\nA small, dependency-free module that exposes helpful macros for working with Phoenix Channels.\n\n## Usage\n\nThe package can be installed by adding `slender_channel` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:slender_channel, \"~\u003e 0.2.0\"}]\nend\n```\n\nTo leverage `SlenderChannel`'s macros, simply `use` it within your Phoenix Channel:\n\n```elixir\ndefmodule YourPhoenixApp.YourChannel do\n  use YourPhoenixApp.Web, :channel\n  use SlenderChannel\n\n  # ...\nend\n```\n\nAnd leverage the macros within said channel.\n\n```elixir\nhandle_in_and_broadcast \"bobby_dumped_stacy\", %{\"pettiness\" =\u003e 10}\n\nhandle_in_and_broadcast_from \"urgent message\", %{\"ETA\" =\u003e \"10 minutes\"}\n```\n\nUnder the hood, becomes:\n\n```elixir\ndef handle_in(\"bobby_dumped_stacy\", %{\"pettiness\" =\u003e 10}, socket)\n  Phoenix.Channel.broadcast! socket, \"bobby_dumped_stacy\", %{\"pettiness\" =\u003e 10}\n  {:noreply, socket}\nend\n\ndef handle_in(\"urgent message\", %{\"ETA\" =\u003e \"10 minutes\"}, socket) do\n  Phoenix.Channel.broadcast_from! socket, \"urgent message\", %{\"ETA\" =\u003e \"10 minutes\"}\n  {:noreply, socket}\nend\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanderhoop%2Fslender_channel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanderhoop%2Fslender_channel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanderhoop%2Fslender_channel/lists"}