CPub.Web.NodeInfo (CPub v0.3.0) View Source

NodeInfo metadata exposing protocol (see https://github.com/jhass/nodeinfo/blob/main/PROTOCOL.md).

Link to this section Summary

Link to this section Types

Specs

inbound_service() ::
  :"atom1.0"
  | :gnusocial
  | :imap
  | :pnut
  | :pop3
  | :pumpio
  | :"rss2.0"
  | :twitter

Specs

outbound_service() ::
  :"atom1.0"
  | :blogger
  | :buddycloud
  | :diaspora
  | :dreamwidth
  | :drupal
  | :facebook
  | :friendica
  | :gnusocial
  | :google
  | :insanejournal
  | :libertree
  | :linkedin
  | :livejournal
  | :mediagoblin
  | :myspace
  | :pinterest
  | :pnut
  | :posterous
  | :pumpio
  | :redmatrix
  | :"rss2.0"
  | :smtp
  | :tent
  | :tumblr
  | :twitter
  | :wordpress
  | :xmpp

Specs

protocol() ::
  :activitypub
  | :buddycloud
  | :dfrn
  | :diaspora
  | :libertree
  | :ostatus
  | :pumpio
  | :tent
  | :xmpp
  | :zot

Specs

services() :: %{inbound: [inbound_service()], outbound: [outbound_service()]}

Specs

software() :: %{
  :name => String.t(),
  :version => String.t(),
  optional(:repository) => String.t(),
  optional(:homepage) => String.t()
}

Specs

t() :: %{
  version: version(),
  software: software(),
  protocols: [protocol()],
  services: services(),
  openRegistration: boolean(),
  usage: usage(),
  metadata: map()
}

Specs

usage() :: %{
  :users => users(),
  optional(:localPosts) => non_neg_integer(),
  optional(:localComments) => non_neg_integer()
}

Specs

users() :: %{
  optional(:total) => non_neg_integer(),
  optional(:activeHalfyear) => non_neg_integer(),
  optional(:activeMonth) => non_neg_integer()
}

Specs

version() :: :"2.0" | :"2.1"

Link to this section Functions

Specs

get_node_info(String.t()) :: t() | :error