npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

patch-gatherings

v2.4.7

Published

> [patchcore](https://github.com/ssbc/patchcore) gatherings [depject](https://github.com/depject/depject) plugin for [secure scuttlebutt](https://github.com/ssbc/secure-scuttlebutt)

Downloads

9

Readme

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

  • past (default: false) - true: Get all gatherings whose utcDateTime is from the past
  • future (default: true) - true: Get all gatherings whose utcDateTime is in the future
  • timeless (default: true) - true: Get all gatherings whose utcDateTime is not set

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

  • gathering (required) - The id of the gathering to link to.
  • title (required) - The title of the gathering

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

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

  • gathering (required) - The id of the gathering to link to.
  • utcDateTime (required) - The time of the gathering

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

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

  • gathering (required) - The id of the gathering to link to.
  • utcDateTime (required) - The time of the gathering

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

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

  • gathering (required) - The id of the gathering to link to.
  • location (required) - The location of the gathering

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

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

  • gathering (required) - The id of the gathering to link to.
  • description (required) - The description of the gathering

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

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

  • gathering (required) - The id of the gathering to link to.
  • hosts (required) - an array of hosts where each host is an object that has keys:
    • id (required) - The id of the host.
    • remove (default: false) - Remove this id as a host.

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

  • gathering (required) - The id of the gathering to link to.
  • images (required) - an array of images where each image is an object that has keys:
    • id (required) - The blob id of the image.
    • remove (default: false) - Remove this blob as an image. eg:
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

  • gathering (required) - The id of the gathering to link to.
  • attendees (required) - an array of attendees where each host is an object that has the keys:
    • id (required) - The id of the host.
    • remove (default: false) - Remove this id as an attendee.

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

  • gathering (required) - The id of the gathering to link to.
  • contributors (required) - an array of contributors where each host is an object that has the keys:
    • id (required) - The id of the host.
    • remove (default: false) - Remove this id as a contributor.

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