Last updated

Catena Friends Service

Catena uses a Mutual Agreement model, which in simpler terms means that both players must agree to be friends.

Friends Models

The Friends Service has two different models - the Request Model and the Pair Model.

  • The Request Model encompasses the first part of the Friends process - sending and receiving requests.
  • The Pair Model encompasses the second and post-linking part of the Friends process - two players linked together as friends.

Request Model

The Request Model contains 3 pieces of data:

  1. The Sender's Account Id
  2. The Receiver's Account Id
  3. A Timestamp of when the Request was Sent

Three modifying functions are related to this stage of friending:

FunctionPurposeParamsReturns
SendFriendRequestSends a friend request to another playerstr - Receiver Account IdNone
AcceptFriendRequestAccepts a friend request that was sent by another playerstr - Sender Account IdNone
DeclineFriendRequestDeclines a friend request that was sent by another playerstr - Sender Account IdNone

Two informational functions are related to this stage of friending:

FunctionPurposeParamsReturns
GetOutgoingPendingFriendRequestsRetrieve an account's outgoing friend requestsint64 - Limit
int64 - Offset
List<FriendRequest> - List of Friend Requests
FriendRequest contains:
 str - Account Id
 int64 - Request Sent Timestamp
GetIncomingPendingFriendRequestsRetrieve an account's incoming friend requestsint64 - Limit
int64 - Offset
List<FriendRequest> - List of Friend Requests
FriendRequest contains:
 str - Account Id
 int64 - Request Sent Timestamp

Pair Model

The Pair Model contains 3 pieces of data:

  1. The First Account's Account Id
  2. The Second Account's Account Id
  3. A Timestamp of when the Pair became Friends

Only one modifying function exists for Friend Pairs:

FunctionPurposeParamsReturns
RemoveFriendRemoves two accounts as friendsstr - Removing Account IdNone

Only one informational function exists for Friend Pairs:

FunctionPurposeParamsReturns
GetFriendsListRetrieve an account's friend listint64 - Limit
int64 - Offset
List<Friend> - List of Friends
Friend contains:
 str - Account Id
 int64 - Became Friends Timestamp