Collecting your interactions via the steem api

in utopian-io •  7 years ago  (edited)

I like to use the steemd.com site to view my interactions with others.
https://steemd.com/@h4ck3rm1k3st33m
And then I like to follow people I interact with on steemit.com, but that is not easy.

So here is a hack to do that :

Annotated Code

Take the user name as the first parametr
user=$1
Pull the last 10k transactions from steemjs api
wget "https://api.steemjs.com/get_account_history?account=${user}&from=-1&limit=10000" -O history.json

Format with jq, a great javascript command line tool, yes we could use this to do the full query
jq . history.json > get_account_history.js

Now collect the different field values and turn them into steemit links, they are sorted by count if you want to review the files
`
grep "account" get_account_history.js | sort | uniq -c | sort -n | sed 's!"account": "!\nhttps://steemit.com/@!g' | sed -e 's!",!!g' | grep http > account.txt

grep '"author":' get_account_history.js | sort | uniq -c | sort -n | sed 's!"author": "!\nhttps://steemit.com/@!g' | sed -e 's!",!!g' | grep http > author.txt

grep '"parent_author":' get_account_history.js | sort | uniq -c | sort -n | sed 's!"parent_author": "!\nhttps://steemit.com/@!g' | sed -e 's!",!!g' | grep http > parent_author.txt

grep '"voter":' get_account_history.js | sort | uniq -c | sort -n | sed 's!"voter": "!\nhttps://steemit.com/@!g' | sed -e 's!",!!g' | grep http > voter.txt
`
Finally produce a final report :
cat voter.txt parent_author.txt author.txt account.txt | sort -u

My Interactors

https://steemit.com/@aafeng
https://steemit.com/@abh12345
https://steemit.com/@adam-golab
https://steemit.com/@anomaly
https://steemit.com/@aranda
https://steemit.com/@arie.steem
https://steemit.com/@arsimjonuzi
https://steemit.com/@billbutler
https://steemit.com/@bootycall
https://steemit.com/@brainfarts
https://steemit.com/@brothermic
https://steemit.com/@catwomanteresa
https://steemit.com/@cifer
https://steemit.com/@cnts
https://steemit.com/@coffeedrinker51
https://steemit.com/@dodybireuen
https://steemit.com/@dondema
https://steemit.com/@droucil
https://steemit.com/@eadiatu
https://steemit.com/@espoem
https://steemit.com/@favcau
https://steemit.com/@fivestargroup
https://steemit.com/@flauwy
https://steemit.com/@freedom
https://steemit.com/@furion
https://steemit.com/@h4ck3rm1k3st33m
https://steemit.com/@helmi
https://steemit.com/@howo
https://steemit.com/@iqbalhood
https://steemit.com/@jack1999
https://steemit.com/@jefpatat
https://steemit.com/@jepu
https://steemit.com/@jomeszaros
https://steemit.com/@josediccus
https://steemit.com/@josephsavage
https://steemit.com/@juicyasf
https://steemit.com/@knowledges
https://steemit.com/@kslo
https://steemit.com/@lawyerup
https://steemit.com/@leir
https://steemit.com/@littleboy
https://steemit.com/@luckycharm
https://steemit.com/@luigi-tecnologo
https://steemit.com/@mahdiyari
https://steemit.com/@masummim50
https://steemit.com/@minnowhub
https://steemit.com/@misstysea
https://steemit.com/@misterdelegation
https://steemit.com/@modemser
https://steemit.com/@mvanyi
https://steemit.com/@ned
https://steemit.com/@netuoso
https://steemit.com/@nuges
https://steemit.com/@ohreally
https://steemit.com/@olivaw
https://steemit.com/@oliwaw
https://steemit.com/@ormus
https://steemit.com/@outerground
https://steemit.com/@paulag
https://steemit.com/@primetimesports
https://steemit.com/@ragepeanut
https://steemit.com/@ringmybell
https://steemit.com/@robin-ho
https://steemit.com/@ruah
https://steemit.com/@rubenalexander
https://steemit.com/@saluton
https://steemit.com/@sameeradamith
https://steemit.com/@scipio
https://steemit.com/@scrooger
https://steemit.com/@seroo
https://steemit.com/@shreyasgune
https://steemit.com/@snug
https://steemit.com/@st3llar
https://steemit.com/@steemitboard
https://steemit.com/@steemmakers
https://steemit.com/@takeaknee
https://steemit.com/@thegoldenphoenix
https://steemit.com/@tokenteller
https://steemit.com/@transisto
https://steemit.com/@tuanis
https://steemit.com/@ubg
https://steemit.com/@utopian-io
https://steemit.com/@vandadream
https://steemit.com/@vernetit
https://steemit.com/@vladimir-simovic
https://steemit.com/@wackou
https://steemit.com/@walnut1
https://steemit.com/@wuhotan
https://steemit.com/@xeldal
https://steemit.com/@yoloswags
https://steemit.com/@yorkchinese
https://steemit.com/@yuxi
https://steemit.com/@yuxid

Diffing

When you then come back later and want to find who is new, you just run the command again and use git diff to show you the changed people

https://github.com/h4ck3rm1k3/utopian-io-hacks/commit/e0bef2dbeb1e52194abe6dababfadc802c190fb2#diff-7585df841e48e5e3cb3684b563b1a6d2

image

Of course you will want to for this for yourself.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Approved.

You can contact us on Discord.
[utopian-moderator]

Hey @h4ck3rm1k3st33m I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x