API class

Constructors

API()

Properties

database ↔ FirebaseFirestore
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEvent(EventData newEvent) → void
addGroup(GroupData newGroup) → void
addPrize(PrizeData newPrize) → void
addUser(String name, String email, String profilePic) → void
buyPrize(String prizeId, String userId, String expirationDate, String code) Future<void>
doesUserExist(String email) Future<bool>
getCurrentUserData() Future<UserData>
getEvent(String eventId) Future<EventData>
getEventId(String title) Future<String>
getEventList() Future<List<EventData>>
getEvents(List<String> ids) Future<List<EventData>>
getPrizeData(String id) Future<PrizeData>
getPrizeList() Future<List<PrizeData>>
getPrizes(List<String> ids) Future<List<PrizeData>>
getUserData(String id) Future<UserData>
getUserId(String email) Future<String>
getUserList() Future<List<UserData>>
getUsersInEvent(String eventId) Future<List<String>>
getUsersInGroup(String groupId) Future<List<String>>
joinEvent(String userId, String eventId) Future<void>
joinGroup(String userId, String groupId) Future<void>
leaveEvent(String userId, String eventId) Future<void>
leaveGroup(String userId, String groupId) Future<void>
makePastEvent(String eventId) Future<void>
modifyEventData(String id, EventData newEventData) Future<void>
modifyUserData(String id, UserData newUserData) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEvent(String eventId) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

announcementsCollection → const String
buyableKey → const String
currentEventsKey → const String
dateKey → const String
descriptionKey → const String
detailsKey → const String
emailKey → const String
eventsCollection → const String
gradeKey → const String
groupsCollection → const String
imageKey → const String
joinedGroupsKey → const String
locationKey → const String
nameKey → const String
pastEventsKey → const String
pastPointsKey → const String
pendingPurchasedItemsKey → const String
pointCostKey → const String
pointRewardKey → const String
pointsKey → const String
prizesCollection → const String
profilePicKey → const String
qrCodeKey → const String
sourceKey → const String
spendablePointsKey → const String
timeKey → const String
titleKey → const String
typeKey → const String
usersCollection → const String