Skip to content
Jason Dentler edited this page Jul 20, 2011 · 2 revisions

Group Proxy

A group proxy is a standard jQuery promise plus additional Group methods. Any group operation requested on this proxy will be executed as soon as the promise is resolved. For example, we can chain together client.TryCreateGroup and group.TryCreateTopic like this:

var topicProxy = client.TryCreateGroup('Chat Server','Website chat group')
	                       .TryCreateTopic('Weather chat','Chat about the weather');

A group proxy has these methods:

  • Delete()
  • GetTopics()
  • CreateTopic(name, description)
  • TryCreateTopic(name, description)
  • GetTopicByName(name)
  • GetTopic(topicId)
  • done(function (group)) provides a callback to be called when the promise is resolved.
  • fail(function (xhr, status, ex)) provides a callback to be called when the promise is rejected.