{"id":32232359,"url":"https://github.com/dv336699/angular-realtime","last_synced_at":"2025-12-12T03:06:23.270Z","repository":{"id":58239748,"uuid":"52410387","full_name":"dv336699/angular-realtime","owner":"dv336699","description":"wrapper for realtime.co messaging","archived":false,"fork":false,"pushed_at":"2016-03-14T01:47:42.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-22T11:57:11.714Z","etag":null,"topics":["angular","angularjs","realtime","realtime-framework"],"latest_commit_sha":null,"homepage":"http://realtime.co","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/dv336699.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-24T03:10:24.000Z","updated_at":"2017-02-18T23:33:04.000Z","dependencies_parsed_at":"2022-08-31T00:40:23.178Z","dependency_job_id":null,"html_url":"https://github.com/dv336699/angular-realtime","commit_stats":null,"previous_names":["diego-vieira/angular-realtime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dv336699/angular-realtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dv336699%2Fangular-realtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dv336699%2Fangular-realtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dv336699%2Fangular-realtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dv336699%2Fangular-realtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dv336699","download_url":"https://codeload.github.com/dv336699/angular-realtime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dv336699%2Fangular-realtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280431502,"owners_count":26329786,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["angular","angularjs","realtime","realtime-framework"],"created_at":"2025-10-22T11:57:11.142Z","updated_at":"2025-10-22T11:57:12.234Z","avatar_url":"https://github.com/dv336699.png","language":"JavaScript","readme":"## Realtime Framework\nhttp://realtime.co\n\nWrapper for [Realtime Framework](http://messaging-public.realtime.co/documentation/javascript/2.1.0/OrtcClient.html)\n\n## Demo\nhttp://plnkr.co/edit/EVUDzF57RQe2cfdBznqp?p=preview\n\n## Quick Start\nSubscribe for Realtime Cloud Messaging at https://accounts.realtime.co/subscriptions/ and get your Application Key.\n\n\nInstall the module\n```\nbower install angular-realtime\n```\n\nAdd ```realtime``` to your app dependency\n```javascript\nangular.module('app', ['realtime'])\n```\n\nAdd ```$realtime``` to your controller, set credentials, listen for the onConnected event, subscribe to one or more channels, listen for the onSubscribed event, send a message.\n```javascript\nangular.module('app', ['realtime'])\n.controller('appCtrl', function($scope, $realtime) {\n    $realtime.setCredentials('SET YOUR APP KEY', 'SET YOUR USER AUTH TOKEN');\n    \n    var channel1 = 'MYCHANNEL1';\n    var channel2 = 'MYCHANNEL2';\n    \n    // Once we're connected, subscribe to the channel\n    $scope.$on('realtime:onConnected', function() {\n      $realtime.subscribe(channel1);\n      $realtime.subscribe(channel2);\n    });\n\n    // Listen for the onSubscribed event and send some messages\n    // The event will be in the following format:\n    // realtime:CHANNEL_NAME:onSubscribed\n    $scope.$on('realtime:' + channel1 + ':onSubscribed', function(event, ortc) {\n      $realtime.send(channel1, 'Message on Channel: ' + channel1); // string\n      $realtime.send(channel1, { user: 'user1', message: 'Message on Channel: ' + channel1}); // object\n    });\n\n    $scope.$on('realtime:' + channel2 + ':onSubscribed', function(event, ortc) {\n      $realtime.send(channel2, 'Message on Channel: ' + channel2); // string\n      $realtime.send(channel2, { user: 'user2', message: 'Message on Channel: ' + channel2}); // object\n    });\n    \n    // Listen for the onMessage event\n    // realtime:CHANNEL_NAME:onMessage\n    \n    // If you are setting message to a $scope var, you might need to use $scope.$apply(); for changes to take effect\n    $scope.$on('realtime:' + channel1 + ':onMessage', function(event, message) {\n        console.log('got message1', message);\n    });\n    \n    $scope.$on('realtime:' + channel2 + ':onMessage', function(event, message) {\n        console.log('got message2', message);\n    });\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdv336699%2Fangular-realtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdv336699%2Fangular-realtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdv336699%2Fangular-realtime/lists"}