Sha256: c8bee5e1163605cc39963cf0fdee333a610cfae9a8a871f770a7ee3989f3a199

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

# Get affiliations
pubsub.affiliations do |aff|
  aff == {
    :member     => [],
    :none       => [],
    :outcast    => [],
    :owner      => [],
    :publisher  => []
  }
end

# Get subscriptions
pubsub.subscriptions do |sub|
  sub == {
    :none         => [],
    :pending      => [],
    :subscribed   => [],
    :unconfigured => []
  }
end

# Get nodes
pubsub.nodes(path = nil) do |nodes|
  nodes == [
    DiscoItems::Item
      .jid
      .node
      .name
  ]
end

# Get node
pubsub.node(path = nil) do |node|
  node = Node
    .attributes = {
      [form data fields]
    }
    .type = '(leaf|collection)'
    .feature = ''
    .items(ids = [], :max => nil) { |list_of_items| }
end

# Get node items
pubsub.items(path = '' | ids = [], max = nil) do |node_items|
  node_items = [
    Item
      .jid
      .id
      .name
      .payload
  ]
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blather-0.2.2 examples/pubsub/pubsub_dsl.rb