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

scuttle-gathering

v1.3.6

Published

Returns a set of functions as an API for validating, building, publishing and reading records related to gatherings

Downloads

19

Readme

scuttle-gathering

Returns a set of functions as an API for validating, building, publishing and reading records related to gatherings

Usage

var Scuttle = require('scuttle-gathering')
var scuttle = Scuttle(server) // a scuttlebutt server or connection to one

scuttle.get(gatheringKey, (err, niceDataObject) => { ... })

API Methods

scuttle.post(opts, cb)

alias of: scuttle.gathering.async.publish

opts : an Object of form (title and startDateTime are the only required properties)

{
  title: String,
  startDateTime: {
    epoch: UnixTime,
    tz: String           // tz is optional
  },
  progenitor: MessageId, // optional
  description: String,   // optional
  location: String,      // optional
  image: {               // optional
    link: Blob,
    name: String,        // name, size, type are optional
    size: Integer,
    type: MimeTypeString
  },
  mentions: Array,       // optional
  recps: Array           // optional
}

The mentions and recps Arrays require elements that are of form FeedId or { link: FeedId, name: String }. If recps is are provided, the gathering and all interactions with it will be private (encrypted to the listed recps). A maximum of 7 recps can be provided, and you must manually include yourself (if you want to be able to see the gathering in future)

cb : a callback of signature (err, data)

scuttle.put(gatheringKey, opts, cb)

alias of scuttle.update.async.publish

gatheringKey is a messageId for your gathering opts is an Object of any of the gathering details you'd like to update (title, startDateTime, description, location, image, etc in the appropriate formats)

cb : a callback of signature (err, data)

scuttle.attending(gatheringKey, isAttending, cb)

alias of scuttle.attendee.async.publish

Publishes a message updating whether or not you're attending the gathering.

gatheringKey is a messageId for your gathering isAttending is a Boolean cb : a callback of signature (err, data)

NOTE - can also be called scuttle.attendee(key, cb) which is the same as saying isAttending true

scuttle.get(gatheringKey, cb)

alias of scuttle.gathering.async.get

Gets a 'document' - a reduced state of the 'gathering as a whole' of the form:

{
  key: MessageId,
  title: String,
  startDateTime: {
    epoch: UnixTime,
    tz: String                 // *
  },
  progenitor: MessageId,
  description: String,
  location: String,
  image: {
    link: Blob,
    name: String,             // *
    size: Integer,            // *
    type: MimeTypeString      // *
  },
  images: [ Image, Image, ... ] // Objects of same form as image property
  isAttendee: Boolean,
  attendees: [ FeedId, FeedId, ... ],
  notAttendees: [ FeedId, FeedId, ... ], // people who have explicitly said they are not coming, or cancelled
  heads: [ MessageId, .... ], // most recent message(s) in the document/ thread
  threads: [ MessageId, ... ] // all backlinks in causal order
}

Strings that haven't been set will be empty strings, sub-properties marked with * are optional and may not be present.

License

AGPL-3.0