create account

scotbot: api update and how the delay was reduced by holger80

View this thread on: hive.blogpeakd.comecency.com
· @holger80 · (edited)
$28.41
scotbot: api update and how the delay was reduced
![](https://cdn.steemitimages.com/DQmVLEQz4R6TLspWojh1uHaiMhZ2w8125zWdBp1YeodBrzM/image.png)

## Improved API endpoints
The scotbot API endpoints for `get_feed`, `get_discussions_by_created`, `get_discussions_by_trending` and `get_discussions_by_hot`  have been improved and show also posts which are already paid out. The results when viewing a the trending page of a tag is also improved.

You can check how this works here:
https://www.palnet.io/trending/scotbot
https://www.palnet.io/hot/scotbot
https://www.palnet.io/created/scotbot
When you scroll down to the last post, more post will load.

## New API Endpoints
Two new api calls were implemented.

### Endpoint get_account_votes
This api endpoint can be used to list all votes that a voter has made on a tribe.

`GET /get_account_votes`

### Query Parameters
| Name           |  Type   | Description                             |      Required      |
| :------------- | :-----: | :-------------------------------------- | :----------------: |
| account          | strings | account name                         | yes |
| token          | strings | token name                         |  yes  |
| limit          |   int   | limit results (default 1000)             |                    |
| offset |   int   | skips results (default 0)             |          |

## Example

* http://scot-api.steem-engine.com/get_account_votes?account=holger80&token=PAL&limit=50


### Endpoint get_votes
This api endpoint returns the last votes for a specific tribe token.

`GET /get_votes`

### Query Parameters
| Name           |  Type   | Description                             |      Required      |
| :------------- | :-----: | :-------------------------------------- | :----------------: |
| token          | strings | token name                         |  yes  |
| limit          |   int   | limit results (default 1000)             |                    |
| offset |   int   | skips results (default 0)             |          |

## Example

* http://scot-api.steem-engine.com/get_votes?token=PAL&limit=50

## Speed up scotbot by removing Comment api calls
Comment api calls have been strongly reduced. Before, all comments were parsed from the tags api. This took to long, and the content of a block could not be parsed within 3 seconds. This lead then to an increased delay of scotbot.

As scotbot stores now all votes in the database and the body, title and metadata is also available in the block api call, it was possible to reduce the amount of api calls.

Only when an edited body contains `@@`,  which indicates that the body was edited, a comment api call is needed.

This update is online since a few days now and the delay could be reduced to around 3-9 seconds.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 294 others
properties (23)
authorholger80
permlinkscotbot-api-update-and-how-the-delay-was-reduced
categoryscotbot
json_metadata"{"tags": ["scotbot", "scot", "steemleo", "palnet", "neoxian", "sct", "stem", "sct-en", "sct-freeboard"], "image": ["https://cdn.steemitimages.com/DQmVLEQz4R6TLspWojh1uHaiMhZ2w8125zWdBp1YeodBrzM/image.png"], "links": ["https://www.palnet.io/trending/scotbot", "https://www.palnet.io/hot/scotbot", "https://www.palnet.io/created/scotbot", "http://scot-api.steem-engine.com/get_account_votes?account=holger80&token=PAL&limit=50", "http://scot-api.steem-engine.com/get_votes?token=PAL&limit=50"], "app": "beempy/0.23.10", "format": "markdown", "canonical_url": "https://hive.blog/scotbot/@holger80/scotbot-api-update-and-how-the-delay-was-reduced"}"
created2019-09-10 21:31:15
last_update2020-05-23 14:23:12
depth0
children9
last_payout2019-09-17 21:31:15
cashout_time1969-12-31 23:59:59
total_payout_value14.715 HBD
curator_payout_value13.691 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,720
author_reputation358,857,509,568,825
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,454,712
net_rshares71,325,012,120,434
author_curate_reward""
vote details (358)
@detlev ·
A great job and that deserve a cool and cold !BEER 

_This tool changed a lot at Steem_ 

Again many thanks for your work
properties (22)
authordetlev
permlinkpxrbb5
categoryscotbot
json_metadata{"tags":["scotbot"],"app":"steemit/0.1"}
created2019-09-13 06:28:18
last_update2019-09-13 06:28:18
depth1
children0
last_payout2019-09-20 06:28:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length121
author_reputation1,769,331,177,609,542
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,530,145
net_rshares0
@jdkennedy ·
Good stuff here. Where is the best place to find all of the available api calls?
properties (22)
authorjdkennedy
permlinkpxnf2q
categoryscotbot
json_metadata{"tags":["scotbot","stem"],"app":"stemgeeks/0.1"}
created2019-09-11 03:59:15
last_update2019-09-11 03:59:15
depth1
children0
last_payout2019-09-18 03:59:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length80
author_reputation1,192,759,598,423
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,462,162
net_rshares0
@partiko ·
Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!
properties (22)
authorpartiko
permlinkre-scotbot-api-update-and-how-the-delay-was-reduced-20190910t223014
categoryscotbot
json_metadata"{"app": "partiko"}"
created2019-09-10 22:30:15
last_update2019-09-10 22:30:15
depth1
children0
last_payout2019-09-17 22:30:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length213
author_reputation39,207,160,334,751
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,456,092
net_rshares0
@pemac ·
Nice update! At Least transactions can now go swiftly and in time.

Posted using [Partiko Android](https://partiko.app/referral/pemac)
properties (22)
authorpemac
permlinkpemac-re-holger80-scotbot-api-update-and-how-the-delay-was-reduced-20190910t224333511z
categoryscotbot
json_metadata{"app":"partiko","client":"android"}
created2019-09-10 22:43:33
last_update2019-09-10 22:43:33
depth1
children0
last_payout2019-09-17 22:43:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length134
author_reputation-410,581,125,284
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,456,298
net_rshares0
@realmankwon ·
Thank u so much!!! :)
properties (22)
authorrealmankwon
permlinkre-holger80-pxn7uq
categoryscotbot
json_metadata{"tags":["scotbot"],"app":"steempeak/1.16.1"}
created2019-09-11 01:23:12
last_update2019-09-11 01:23:12
depth1
children0
last_payout2019-09-18 01:23:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length21
author_reputation256,638,399,773,710
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,459,324
net_rshares0
@steem-plus ·
SteemPlus upvote
Hi, @holger80!

You just got a **4.96%** upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (22)
authorsteem-plus
permlinkscotbot-api-update-and-how-the-delay-was-reduced---vote-steemplus
categoryscotbot
json_metadata{}
created2019-09-11 16:52:21
last_update2019-09-11 16:52:21
depth1
children0
last_payout2019-09-18 16:52:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length435
author_reputation247,952,188,232,400
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,480,384
net_rshares0
@steem-ua ·
#### Hi @holger80!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 7.727 which ranks you at **#45** across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 105 contributions, your post is ranked at **#2**. Congratulations! 
##### Evaluation of your UA score:

* Your follower network is great!
* The readers appreciate your great work!
* Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-scotbot-api-update-and-how-the-delay-was-reduced-20190911t050546z
categoryscotbot
json_metadata"{"app": "beem/0.21.0"}"
created2019-09-11 05:05:48
last_update2019-09-11 05:05:48
depth1
children0
last_payout2019-09-18 05:05:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length706
author_reputation23,214,230,978,060
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,463,492
net_rshares0
@steemitboard ·
Congratulations @holger80! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@holger80/votes.png?201909101735"></td><td>You distributed more than 13000 upvotes. Your next target is to reach 14000 upvotes.</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@holger80) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=holger80)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-holger80-20190910t220414000z
categoryscotbot
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-09-10 22:04:12
last_update2019-09-10 22:04:12
depth1
children0
last_payout2019-09-17 22:04:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length899
author_reputation38,975,615,169,260
root_title"scotbot: api update and how the delay was reduced"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,455,555
net_rshares0
@toofasteddie ·
Good work man!
properties (22)
authortoofasteddie
permlinkre-holger80-2019910t234745z
categoryscotbot
json_metadata{"tags":["scotbot","scot","steemleo","palnet","neoxian","sct","stem","sct-en","sct-freeboard"],"app":"esteem/2.2.0-mobile","format":"markdown+html","community":"esteem.app"}
created2019-09-10 21:47:03
last_update2019-09-10 21:47:03
depth1
children0
last_payout2019-09-17 21:47:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation673,543,334,765,992
root_title"scotbot: api update and how the delay was reduced"
beneficiaries
0.
accountesteemapp
weight1,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,455,009
net_rshares0