Queries
This commit is contained in:
1 parent
99eead9640
commit
6c8f75d3e7
7 files changed
+296
-94
No files matched your search
@@ -0,0 +1,43 @@
|
||||
exports.newProfileStatsQuery = function newProfileStatsQuery() {
|
||||
|
||||
let thisObject = {
|
||||
profile: undefined,
|
||||
execute: execute,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize(queryReceived) {
|
||||
|
||||
thisObject.profile = NT.memory.PROFILES.get(queryReceived.targetUserProfileId)
|
||||
|
||||
if (thisObject.profile === undefined) {
|
||||
throw ('Target User Profile Not Found.')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function execute() {
|
||||
|
||||
return {
|
||||
"userProfieId": thisObject.profile.userProfieId,
|
||||
"githubUsername": thisObject.profile.githubUsername,
|
||||
"blockchainAccount": thisObject.profile.blockchainAccount,
|
||||
"ranking": thisObject.profile.ranking,
|
||||
"multiMediaPostFollowingCount": thisObject.profile.multiMediaPostFollowingCount,
|
||||
"multiMediaPostFollowersCount": thisObject.profile.multiMediaPostFollowersCount,
|
||||
"tradePostsFollowingCount": thisObject.profile.tradePostsFollowingCount,
|
||||
"tradePostsFollowersCount": thisObject.profile.tradePostsFollowersCount,
|
||||
"emitterEventsCount": thisObject.profile.emitterEventsCount,
|
||||
"targetEventsCount": thisObject.profile.targetEventsCount,
|
||||
"postsCount": thisObject.profile.postsCount,
|
||||
"botsCount": thisObject.profile.botsCount
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user