newOS for Developers

Back to Lists & Rankings

Top Moods

Globally ranked folders by engagement and watts

beginnerGET /mood/list/top

Overview

Top Moods returns a globally ranked list of public folders (moods) sorted by engagement metrics. This powers discovery feeds and trending sections.

Results can be sorted by total watts, recent activity, or creation date.

API Endpoint

GET/mood/list/top

Query Parameters:

  • orderBy — Sort field: "watts", "created", "updated"
  • direction — "asc" or "desc" (default: desc)
  • page — Pagination cursor
  • contentType — Filter by content type (optional)

Usage Example

import { getTopFolders } from "@newgraph-signals/actions/folder";

// Get top moods by watts
const trending = getTopFolders({
  orderBy: "watts",
  direction: "desc"
});

// Get newest moods
const newest = getTopFolders({
  orderBy: "created",
  direction: "desc"
});

// Raw API call
const response = await newgraphClient.api.mood.listTop({
  query: {
    orderBy: "watts",
    direction: "desc",
    page: "0"
  }
});

Response Schema

// PagedResponse<MoodReadResponse>
{
  value: [
    {
      id: string;
      title: string;
      description: string;
      contentUrl: string;     // Cover image
      author: {
        id: string;
        username: string;
      };
      watts: number;          // Total watts received
      postsCount: number;     // Number of posts
      created: string;
      updated: string;
      privacy: string;        // "public" | "private"
    }
  ],
  done: boolean;
  page: string;
}