1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-21 00:55:17 +00:00

Can get the list of friends of a user

This commit is contained in:
2019-12-28 16:28:38 +01:00
parent 8eb69469a7
commit fe11162953
3 changed files with 74 additions and 1 deletions

27
src/entities/Friend.ts Normal file
View File

@ -0,0 +1,27 @@
/**
* Friend information
*
* @author Pierre HUBERT
*/
export interface FriendBuilder {
friendID: number,
accepted: boolean,
following: boolean,
lastActivityTime: number,
canPostTexts: boolean
}
export class Friend implements FriendBuilder {
friendID: number; accepted: boolean;
following: boolean;
lastActivityTime: number;
canPostTexts: boolean;
public constructor(info: FriendBuilder) {
for (const key in info) {
if (info.hasOwnProperty(key))
this[key] = info[key];
}
}
}