{"id":31055550,"url":"https://github.com/currency-one/deepstream-ruby","last_synced_at":"2025-09-15T04:53:49.295Z","repository":{"id":51057342,"uuid":"41860408","full_name":"Currency-One/deepstream-ruby","owner":"Currency-One","description":"deepstream.io ruby client","archived":false,"fork":false,"pushed_at":"2021-05-25T11:01:43.000Z","size":123,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-21T01:41:15.869Z","etag":null,"topics":["deepstream","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Currency-One.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-03T13:12:13.000Z","updated_at":"2021-05-25T11:01:45.000Z","dependencies_parsed_at":"2022-08-19T00:01:29.107Z","dependency_job_id":null,"html_url":"https://github.com/Currency-One/deepstream-ruby","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Currency-One/deepstream-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Currency-One%2Fdeepstream-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Currency-One%2Fdeepstream-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Currency-One%2Fdeepstream-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Currency-One%2Fdeepstream-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Currency-One","download_url":"https://codeload.github.com/Currency-One/deepstream-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Currency-One%2Fdeepstream-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275207874,"owners_count":25423896,"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-09-15T02:00:09.272Z","response_time":75,"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":["deepstream","ruby"],"created_at":"2025-09-15T04:53:45.492Z","updated_at":"2025-09-15T04:53:49.283Z","avatar_url":"https://github.com/Currency-One.png","language":"Ruby","readme":"# deepstream-ruby\n\ndeepstream.io ruby client\ndeepstream version \u003e5 needed\n\n[![Gem Version](https://badge.fury.io/rb/deepstream.svg)](http://badge.fury.io/rb/deepstream)\n[![Gem License](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/Currency-One/deepstream-ruby/blob/master/LICENSE)\n\n## Installation\n\n```\ngem install deepstream\n```\n\n## Usage\n\n### Client initialization\n```ruby\nds = Deepstream::Client.new('localhost')\n# or\nds = Deepstream::Client.new('ws://localhost:6020')\n# or\nds = Deepstream::Client.new('ws://localhost:6020/deepstream-v3',\n  ack_timeout: nil, # ACK timeout; if nil, then the client never checks ACK timeout errors\n  credentials: { username: 'John', password: 'Doe' }, # credentials used to authorise the client\n  heartbeat_interval: nil # when two server heartbeats are missed the client considers the connection to be lost\n  emit_timeout: 0, # if 0, then events that failed to be emitted are thrown away\n                   # if nil, then events are stored in a buffer, waiting for reconnection\n                   # if another number, then events are stored in a buffer and sent if the client reconnects in emit_timeout seconds\n  verbose: false, # show verbose information about connection, incoming and outgoing messages etc.\n  debug: false, # use for testing only; if true, any exception will terminate the client\n  in_thread: true # if true, putting client in separated thread\n  )\n# log in to the server\nds.login\n# you can use new credentials too\nds.login(username: 'John', password: 'betterDoe')\n# check if the websocket connection is opened\nds.connected?\n# check if the client is logged in\nds.logged_in?\n```\n### Events\n```ruby\n# emit an event\nds.emit('my_event')\n# or\nds.emit('my_event', foo: 'bar', bar: 'foo')\n# or\nds.emit('my_event', foo: 'bar', bar: 'foo', timeout: 10) # emit with a custom timeout\n# subscribe to events\nds.on('my_event') { |data| puts data }\n```\n### Records\n```ruby\n# get a record\n# list is an optional argument; when given, the client adds the record to a list with given name\nfoo = ds.get('foo', list: 'bar')\n# or\nfoo = ds.get_record('foo', list: 'bar')\n# Update a record\nfoo.set('bar', 'bar') # update 'bar' attribute\n# or\nfoo.bar = 'bar'\n# or set the whole record data at once\nfoo.set(bar: 'bar', baz: 'baz')\n```\n### Lists\n```ruby\n# get a list\nfoo = ds.get_list('foo')\n# add to the list\nfoo.add('bar')\n# Remove from list\nfoo.remove('foo')\n# show record names in the list\nfoo.data\n# or\nfoo.keys\n# get records from the list\nfoo.all\n# callbacks\nfoo.on(:added) { |record|  }\nfoo.on(:removed) { |record|  }\n```\n\n\n## Development\n\n```bash\ngit submodule update --init --recursive\n```\n\n\n## To Do\n\nAdjust tests, to work with new version (without celluloid)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurrency-one%2Fdeepstream-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurrency-one%2Fdeepstream-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurrency-one%2Fdeepstream-ruby/lists"}