Skip to content

knubie/ruby-ddp-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby DDP Client

A minimal DDP client for ruby. Uses faye-websocket, an EventMachine based websocket client.

##Example usage

posts = nil
EM.run do
  ddp_client = RubyDdp::Client.new('localhost', 3000)

  ddp_client.onconnect = lambda do |event|
    ddp_client.subscribe('posts', [post_ids]) do |result|
      posts = ddp_client.collections['posts']
      EM.stop_event_loop
    end
  end
end
posts

More info about the protocol can be found here.

About

A very simple DDP client for ruby.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%