{"id":43583811,"url":"https://github.com/aenario/cozy-realtime-adapter","last_synced_at":"2026-02-04T00:10:34.603Z","repository":{"id":8246349,"uuid":"9691716","full_name":"aenario/cozy-realtime-adapter","owner":"aenario","description":null,"archived":false,"fork":false,"pushed_at":"2014-06-30T14:34:01.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-11T16:07:48.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","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/aenario.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":"2013-04-26T09:19:32.000Z","updated_at":"2014-06-30T14:30:49.000Z","dependencies_parsed_at":"2022-08-06T23:15:38.213Z","dependency_job_id":null,"html_url":"https://github.com/aenario/cozy-realtime-adapter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/aenario/cozy-realtime-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenario%2Fcozy-realtime-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenario%2Fcozy-realtime-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenario%2Fcozy-realtime-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenario%2Fcozy-realtime-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aenario","download_url":"https://codeload.github.com/aenario/cozy-realtime-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenario%2Fcozy-realtime-adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29062493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T23:14:54.203Z","status":"ssl_error","status_checked_at":"2026-02-03T23:14:50.873Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-04T00:10:32.842Z","updated_at":"2026-02-04T00:10:34.595Z","avatar_url":"https://github.com/aenario.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Realtime adapter\r\n\r\nHelper library for interaction with cozy-data-system data changes notifications\r\n\r\n##Server-Side : Axon -\u003e Socket.io\r\n\r\nUsage :\r\n\r\n```javascript\r\namericano.start(options, function(app, server){\r\n    app.server = server\r\n\r\n    RealtimeAdapter = require('cozy-realtime-adapter')\r\n\r\n    // notification events should be proxyed to client\r\n    realtime = RealtimeAdapter(app, ['notification.*']);\r\n    \r\n    // custom callback for alarm events\r\n    realtime.on('alarm.*', function(event, msg){\r\n        // event = 'alarm.update' or 'alarm.create' or 'alarm.delete'\r\n        // msg = id of the updated alarm\r\n    });\r\n});\r\n```\r\n\r\n\r\n##Client-Side : Socket.io -\u003e Backbone Models manipulations\r\n\r\nBasic Usage :\r\n\r\n```html\r\n\u003cscript src=\"cozy-realtime-adapter.js\"\u003e\u003c/script\u003e\r\n```\r\n\r\n```coffee\r\nclass SocketListener extends CozySocketListener\r\n\r\n    models:\r\n        'notification': Notification\r\n\r\n    events: [\r\n        'notification.create', 'notification.update', 'notification.delete'\r\n    ]\r\n\r\n    onRemoteCreate: (model) -\u003e\r\n        @collection.add model if # should model be in @collection ?\r\n\r\n    onRemoteDelete: (model) -\u003e\r\n        @collection.remove model\r\n\r\nsl = new SocketListener()\r\n\r\nsl.watch myNotificationCollection\r\n```\r\n\r\nFor more complex usages, refer to the code of cozy applications\r\n\r\n\r\n## What is Cozy?\r\n\r\n![Cozy Logo](https://raw.github.com/mycozycloud/cozy-setup/gh-pages/assets/images/happycloud.png)\r\n\r\n[Cozy](http://cozy.io) is a platform that brings all your web services in the\r\nsame private space.  With it, your web apps and your devices can share data\r\neasily, providing you\r\nwith a new experience. You can install Cozy on your own hardware where no one\r\nprofiles you. You install only the applications you want. You can build your\r\nown one too.\r\n\r\n## Community \r\n\r\nYou can reach the Cozy community via various support:\r\n\r\n* IRC #cozycloud on irc.freenode.net\r\n* Post on our [Forum](https://groups.google.com/forum/?fromgroups#!forum/cozy-cloud)\r\n* Post issues on the [Github repos](https://github.com/mycozycloud/)\r\n* Via [Twitter](http://twitter.com/mycozycloud)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faenario%2Fcozy-realtime-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faenario%2Fcozy-realtime-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faenario%2Fcozy-realtime-adapter/lists"}