@gphone/sdk
    Preparing search index...

    Function useAccounts

    • Social identities — the @handles a player posts under, shared by every social app.

      Distinct from useAccount (singular), which is the player's own phone number and bank balance. This is the graph: handles, follows, blocks, reactions. Blabber is the worked example; any app that posts under a handle uses it rather than naming the routes.

      Parameters

      • OptionalappId: string

      Returns {
          blockAccount: (
              input: {
                  app: string;
                  blocked_account_id: number;
                  blocker_account_id: number;
              },
          ) => Promise<any>;
          createAccount: (
              input: { app: string; display_name?: string; handle: string },
          ) => Promise<Account>;
          followAccount: (
              input: {
                  app: string;
                  followee_account_id: number;
                  follower_account_id: number;
              },
          ) => Promise<any>;
          getAccounts: (
              query: { app: string; handle?: string; limit?: number },
          ) => Promise<{ rows: Account[] }>;
          getFollowers: (query: FollowListQuery) => Promise<FollowPage>;
          getFollowing: (query: FollowListQuery) => Promise<FollowPage>;
          getFollowStats: (
              input: { account_id: number; app: string; viewer_account_id?: number },
          ) => Promise<FollowStats>;
          getMyAccounts: (app: string) => Promise<{ limit: number; rows: Account[] }>;
          getReactionsFor: (
              target: ReactionTarget,
          ) => Promise<Record<number, ReactionSummary>>;
          reactToTarget: (
              payload: {
                  account_id: number;
                  app: string;
                  emoji: string;
                  target_id: number;
                  target_table: string;
              },
          ) => Promise<any>;
          searchAccounts: (
              query: AccountSearchQuery,
          ) => Promise<{ nextCursor: number | null; rows: Account[] }>;
          unblockAccount: (
              input: {
                  app: string;
                  blocked_account_id: number;
                  blocker_account_id: number;
              },
          ) => Promise<any>;
          unfollowAccount: (
              input: {
                  app: string;
                  followee_account_id: number;
                  follower_account_id: number;
              },
          ) => Promise<any>;
          unreactToTarget: (
              payload: {
                  account_id: number;
                  app: string;
                  emoji: string;
                  target_id: number;
                  target_table: string;
              },
          ) => Promise<any>;
          updateAccount: (input: { id: number } & Partial<Account>) => Promise<any>;
      }