HK-University Experience #1

in HK UNIVERSITY2 years ago

A few days ago I was lurking around @hivepizza discord and found out that haskings was inviting people to their HK-University. When I read it was an opportunity to learn about developing for the hive blockchain I jumped on the boat as quickly as I could.

At the beginning... most I had been doing was brushing up some stuff I learnt a while ago, html/css, github, javascript promises.
Then came the first real problem, how to read hive-engine's api, even if there were enough tools at my disposal, I had no idea how to use them and there wasn't any info that was self-explanatory in the place I found myself.

So I completed my first project testing words with sscjs library until I got the data I needed.

This is sscjs example:

ssc.find('tokens', 'tokens', { }, 1000, 0, [], (err, result) => {
    console.log(err, result);
})

So I tried all sorts of combinations like "balances" and "accounts" hoping that something will change and in the end it worked:

ssc.find('tokens', 'balances', { }, 1000, 0, [], (err, result) => {
    console.log(err, result);
})


Yup, lucky enough, I typed the pair "tokens" and "balances" in the right order and I got the data I needed. Here's the link and a preview:

image.png

After a few more projects, (because there was no other option other than trying to understand how it worked) I figured it out that there are "Contracts" like "tokens" and each of them lets you search for different tables like "balances".

Always remember:

image.png

Sort:  

maybe using fetch works?

I'm trying that now. I have been trying for a while and I can't figure it out.

one thing that usually helps is using postman https://www.postman.com/

logo-curacion-hueso
Post votado por la Curación de la Comunidad de Mundo Virtual. Recibes algunos Huesos

Haz click sobre este banner, para ser dirigido al Discord de Mundo Virtual y conocer más sobre el proyecto del Token Hueso.

Te invitamos a que conozcas nuestra Comunidad de Hive

Conoce el Proyecto Token Hueso, lee su White Paper aquí.

Si deseas ganar Tokens del Proyecto Hueso, usa en tus post las etiquetas #hueso y #mundovirtual