angelos.facade.api.contact¶
Facade contact API.
-
class
angelos.facade.api.contact.
ContactAPI
(facade: angelos.facade.facade.Facade)¶ Bases:
angelos.facade.facade.ApiFacadeExtension
ContactAPI is an interface class, placed on the facade.
-
ATTRIBUTE
= ('contact',)¶
-
PATH_ALL
= (PurePosixPath('/contacts/all'),)¶
-
PATH_BLOCKED
= (PurePosixPath('/contacts/blocked'),)¶
-
PATH_FAVORITES
= (PurePosixPath('/contacts/favorites'),)¶
-
PATH_FRIENDS
= (PurePosixPath('/contacts/friends'),)¶
-
block
(*entities: uuid.UUID) → bool¶ Put entities in the blocked category.
This method will unfriend and unfavorite the entities.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-
favorite
(*entities: uuid.UUID) → bool¶ Put entities in the favorite category.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-
friend
(*entities: uuid.UUID) → bool¶ Put entities in the friends category.
This method will unblock.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-
load_all
() → Set[Tuple[str, uuid.UUID]]¶ Load a list of all contacts, that is not blocked.
- Returns (List[Tuple[str, uuid.UUID]]):
List of tuples with portfolio path and ID.
-
load_blocked
() → Set[Tuple[str, uuid.UUID]]¶ Load a list of all blocked entities.
- Returns (List[Tuple[str, uuid.UUID]]):
List of tuples with portfolio path and ID.
-
load_favorites
() → Set[Tuple[str, uuid.UUID]]¶ Load a list of all favorites.
- Returns (List[Tuple[str, uuid.UUID]]):
List of tuples with portfolio path and ID.
-
load_friends
() → Set[Tuple[str, uuid.UUID]]¶ Load a list of all friends.
- Returns (List[Tuple[str, uuid.UUID]]):
List of tuples with portfolio path and ID.
-
remove
(*entities: uuid.UUID) → bool¶ Remove all links to old portfolios.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-
status
(eid: uuid.UUID) → Tuple[bool, bool, bool]¶ Check the status of a contact against the categories if they are favorites and/or friends.
- Parameters
eid (uuid.UUID) – The contact to check status on.
- Returns (Tuple[bool, bool, bool]):
Indicates whether a certain state is true, (favorite, friend, blocked)
-
unblock
(*entities: uuid.UUID) → bool¶ Remove entities in the blocked category.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-
unfavorite
(*entities: uuid.UUID) → bool¶ Remove entities in the favorite category.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-
unfriend
(*entities: uuid.UUID) → bool¶ Remove entities in the friends category.
- Parameters
*entities (uuid.UUID) – Argument list of entities.
- Returns (bool):
True on success.
-