{"id":20017812,"url":"https://github.com/rvmoldova/live-front-ws-module","last_synced_at":"2025-03-02T03:16:40.957Z","repository":{"id":58245702,"uuid":"51094920","full_name":"rvmoldova/live-front-ws-module","owner":"rvmoldova","description":"Module what links to WS api","archived":false,"fork":false,"pushed_at":"2016-02-08T16:37:07.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T16:11:24.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/rvmoldova.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-02-04T18:07:46.000Z","updated_at":"2016-04-28T12:26:26.000Z","dependencies_parsed_at":"2022-08-30T22:50:24.258Z","dependency_job_id":null,"html_url":"https://github.com/rvmoldova/live-front-ws-module","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/rvmoldova%2Flive-front-ws-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvmoldova%2Flive-front-ws-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvmoldova%2Flive-front-ws-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvmoldova%2Flive-front-ws-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvmoldova","download_url":"https://codeload.github.com/rvmoldova/live-front-ws-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241451674,"owners_count":19964901,"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":[],"created_at":"2024-11-13T08:18:34.189Z","updated_at":"2025-03-02T03:16:40.939Z","avatar_url":"https://github.com/rvmoldova.png","language":"JavaScript","readme":"\n# Module to connect to WS api\n\n##### Just install it via Bower\n\n```\nbower install --save live-front-ws-module\n```\n\n I made this plugin for one of my projects.\n\n\n To init it:\n\n ```\n var LM = new LiveModule('ws://localhost:1235', {\n   debug: false, // VERBOSE\n   reconnect: true, // On fail, try to reconnect each second,\n   onDisconnectCallback: function(rs) { // callbacks\n     console.log(rs)\n   },\n   onConnectCallback: function(rs) { // callbacks\n     console.log(rs)\n   },\n   onErrorCallback: function(rs) { // callbacks\n     console.log(rs)\n   }\n });\n ```\n\n\n And other examples:\n\n ```\n LM.connect(); // connect to websocket;\n\n\n LM.auth('token'); // auths with token;\n\n\n LM.subscribe('chat', function(rs) {    // subscribe to channel chat\n   console.log('Receive from channel chat', rs)\n });\n\n LM.unsubscribe('chat');  // unsubscribe to channel chat\n\n ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvmoldova%2Flive-front-ws-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvmoldova%2Flive-front-ws-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvmoldova%2Flive-front-ws-module/lists"}