{"id":21873950,"url":"https://github.com/aguxez/connector","last_synced_at":"2026-05-17T18:10:46.060Z","repository":{"id":136977194,"uuid":"131238998","full_name":"aguxez/connector","owner":"aguxez","description":"SignalR client written in Elixir. [Usable but still WIP]","archived":false,"fork":false,"pushed_at":"2018-07-24T18:48:44.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T17:37:16.314Z","etag":null,"topics":["elixir","signalr"],"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/aguxez.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-27T03:10:07.000Z","updated_at":"2018-07-24T18:48:45.000Z","dependencies_parsed_at":"2023-05-02T17:47:37.609Z","dependency_job_id":null,"html_url":"https://github.com/aguxez/connector","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/aguxez%2Fconnector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguxez%2Fconnector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguxez%2Fconnector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguxez%2Fconnector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aguxez","download_url":"https://codeload.github.com/aguxez/connector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880661,"owners_count":20525515,"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","signalr"],"created_at":"2024-11-28T07:10:03.591Z","updated_at":"2026-05-17T18:10:41.018Z","avatar_url":"https://github.com/aguxez.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connector - SignalR client for Elixir.\n\n## Installation\n\nNot available in Hex, use Github's.\n\n```elixir\ndef deps do\n  [\n    {:connector, github: \"aguxez/connector\"}\n  ]\nend\n```\n\n## Usage\nThe process is pretty straight forward, you'll want to create a `start_link` function for your module and add it to your Supervision tree. `Connector.Interface.start_link/1` expects a map as the argument, it has required keys, example:\n\n```elixir\n# Let's suppose you're going to connect to Bittrex websocket API.\nstate = %{\n  base_url: \"https://socket.bittrex.com/signalr\",\n  ws_url: \"wss://socket.bittrex.com/signalr\",\n  transport: \"webSockets\",\n  negotiate_query: %{\n    connection_data: [%{name: \"c2\"}]\n  },\n  connect_query: %{\n    connection_data: [%{name: \"c2\"}]\n  },\n  start_query: %{\n    connection_data: [%{name: \"c2\"}]\n  },\n  mod: MyApp.Module\n}\n```\n\"webSockets\" is the only transport supported for now.\n\n`:mod` is the module that will implement the `handle_message/2` callback. In this case `MyApp.Module.handle_message(frame, text)` will be the the module handling data incoming from the websocket.\n\n### Example\n```elixir\ndefmodule MyApp.Module do\n  @moduledoc false\n\n  use Connector\n\n  def start_link do\n    # Bittrex websocket args\n    state = %{\n      base_url: \"https://socket.bittrex.com/signalr\",\n      ws_url: \"wss://socket.bittrex.com/signalr\",\n      transport: \"webSockets\",\n      negotiate_query: %{\n        connection_data: [%{name: \"c2\"}]\n      },\n      connect_query: %{\n        connection_data: [%{name: \"c2\"}]\n      },\n      start_query: %{\n        connection_data: [%{name: \"c2\"}]\n      },\n      mod: MyApp.Module\n    }\n\n    Connector.Interface.start_link(state)\n  end\n\n  def handle_message({:text, msg}, state) do\n    msg\n    |\u003e Jason.decode!()\n    |\u003e IO.inspect()\n\n    {:ok, state}\n  end\nend\n```\n\n`handle_message/2` should return `{:ok, state}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faguxez%2Fconnector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faguxez%2Fconnector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faguxez%2Fconnector/lists"}