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:
27
src/entities/Friend.ts
Normal file
27
src/entities/Friend.ts
Normal 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];
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user