Open lostystyg opened 2 years ago
getactivities
Parameters:
address
# an address to search it's activities forheight
# height to start search from (including). If not specified or null - current chain heightblocknum
# tx's number to start search from at height
block (excluding). For all other blocks in search range this argument is ignored. If not specified or null - 999999filters
# an array of short form types to search for. If not specified or empty - search for all types.Example:
{
"method": "getactivities",
"params": [
"TG69Jioc81PiwMAJtRanfZqUmRY4TUG7nt",
1000000,
232
]
}
Answer is a json array of ShortForms (#217) format. Below will be the examples for each possible type of ShortForm.
address
as well as account
are ignored for all root data because the frontend should have been already known about the user it asks activities for.
Root data represents the comment from specified user. Related content represents the post of where the comment was placed.
{
"hash": "2b872925b786ebeaf4950fa48c43525de3f8c91882ae8261947872affcd29838",
"txType": 204,
"height": 1080096,
"blockNum": 3,
"description": "{\"message\":\"qwerewr\",\"url\":\"\",\"images\":[]}",
"commentParentId": "c9a2d0054a9956dae54a8d57a3b01cd8cbdef6771ae0e9bee5b34decab8d1f92",
"commentAnswerId": "",
"type": "comment",
"value": 10, # If this comment are donate
"relatedContent": {
"hash": "a2e07d5feac01033e0defbc8a6a63934ee97180e05520db444d482462c9e717e",
"txType": 200,
"height": 1080061,
"blockNum": 2,
"address": "TXvNa2yQiSof3hdiAfkC4SnbWvaTqQzyRn",
"account": {
"name": "testdsfsdftets",
"avatar": "",
"badge": "",
"reputation": 21
}
}
},
Root data represents user's answer. Related content represents the comment user answered to.
{
"hash": "1c2240cdfe84d23ad94955f0cbec9f02f50f921ff3d905ce74cd03bbc2c1320f",
"txType": 204,
"height": 1080096,
"blockNum": 2,
"description": "{\"message\":\"%40DMOMFBIRWPIMEQCG%20%20123123123\",\"url\":\"\",\"images\":[]}",
"commentParentId": "889a279ff18a55f5367ee25fa3e90e891533d4ccbcc321104c09b97fd732db3a",
"commentAnswerId": "889a279ff18a55f5367ee25fa3e90e891533d4ccbcc321104c09b97fd732db3a",
"type": "answer",
"relatedContent": {
"hash": "889a279ff18a55f5367ee25fa3e90e891533d4ccbcc321104c09b97fd732db3a",
"txType": 204,
"height": 1053837,
"blockNum": 3,
"address": "TBknFE7we8YxY3g14UkKn93nZsraHCquHi",
"account": {
"name": "IUVEDWGNTUKIFJRJ",
"avatar": "",
"badge": "",
"reputation": -2
},
"description": "{\"message\":\"%D0%BF%D1%80%D0%B0%D1%80\",\"url\":\"\",\"images\":[]}"
}
}
Root data represents the user subscription. Related content represents the account the user had subscribed to.
{
"hash": "4c08af6784c3f84aa1861f0d225123a047186f5dcb99c35813c27963fd495584",
"txType": 302,
"height": 938813,
"blockNum": 3,
"type": "subscriber",
"relatedContent": {
"hash": "1c02c3e8abf44930703b8cab8d10d12f4b4a95d735c639ffbc03e4b29a33fad7",
"txType": 100,
"height": 249307,
"blockNum": 2,
"address": "TMW1NcowkYn7FMWHvXpsoDffocDXL2sZ2b",
"account": {
"name": "1",
"avatar": "",
"badge": "",
"reputation": 0
}
}
}
Root data represents user's score of someones content. Related content represents the content mentioned above.
{
"hash": "22cf9838a89ff6ce98ef308f627822f7712fe1fae27405feb0cdc23bc3ae9e0b",
"txType": 300,
"height": 1008438,
"blockNum": 897,
"val": 4,
"type": "contentscore",
"relatedContent": {
"hash": "da9450352f6f7db0122c60315d96c0f7c5bd4e4d5c8475416b1f688f4acf4769",
"txType": 200,
"height": 1008185,
"blockNum": 4,
"address": "TBZSci7HvPXtEUPx9rJtP3zVcb2GY4YqJo",
"account": {
"name": "Test0000100750242872",
"avatar": "https://lumpics.ru/wp-content/uploads/2017/11/Programmyi-dlya-sozdaniya-avatarok.png",
"badge": "",
"reputation": 0
},
"description": "Caption"
}
}
Root data represents the user's score to someones comment. Related content represents the comment mentioned above.
{
"hash": "7e8aec9d5b462b23baa54238fd9739d81ce267d80f260ac25bcae48eff23cb44",
"txType": 301,
"height": 1080079,
"blockNum": 4,
"val": 1,
"type": "commentscore",
"relatedContent": {
"hash": "6c3295c160b984806ce772101cf273cbe7ea0ae46745381052e6bc49dbbe9cf0",
"txType": 204,
"height": 1080058,
"blockNum": 2,
"address": "TCSxT4ALAkbYSRQekmQU1h2DyFQi4Rmf2R",
"account": {
"name": "boommy_test4",
"avatar": "",
"badge": "",
"reputation": 1
},
"description": "{\"message\":\"Wheeeeree\",\"url\":\"\",\"images\":[]}"
}
}
Root data represents the boost action that user performed. Related content represents the post that was boosted.
{
"hash": "86d9e25e6d497e3c6a7702a2f31f1fe3632b7c5b813f53926e96905a4e7436a0",
"txType": 208,
"height": 1053838,
"blockNum": 2,
"val": 200000000,
"type": "boost",
"relatedContent": {
"hash": "655532abd700b40a3863b875eca2fe59fa9116200dadb83f164f83289c66dd85",
"txType": 201,
"height": 1030822,
"blockNum": 2,
"address": "TQPBvaNUyEWoK9AfY7mUfx3BXZWE2fRXQd",
"account": {
"name": "Dev01",
"avatar": "https://i.imgur.com/R7eWJPn.jpg",
"badge": "",
"reputation": 20
},
"description": "rex%20video"
}
}
A feed of all activities that were made by a user in #217 format.
302 in progress.