![the_art_of_delegation1200x600.png](https://images.ecency.com/DQmQYh3L9gdhHpWtPkrkvgMt5miEj2zjQRjLcD7uDNyoJMY/the_art_of_delegation1200x600.png) I started working on Blurt delegation with beem. Plan is to display * incoming delegations: where they are coming from ![in.png](https://images.ecency.com/DQmZSBE7vfokrKBFpgibRrJgXJsimrTN3sTDjozZ4orADC3/in.png) * outgoing delegations: where they are going to ![out.png](https://images.ecency.com/DQmP9dS86tsxWdmwSuzsGAm5L9jArLQuoqKpd4JTTgHzvES/out.png) * expiring delegations: when delegations expire (since it takes 5 days) ![exp.png](https://images.ecency.com/DQmZsHrkxxLiQnEYEwe3JzoZy4Q5JVosFgQb9qUUiCqHMiu/exp.png) Main part is done like this to get all 3 delegation data ``` def get_delegation(self): # find delegations for username data = {} if self.username: # find outgoing delegatons data['outgoing'] = self.account.get_vesting_delegations() for value in data['outgoing']: # vests to BP conversion # vests = Amount(value['vesting_shares']) # bp = self.blurt.vests_to_bp(vests.amount) # value['bp'] = f'{bp:.3f}' value['bp'] = self.vests_to_bp(value['vesting_shares']) # find expiring delegatons data['expiring'] = self.account.get_expiring_vesting_delegations() for value in data['expiring']: # vests to BP conversion # vests = Amount(value['vesting_shares']) # bp = self.blurt.vests_to_bp(vests.amount) # value['bp'] = f'{bp:.3f}' value['bp'] = self.vests_to_bp(value['vesting_shares']) # find incoming delegatons data['incoming'] = [] incoming_temp = dict() for operation in self.account.history( only_ops=["delegate_vesting_shares"]): if self.username == operation["delegator"]: continue if operation["vesting_shares"] == '0.000000 VESTS': incoming_temp.pop(operation["delegator"]) continue else: incoming_temp[operation["delegator"]] = operation for key, value in incoming_temp.items(): value['bp'] = self.vests_to_bp(value['vesting_shares']) data['incoming'].append(value) return data def vests_to_bp(self, vests): # VESTS to BP conversion bp = 0.000 v = Amount(vests) bp = self.blurt.vests_to_bp(v.amount) bp = f'{bp:.3f}' return bp ``` I think backend is working, but frontend for this is not done... 😂 Every time I work on frontend, I get distracted and feel like I want to change something, but design takes a looong time for me. It is very exausting. So just added a bear. ![ezgif.com_gif_maker.gif](https://images.ecency.com/DQmY5E9e9qv7P2ACdr6Vy9s16DkDc7mbiALyXQY5tjx8QPZ/ezgif.com_gif_maker.gif) I think I like it like that for now... <center> [Get Rewarded For Browsing! Are you Brave?](https://brave.com/tom490) [<img src="https://img.esteem.app/be00j8.png">](https://brave.com/tom490) [![happy tears](https://images.ecency.com/DQmUfaVp5UQvASdTyyLrNiBdGB7NxQfxE2wBpNivcDUkCfe/h.gif)](https://tomoyan.github.io/) ➡️ [Website](https://tomoyan.github.io) ➡️ [Twitter ](https://twitter.com/tomoyanTweet) </center>
post_id | 88,096,043 |
---|---|
author | tomoyan |
permlink | python-beem-blurt-project-5-working-on-delegation |
category | programming |
json_metadata | {"tags":["programming","python","beem","blurt","mini","marlians","dblog"],"image":["https:\/\/images.ecency.com\/DQmQYh3L9gdhHpWtPkrkvgMt5miEj2zjQRjLcD7uDNyoJMY\/the_art_of_delegation1200x600.png","https:\/\/images.ecency.com\/DQmZSBE7vfokrKBFpgibRrJgXJsimrTN3sTDjozZ4orADC3\/in.png","https:\/\/images.ecency.com\/DQmP9dS86tsxWdmwSuzsGAm5L9jArLQuoqKpd4JTTgHzvES\/out.png","https:\/\/images.ecency.com\/DQmZsHrkxxLiQnEYEwe3JzoZy4Q5JVosFgQb9qUUiCqHMiu\/exp.png","https:\/\/images.ecency.com\/DQmY5E9e9qv7P2ACdr6Vy9s16DkDc7mbiALyXQY5tjx8QPZ\/ezgif.com_gif_maker.gif","https:\/\/img.esteem.app\/be00j8.png","https:\/\/images.ecency.com\/DQmUfaVp5UQvASdTyyLrNiBdGB7NxQfxE2wBpNivcDUkCfe\/h.gif"],"links":["https:\/\/brave.com\/tom490","https:\/\/tomoyan.github.io\/","https:\/\/tomoyan.github.io","https:\/\/twitter.com\/tomoyanTweet"],"app":"steemit\/0.2","format":"markdown"} |
created | 2020-10-20 14:35:27 |
last_update | 2020-10-20 14:35:27 |
depth | 0 |
children | 5 |
net_rshares | 22,718,064,873,833 |
last_payout | 2020-10-27 14:35:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 4.062 SBD |
curator_payout_value | 3.554 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 3,475 |
author_reputation | 866,518,377,346,806 |
root_title | "Python Beem Blurt Project #5 - Working on Delegation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
acidyo | 0 | 2,103,311,546,923 | 30% | ||
kevinwong | 0 | 2,311,992,761,676 | 30% | ||
gerber | 0 | 5,865,982,994 | 5.09% | ||
ezzy | 0 | 273,517,971,439 | 5.09% | ||
exyle | 0 | 400,662,682,099 | 5.09% | ||
ew-and-patterns | 0 | 24,002,350,327 | 5.09% | ||
droida | 0 | 9,605,440,201 | 100% | ||
greatness96 | 0 | 235,960,403 | 0.6% | ||
dine77 | 0 | 22,138,460,459 | 0.93% | ||
pixelfan | 0 | 18,688,859,033 | 3.1% | ||
ernick | 0 | 2,085,987,352 | 10% | ||
crokkon | 0 | 3,798,466,563 | 30% | ||
accelerator | 0 | 26,374,217,636 | 5.09% | ||
qurator | 0 | 69,144,425,574 | 6.16% | ||
khaleelkazi | 0 | 250,582,077 | 5.09% | ||
chaatah | 0 | 2,408,584,585 | 100% | ||
nealmcspadden | 0 | 3,110,225,771 | 5.09% | ||
curx | 0 | 98,440,062,410 | 30% | ||
yasu | 0 | 296,985,741,491 | 55% | ||
savagebits | 0 | 10,376,471,730 | 13% | ||
sergino | 0 | 8,952,902,534 | 25% | ||
dlike | 0 | 81,492,976,529 | 6% | ||
arkmy | 0 | 96,704,382 | 30% | ||
steemcryptosicko | 0 | 388,757,804,257 | 40% | ||
glastar | 0 | 46,070,379,426 | 100% | ||
marcosdk | 0 | 117,970,349,893 | 30% | ||
abbey701 | 0 | 46,976,442,769 | 100% | ||
coredump | 0 | 71,105,678 | 30% | ||
radaquest | 0 | 12,802,852,592 | 30% | ||
freebot | 0 | 0 | 100% | ||
cresus | 0 | 0 | 100% | ||
quicktrades | 0 | 7,584,331,686 | 100% | ||
swissbot | 0 | 0 | 100% | ||
steem.leo | 0 | 5,995,477,161 | 5.09% | ||
leo.voter | 0 | 319,925,842 | 5.09% | ||
maxuvd | 0 | 6,936,826,308 | 11% | ||
maxuve | 0 | 12,460,491,398 | 4.88% | ||
monkeydex | 0 | 0 | 100% | ||
ackerman77 | 0 | 1,420,808,768 | 100% | ||
uthus2k | 0 | 5,299,932,842 | 100% | ||
llobu | 0 | 8,854,712,224 | 30% | ||
gotogether | 0 | 16,105,651,993,633 | 28.08% | ||
gopower | 0 | 47,744,387,165 | 28.08% | ||
bugabuga | 0 | 16,332,511,109 | 8% | ||
unyime | 0 | 242,219,569 | 3% | ||
alexbalan | 0 | 1,133,493,707 | 100% | ||
ezvote | 0 | 7,510,316,858 | 1% | ||
japansteemit | 0 | 457,439,597 | 100% | ||
patorney | 0 | 100,693,128,327 | 2% | ||
yeris | 0 | 881,343,820 | 15% | ||
ezcurate | 0 | 199,496,245 | 1% | ||
alives | 0 | 784,638,136 | 15% | ||
maliha24 | 0 | 776,441,528 | 15% | ||
auc | 0 | 596,659,107 | 15% |
This is turning into an extremely useful dapp
post_id | 88,109,515 |
---|---|
author | alexbalan |
permlink | qijxtf |
category | programming |
json_metadata | {"app":"steemit\/0.2"} |
created | 2020-10-21 12:39:18 |
last_update | 2020-10-21 12:39:18 |
depth | 1 |
children | 4 |
net_rshares | 39,081,901,367 |
last_payout | 2020-10-28 12:39:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 45 |
author_reputation | 1,881,241,039,849 |
root_title | "Python Beem Blurt Project #5 - Working on Delegation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomoyan | 0 | 39,081,901,367 | 100% |
😳😳😳 idk... I am like using like jquery and stuff that is old 😬 I need to modernize it and still a long way to go 🙄
post_id | 88,111,852 |
---|---|
author | tomoyan |
permlink | qik5hj |
category | programming |
json_metadata | {"app":"steemit\/0.2"} |
created | 2020-10-21 15:24:57 |
last_update | 2020-10-21 15:24:57 |
depth | 2 |
children | 3 |
net_rshares | 1,130,772,460 |
last_payout | 2020-10-28 15:24:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 115 |
author_reputation | 866,518,377,346,806 |
root_title | "Python Beem Blurt Project #5 - Working on Delegation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
alexbalan | 0 | 1,130,772,460 | 100% |
After all, what works, works. I like using php on my backends, but let's keep that a secret mkay?😂
post_id | 88,116,939 |
---|---|
author | alexbalan |
permlink | qikmho |
category | programming |
json_metadata | {"app":"steemit\/0.2"} |
created | 2020-10-21 21:32:15 |
last_update | 2020-10-21 21:32:15 |
depth | 3 |
children | 2 |
net_rshares | 41,467,382,595 |
last_payout | 2020-10-28 21:32:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 98 |
author_reputation | 1,881,241,039,849 |
root_title | "Python Beem Blurt Project #5 - Working on Delegation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomoyan | 0 | 41,467,382,595 | 100% |