Home

Awesome

patchcore gatherings depject plugin for secure scuttlebutt

gives pull-stream sources and async methods for finding and publishing gatherings on secure scuttlebutt

patch-gatherings in patchbay

Needs

exports.needs = nest({
  'sbot.pull.messagesByType': 'first',
  'sbot.pull.links': 'first',
})

Gives

exports.gives = nest({
  'gatherings.pull': [
    'find'
  ],
  'gatherings.async': [
    'create',
    'title',
    'description',
    'contributors',
    'startDateTime',
    'endDateTime',
    'location',
    'hosts',
    'attendees',
    'images',
  ]
  'gatherings.html': [
    'attendees', //TODO
    'contributors', //TODO
    'create',
    'description',
    'endDateTime', //TODO
    'hosts', //TODO
    'images',
    'layout': [
      'default',
      'mini', 
    ],
    'location', //TODO
    'render',
    'startDateTime',
    'thumbnail', 
    'title',
  ],
  'gatherings.obs': [
    'gathering'
  ],
  'message.html': [
    'render'
  ],
})

How gathering messages work

A gathering message is extremely simple. It is little more than intent to have a gathering. Location, time, description etc are all about messages that link to the gathering message. Hopefully we can reuse these about messages to add metadata on completely different things. Examples could be publishing a location message about a pub or a photo.

API

gatherings.pull.find(opts={}, cb)

Returns a new pull-stream of gatherings. Valid opts keys include

gatherings.async.create(opts={}, cb)

Creates a new gathering message and calls cb when done.

gatherings.async.title(opts={}, cb)

Sets the title of the gathering and calls cb when done. Valid opts keys include

gatherings.async.startDateTime(opts={}, cb)

Sets the utc start dateTime of the gathering and calls cb when done. Valid opts keys include

gatherings.async.endDateTime(opts={}, cb)

Sets the utc end dateTime of the gathering and calls cb when done. Valid opts keys include

gatherings.async.location(opts={}, cb)

Sets the physical location of the gathering and calls cb when done. Valid opts keys include

gatherings.async.description(opts={}, cb)

Sets the physical location of the gathering and calls cb when done. Valid opts keys include

gatherings.async.hosts(opts={}, cb)

Adds or removes hosts of the gathering and calls cb when done. Valid opts keys include

eg:

gatherings.async.hosts({
  gathering: '',
  hosts: [
    {id: ''},  //adds the host 
    {id: '', remove: true}, // removes the host 
  ]
}, err => console.log(err))

gatherings.async.images(opts={}, cb)

Adds or removes images of the gathering and calls cb when done. Valid opts keys include

gatherings.async.images({
  gathering: '',
  images: [
    {id: ''},  //adds the image 
    {id: '', remove: true}, // removes the image 
  ]
}, err => console.log(err))

gatherings.async.attendees(opts={}, cb)

Adds or removes attendees of the gathering and calls cb when done. Valid opts keys include

eg:

gatherings.async.attendees({
  gathering: '',
  attendees: [
    {id: ''},  //adds the attendee
    {id: '', remove: true}, // removes the attendee 
  ]
}, err => console.log(err))

gatherings.async.contributors(opts={}, cb)

Adds or removes contributors of the gathering and calls cb when done. Valid opts keys include

eg:

gatherings.async.contributors({
  gathering: '',
  contributors: [
    {id: ''},  //adds the contributor
    {id: '', remove: true}, // removes the contributor 
  ]
}, err => console.log(err))

Install

With npm installed, run

$ npm install sbot-gatherings

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Prior art

Acknowledgments

sbot-gatherings wouldn't be a thing with out the help and encouragement of mixmix and ahdinosaur.

See Also

patchbay-gatherings as an example of how to wire patch-gatherings into a client

License

ISC