Skip to content

Get info about a user's circle within Reddit's 2018 Circle of Trust event.

Notifications You must be signed in to change notification settings

haykam821/Circle-of-Trust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circle of Trust GitHub Workflow Status

All circle functionality and endpoints have been removed from the Reddit website, so unfortunately this library will no longer work.

Get info about a user's circle.

Documentation

This package exports a function for getting a circle from a Reddit username (using ES6 Promises), like so:

const circleOfTrust = require("circle-of-trust");
circleOfTrust("haykam821")
    .then(console.log) // Circle information (see below)
    .catch(console.error); // Failed to get circle info (e.g. no such user or circle)

The promise resolves with a RedditCircle class containing information about the circle:

Property Type Description
circle.name String The name given to the circle.
circle.link String A permalink to the circle.
circle.id String The circle's identifier.
circle.owner String The owner, good chance it'll be the person you specified.
circle.betrayed Boolean Whether the circle has been betrayed or not.
circle.score, circle.members Number The score of the circle.
circle.key Null If key already used, that key as a String. Otherwise, Null.
circle.websocket String The websocket URL for retrieving live circle updates.
circle.creation_date Date The circle's date of creation.