Ecoer Logo

@elingmeyatmaja

34

Traveler, Sport & Coder

steemit.com/@elingmeyatmaja
VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS67.42%
Net Worth
0.353USD
STEEM
0.000STEEM
SBD
0.575SBD
Effective Power
5.007SP
├── Own SP
1.335SP
└── Incoming Deleg
+3.672SP

Detailed Balance

STEEM
balance
0.000STEEM
market_balance
0.000STEEM
savings_balance
0.000STEEM
reward_steem_balance
0.000STEEM
STEEM POWER
Own SP
1.335SP
Delegated Out
0.000SP
Delegation In
3.672SP
Effective Power
5.007SP
Reward SP (pending)
0.000SP
SBD
sbd_balance
0.575SBD
sbd_conversions
0.000SBD
sbd_market_balance
0.000SBD
savings_sbd_balance
0.000SBD
reward_sbd_balance
0.000SBD
{
  "balance": "0.000 STEEM",
  "savings_balance": "0.000 STEEM",
  "reward_steem_balance": "0.000 STEEM",
  "vesting_shares": "2171.132565 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "5972.527241 VESTS",
  "sbd_balance": "0.575 SBD",
  "savings_sbd_balance": "0.000 SBD",
  "reward_sbd_balance": "0.000 SBD",
  "conversions": []
}

Account Info

nameelingmeyatmaja
id523102
rank1,310,237
reputation9200324519
created2017-12-24T07:28:15
recovery_accountsteem
proxyNone
post_count19
comment_count0
lifetime_vote_count0
witnesses_voted_for0
last_post2018-10-04T04:14:30
last_root_post2018-10-03T14:46:00
last_vote_time2018-03-05T03:06:27
proxied_vsf_votes0, 0, 0, 0
can_vote1
voting_power0
delayed_votes0
balance0.000 STEEM
savings_balance0.000 STEEM
sbd_balance0.575 SBD
savings_sbd_balance0.000 SBD
vesting_shares2171.132565 VESTS
delegated_vesting_shares0.000000 VESTS
received_vesting_shares5972.527241 VESTS
reward_vesting_balance0.000000 VESTS
vesting_balance0.000 STEEM
vesting_withdraw_rate0.000000 VESTS
next_vesting_withdrawal1969-12-31T23:59:59
withdrawn0
to_withdraw0
withdraw_routes0
savings_withdraw_requests0
last_account_recovery1970-01-01T00:00:00
reset_accountnull
last_owner_update1970-01-01T00:00:00
last_account_update2018-01-01T12:15:33
minedNo
sbd_seconds430,104,600
sbd_last_interest_payment2018-09-17T10:35:24
savings_sbd_last_interest_payment1970-01-01T00:00:00
{
  "active": {
    "account_auths": [],
    "key_auths": [
      [
        "STM5FkvxJaXc7b7WxP4AjxCbg8ZVPUFY6cSDsaasKmY1aazDG2Wm2",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "balance": "0.000 STEEM",
  "can_vote": true,
  "comment_count": 0,
  "created": "2017-12-24T07:28:15",
  "curation_rewards": 79,
  "delegated_vesting_shares": "0.000000 VESTS",
  "downvote_manabar": {
    "current_mana": 2035914951,
    "last_update_time": 1779062088
  },
  "guest_bloggers": [],
  "id": 523102,
  "json_metadata": "{\"profile\":{\"profile_image\":\"https://s20.postimg.org/pq9j7pywd/IMG-20171119-_WA0003.png\",\"name\":\"Eling Meyatmaja\",\"about\":\"Traveler, Sport & Coder\",\"location\":\"Medan\"}}",
  "last_account_recovery": "1970-01-01T00:00:00",
  "last_account_update": "2018-01-01T12:15:33",
  "last_owner_update": "1970-01-01T00:00:00",
  "last_post": "2018-10-04T04:14:30",
  "last_root_post": "2018-10-03T14:46:00",
  "last_vote_time": "2018-03-05T03:06:27",
  "lifetime_vote_count": 0,
  "market_history": [],
  "memo_key": "STM6SVpdvr2KWybnzQbqTpgM6Rm3WDvS7mzjm6GUbHtXFyt6LXyZ3",
  "mined": false,
  "name": "elingmeyatmaja",
  "next_vesting_withdrawal": "1969-12-31T23:59:59",
  "other_history": [],
  "owner": {
    "account_auths": [],
    "key_auths": [
      [
        "STM6CN6ne9MNuZHDQh4TQ2LSa6TzD65WmptvquQFAC2JGDW7YeGZc",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "pending_claimed_accounts": 0,
  "post_bandwidth": 0,
  "post_count": 19,
  "post_history": [],
  "posting": {
    "account_auths": [
      [
        "utopian.app",
        1
      ]
    ],
    "key_auths": [
      [
        "STM5iw4oEGTmo6E7EtQSuLAJoUHPvHxe1BRQ2ow8G2r5SqxVZPJUt",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "posting_json_metadata": "{\"profile\":{\"profile_image\":\"https://s20.postimg.org/pq9j7pywd/IMG-20171119-_WA0003.png\",\"name\":\"Eling Meyatmaja\",\"about\":\"Traveler, Sport & Coder\",\"location\":\"Medan\"}}",
  "posting_rewards": 973,
  "proxied_vsf_votes": [
    0,
    0,
    0,
    0
  ],
  "proxy": "",
  "received_vesting_shares": "5972.527241 VESTS",
  "recovery_account": "steem",
  "reputation": "9200324519",
  "reset_account": "null",
  "reward_sbd_balance": "0.000 SBD",
  "reward_steem_balance": "0.000 STEEM",
  "reward_vesting_balance": "0.000000 VESTS",
  "reward_vesting_steem": "0.000 STEEM",
  "savings_balance": "0.000 STEEM",
  "savings_sbd_balance": "0.000 SBD",
  "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_sbd_seconds": "0",
  "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
  "savings_withdraw_requests": 0,
  "sbd_balance": "0.575 SBD",
  "sbd_last_interest_payment": "2018-09-17T10:35:24",
  "sbd_seconds": "430104600",
  "sbd_seconds_last_update": "2018-10-12T07:57:27",
  "tags_usage": [],
  "to_withdraw": 0,
  "transfer_history": [],
  "vesting_balance": "0.000 STEEM",
  "vesting_shares": "2171.132565 VESTS",
  "vesting_withdraw_rate": "0.000000 VESTS",
  "vote_history": [],
  "voting_manabar": {
    "current_mana": "8143659806",
    "last_update_time": 1779062088
  },
  "voting_power": 0,
  "withdraw_routes": 0,
  "withdrawn": 0,
  "witness_votes": [],
  "witnesses_voted_for": 0,
  "rank": 1310237
}

Withdraw Routes

IncomingOutgoing
Empty
Empty
{
  "incoming": [],
  "outgoing": []
}
From Date
To Date
steemdelegated 3.672 SP to @elingmeyatmaja
2026/05/17 23:54:48
delegateeelingmeyatmaja
delegatorsteem
vesting shares5972.527241 VESTS
Transaction InfoBlock #106143042/Trx b4f98b2d96652e2a01a4ceb2688129895802ae3a
View Raw JSON Data
{
  "block": 106143042,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "5972.527241 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-05-17T23:54:48",
  "trx_id": "b4f98b2d96652e2a01a4ceb2688129895802ae3a",
  "trx_in_block": 0,
  "virtual_op": 0
}
steemdelegated 2.005 SP to @elingmeyatmaja
2026/05/12 02:26:30
delegateeelingmeyatmaja
delegatorsteem
vesting shares3260.316836 VESTS
Transaction InfoBlock #105974033/Trx 5879ab28fa8fa3f18100ee74a51d574e2c04043a
View Raw JSON Data
{
  "block": 105974033,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "3260.316836 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-05-12T02:26:30",
  "trx_id": "5879ab28fa8fa3f18100ee74a51d574e2c04043a",
  "trx_in_block": 0,
  "virtual_op": 0
}
steemdelegated 3.680 SP to @elingmeyatmaja
2026/04/25 23:16:12
delegateeelingmeyatmaja
delegatorsteem
vesting shares5985.042997 VESTS
Transaction InfoBlock #105510702/Trx 42cf2f83cbf24e15bf03605443d88e49f1e90859
View Raw JSON Data
{
  "block": 105510702,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "5985.042997 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-04-25T23:16:12",
  "trx_id": "42cf2f83cbf24e15bf03605443d88e49f1e90859",
  "trx_in_block": 4,
  "virtual_op": 0
}
steemdelegated 2.030 SP to @elingmeyatmaja
2026/01/23 06:52:30
delegateeelingmeyatmaja
delegatorsteem
vesting shares3301.863655 VESTS
Transaction InfoBlock #102850698/Trx 9f055ecae56e820c80304f7df12f96fafde8dce3
View Raw JSON Data
{
  "block": 102850698,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "3301.863655 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-01-23T06:52:30",
  "trx_id": "9f055ecae56e820c80304f7df12f96fafde8dce3",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 2.131 SP to @elingmeyatmaja
2024/12/17 02:12:00
delegateeelingmeyatmaja
delegatorsteem
vesting shares3466.082852 VESTS
Transaction InfoBlock #91297118/Trx 75d85aeb4148214dbb063b84d769c1a298d888e9
View Raw JSON Data
{
  "block": 91297118,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "3466.082852 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2024-12-17T02:12:00",
  "trx_id": "75d85aeb4148214dbb063b84d769c1a298d888e9",
  "trx_in_block": 3,
  "virtual_op": 0
}
steemdelegated 2.235 SP to @elingmeyatmaja
2023/11/13 17:54:42
delegateeelingmeyatmaja
delegatorsteem
vesting shares3635.216384 VESTS
Transaction InfoBlock #79851318/Trx e0da6eeae7a8818b87c5951914fc10a91e043810
View Raw JSON Data
{
  "block": 79851318,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "3635.216384 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2023-11-13T17:54:42",
  "trx_id": "e0da6eeae7a8818b87c5951914fc10a91e043810",
  "trx_in_block": 3,
  "virtual_op": 0
}
steemdelegated 4.041 SP to @elingmeyatmaja
2023/09/21 21:25:21
delegateeelingmeyatmaja
delegatorsteem
vesting shares6572.495170 VESTS
Transaction InfoBlock #78347339/Trx def37f3d80fc91f4ae16c2562932d0578fec976a
View Raw JSON Data
{
  "block": 78347339,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "6572.495170 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2023-09-21T21:25:21",
  "trx_id": "def37f3d80fc91f4ae16c2562932d0578fec976a",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 4.177 SP to @elingmeyatmaja
2022/11/03 11:16:30
delegateeelingmeyatmaja
delegatorsteem
vesting shares6794.176608 VESTS
Transaction InfoBlock #69112750/Trx f86b35e25b0f9d4358185cb5aaa00d515ad829c7
View Raw JSON Data
{
  "block": 69112750,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "6794.176608 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2022-11-03T11:16:30",
  "trx_id": "f86b35e25b0f9d4358185cb5aaa00d515ad829c7",
  "trx_in_block": 3,
  "virtual_op": 0
}
steemdelegated 4.313 SP to @elingmeyatmaja
2022/01/17 10:34:27
delegateeelingmeyatmaja
delegatorsteem
vesting shares7014.709839 VESTS
Transaction InfoBlock #60808955/Trx 0a4571cd4e5ab5fb8910b837f13badd41296d9c9
View Raw JSON Data
{
  "block": 60808955,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7014.709839 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2022-01-17T10:34:27",
  "trx_id": "0a4571cd4e5ab5fb8910b837f13badd41296d9c9",
  "trx_in_block": 14,
  "virtual_op": 0
}
steemdelegated 4.426 SP to @elingmeyatmaja
2021/06/14 00:30:42
delegateeelingmeyatmaja
delegatorsteem
vesting shares7198.478497 VESTS
Transaction InfoBlock #54607365/Trx 711469c340748553bc4e785f86b3ae7ca5c8ac34
View Raw JSON Data
{
  "block": 54607365,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7198.478497 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2021-06-14T00:30:42",
  "trx_id": "711469c340748553bc4e785f86b3ae7ca5c8ac34",
  "trx_in_block": 7,
  "virtual_op": 0
}
steemdelegated 4.541 SP to @elingmeyatmaja
2020/12/11 10:50:12
delegateeelingmeyatmaja
delegatorsteem
vesting shares7385.900471 VESTS
Transaction InfoBlock #49354838/Trx ea283f0290d8b81f3704637b964900fdc34efd0a
View Raw JSON Data
{
  "block": 49354838,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7385.900471 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-12-11T10:50:12",
  "trx_id": "ea283f0290d8b81f3704637b964900fdc34efd0a",
  "trx_in_block": 3,
  "virtual_op": 0
}
steemdelegated 1.176 SP to @elingmeyatmaja
2020/12/06 04:27:30
delegateeelingmeyatmaja
delegatorsteem
vesting shares1912.543513 VESTS
Transaction InfoBlock #49206407/Trx 35301ae2ea20b772ea49536b840be7896fce510f
View Raw JSON Data
{
  "block": 49206407,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "1912.543513 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-12-06T04:27:30",
  "trx_id": "35301ae2ea20b772ea49536b840be7896fce510f",
  "trx_in_block": 2,
  "virtual_op": 0
}
steemdelegated 4.545 SP to @elingmeyatmaja
2020/12/05 14:28:27
delegateeelingmeyatmaja
delegatorsteem
vesting shares7392.108325 VESTS
Transaction InfoBlock #49189940/Trx 7aa7e55c8d3f545e688fee026780ce9902c8062f
View Raw JSON Data
{
  "block": 49189940,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7392.108325 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-12-05T14:28:27",
  "trx_id": "7aa7e55c8d3f545e688fee026780ce9902c8062f",
  "trx_in_block": 4,
  "virtual_op": 0
}
steemdelegated 1.180 SP to @elingmeyatmaja
2020/11/02 14:56:18
delegateeelingmeyatmaja
delegatorsteem
vesting shares1920.017158 VESTS
Transaction InfoBlock #48256972/Trx 0eba6149d52033eb9156dd64adb7909b15413be7
View Raw JSON Data
{
  "block": 48256972,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "1920.017158 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-11-02T14:56:18",
  "trx_id": "0eba6149d52033eb9156dd64adb7909b15413be7",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 4.670 SP to @elingmeyatmaja
2020/05/09 05:24:27
delegateeelingmeyatmaja
delegatorsteem
vesting shares7594.913684 VESTS
Transaction InfoBlock #43216646/Trx 3027fcdf35d190ada2649ae42cfb6f182df877a0
View Raw JSON Data
{
  "block": 43216646,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7594.913684 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-05-09T05:24:27",
  "trx_id": "3027fcdf35d190ada2649ae42cfb6f182df877a0",
  "trx_in_block": 6,
  "virtual_op": 0
}
steemdelegated 1.201 SP to @elingmeyatmaja
2020/05/08 08:57:27
delegateeelingmeyatmaja
delegatorsteem
vesting shares1953.311140 VESTS
Transaction InfoBlock #43192685/Trx 10a2c421f750e4524bb72e52ebe71201cf9b627a
View Raw JSON Data
{
  "block": 43192685,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "1953.311140 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-05-08T08:57:27",
  "trx_id": "10a2c421f750e4524bb72e52ebe71201cf9b627a",
  "trx_in_block": 11,
  "virtual_op": 0
}
2019/12/24 08:49:33
authorsteemitboard
bodyCongratulations @elingmeyatmaja! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@elingmeyatmaja/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@elingmeyatmaja) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=elingmeyatmaja)_</sub> ###### [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!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinksteemitboard-notify-elingmeyatmaja-20191224t084933000z
title
Transaction InfoBlock #39312903/Trx 8bdae816f9ff295ceb4c4321d96207828036720f
View Raw JSON Data
{
  "block": 39312903,
  "op": [
    "comment",
    {
      "author": "steemitboard",
      "body": "Congratulations @elingmeyatmaja! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@elingmeyatmaja/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>\n\n<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@elingmeyatmaja) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=elingmeyatmaja)_</sub>\n\n\n###### [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!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "steemitboard-notify-elingmeyatmaja-20191224t084933000z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-12-24T08:49:33",
  "trx_id": "8bdae816f9ff295ceb4c4321d96207828036720f",
  "trx_in_block": 4,
  "virtual_op": 0
}
steemdelegated 4.722 SP to @elingmeyatmaja
2019/12/06 04:39:42
delegateeelingmeyatmaja
delegatorsteem
vesting shares7680.715258 VESTS
Transaction InfoBlock #38790474/Trx e84d096a28b13c31bafa9e92c2edd5556eade925
View Raw JSON Data
{
  "block": 38790474,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7680.715258 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-12-06T04:39:42",
  "trx_id": "e84d096a28b13c31bafa9e92c2edd5556eade925",
  "trx_in_block": 17,
  "virtual_op": 0
}
steemdelegated 4.843 SP to @elingmeyatmaja
2019/01/03 05:20:54
delegateeelingmeyatmaja
delegatorsteem
vesting shares7877.774968 VESTS
Transaction InfoBlock #29123130/Trx 534f647d29fbb4de8adba98c09d945bac76b993b
View Raw JSON Data
{
  "block": 29123130,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "7877.774968 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-01-03T05:20:54",
  "trx_id": "534f647d29fbb4de8adba98c09d945bac76b993b",
  "trx_in_block": 11,
  "virtual_op": 0
}
2018/12/24 11:01:03
authorsteemitboard
bodyCongratulations @elingmeyatmaja! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@elingmeyatmaja/birthday1.png</td><td>1 Year on Steemit</td></tr></table> <sub>_[Click here to view your Board](https://steemitboard.com/@elingmeyatmaja)_</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/christmas/@steemitboard/christmas-challenge-send-a-gift-to-to-your-friends"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/kf4SJb.png"></a></td><td><a href="https://steemit.com/christmas/@steemitboard/christmas-challenge-send-a-gift-to-to-your-friends">Christmas Challenge - Send a gift to to your friends</a></td></tr></table> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinksteemitboard-notify-elingmeyatmaja-20181224t110102000z
title
Transaction InfoBlock #28842114/Trx 6a46183a29d6ba04c18267360890be01d88c30cb
View Raw JSON Data
{
  "block": 28842114,
  "op": [
    "comment",
    {
      "author": "steemitboard",
      "body": "Congratulations @elingmeyatmaja! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@elingmeyatmaja/birthday1.png</td><td>1 Year on Steemit</td></tr></table>\n\n<sub>_[Click here to view your Board](https://steemitboard.com/@elingmeyatmaja)_</sub>\n\n\n**Do not miss the last post from @steemitboard:**\n<table><tr><td><a href=\"https://steemit.com/christmas/@steemitboard/christmas-challenge-send-a-gift-to-to-your-friends\"><img src=\"https://steemitimages.com/64x128/http://i.cubeupload.com/kf4SJb.png\"></a></td><td><a href=\"https://steemit.com/christmas/@steemitboard/christmas-challenge-send-a-gift-to-to-your-friends\">Christmas Challenge - Send a gift to to your friends</a></td></tr></table>\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "steemitboard-notify-elingmeyatmaja-20181224t110102000z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-12-24T11:01:03",
  "trx_id": "6a46183a29d6ba04c18267360890be01d88c30cb",
  "trx_in_block": 4,
  "virtual_op": 0
}
steemdelegated 17.284 SP to @elingmeyatmaja
2018/10/12 08:03:06
delegateeelingmeyatmaja
delegatorsteem
vesting shares28112.898180 VESTS
Transaction InfoBlock #26737502/Trx c59ac6c78fc84b287c302fd022c8e171ec12d4e6
View Raw JSON Data
{
  "block": 26737502,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "28112.898180 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-12T08:03:06",
  "trx_id": "c59ac6c78fc84b287c302fd022c8e171ec12d4e6",
  "trx_in_block": 11,
  "virtual_op": 0
}
elingmeyatmajaclaimed reward balance: 0.375 SBD, 0.559 SP
2018/10/12 07:57:27
accountelingmeyatmaja
reward sbd0.375 SBD
reward steem0.000 STEEM
reward vests908.615652 VESTS
Transaction InfoBlock #26737389/Trx 04ce7eb8292b3af069b4359263ab5c18c709a9c9
View Raw JSON Data
{
  "block": 26737389,
  "op": [
    "claim_reward_balance",
    {
      "account": "elingmeyatmaja",
      "reward_sbd": "0.375 SBD",
      "reward_steem": "0.000 STEEM",
      "reward_vests": "908.615652 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-12T07:57:27",
  "trx_id": "04ce7eb8292b3af069b4359263ab5c18c709a9c9",
  "trx_in_block": 15,
  "virtual_op": 0
}
2018/10/11 01:23:12
authorsteemitboard
bodyCongratulations @elingmeyatmaja! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : [![](https://steemitimages.com/70x70/http://steemitboard.com/notifications/firstpayout.png)](http://steemitboard.com/@elingmeyatmaja) You got your First payout <sub>_Click on the badge to view your Board of Honor._</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/spanish/@steemitboard/presentamos-el-ranking-de-steemitboard"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png"></a></td><td><a href="https://steemit.com/spanish/@steemitboard/presentamos-el-ranking-de-steemitboard">Presentamos el Ranking de SteemitBoard</a></td></tr></table> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinksteemitboard-notify-elingmeyatmaja-20181011t012314000z
title
Transaction InfoBlock #26700750/Trx d73ce6691e3b5e00d12fe8df07f7a0b0540c255b
View Raw JSON Data
{
  "block": 26700750,
  "op": [
    "comment",
    {
      "author": "steemitboard",
      "body": "Congratulations @elingmeyatmaja! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :\n\n[![](https://steemitimages.com/70x70/http://steemitboard.com/notifications/firstpayout.png)](http://steemitboard.com/@elingmeyatmaja) You got your First payout\n\n<sub>_Click on the badge to view your Board of Honor._</sub>\n<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>\n\n\n\n**Do not miss the last post from @steemitboard:**\n<table><tr><td><a href=\"https://steemit.com/spanish/@steemitboard/presentamos-el-ranking-de-steemitboard\"><img src=\"https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png\"></a></td><td><a href=\"https://steemit.com/spanish/@steemitboard/presentamos-el-ranking-de-steemitboard\">Presentamos el Ranking de SteemitBoard</a></td></tr></table>\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "steemitboard-notify-elingmeyatmaja-20181011t012314000z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-11T01:23:12",
  "trx_id": "d73ce6691e3b5e00d12fe8df07f7a0b0540c255b",
  "trx_in_block": 14,
  "virtual_op": 0
}
elingmeyatmajareceived 0.375 SBD, 0.559 SP author reward for @elingmeyatmaja / building-restful-apis-with-the-gin-framework
2018/10/10 14:46:00
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
sbd payout0.375 SBD
steem payout0.000 STEEM
vesting payout908.615652 VESTS
Transaction InfoBlock #26688019/Virtual Operation #19
View Raw JSON Data
{
  "block": 26688019,
  "op": [
    "author_reward",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "sbd_payout": "0.375 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "908.615652 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-10T14:46:00",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 19
}
2018/10/04 18:49:48
authorportugalcoin
bodyComment deleted ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
json metadata{"tags":["utopian-io"],"links":["https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinkre-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t230302307z
title
Transaction InfoBlock #26520199/Trx c91b41cea3509195e6ea5f35d2b985915f30a4df
View Raw JSON Data
{
  "block": 26520199,
  "op": [
    "comment",
    {
      "author": "portugalcoin",
      "body": "Comment deleted\n\n---- \nNeed help? Write a ticket on https://support.utopian.io/. \nChat with us on [Discord](https://discord.gg/uTyJkNm). \n[[utopian-moderator]](https://join.utopian.io/)",
      "json_metadata": "{\"tags\":[\"utopian-io\"],\"links\":[\"https://support.utopian.io/\",\"https://discord.gg/uTyJkNm\",\"https://join.utopian.io/\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t230302307z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-04T18:49:48",
  "trx_id": "c91b41cea3509195e6ea5f35d2b985915f30a4df",
  "trx_in_block": 11,
  "virtual_op": 0
}
2018/10/04 08:51:57
authormcfarhat
bodyYour contribution has been found to be a copy of https://blog.narenarya.in/build-rest-api-go-mysql.html This is considered plagiarism. Plagiarism is a serious offense, and hence your account has been banned for 30 days from receiving Utopian reviews. Future plagiarism can lead to permanent ban of your account ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
json metadata{"tags":["utopian-io"],"links":["https://blog.narenarya.in/build-rest-api-go-mysql.html","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinkre-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181004t085126878z
title
Transaction InfoBlock #26508248/Trx 5dfaa70e08a48907f64bc0af23e656760a245c78
View Raw JSON Data
{
  "block": 26508248,
  "op": [
    "comment",
    {
      "author": "mcfarhat",
      "body": "Your contribution has been found to be a copy of https://blog.narenarya.in/build-rest-api-go-mysql.html\nThis is considered plagiarism. Plagiarism is a serious offense, and hence your account has been banned for 30 days from receiving Utopian reviews.\nFuture plagiarism can lead to permanent ban of your account\n\n\n---- \nNeed help? Write a ticket on https://support.utopian.io/. \nChat with us on [Discord](https://discord.gg/uTyJkNm). \n[[utopian-moderator]](https://join.utopian.io/)",
      "json_metadata": "{\"tags\":[\"utopian-io\"],\"links\":[\"https://blog.narenarya.in/build-rest-api-go-mysql.html\",\"https://support.utopian.io/\",\"https://discord.gg/uTyJkNm\",\"https://join.utopian.io/\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181004t085126878z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-04T08:51:57",
  "trx_id": "5dfaa70e08a48907f64bc0af23e656760a245c78",
  "trx_in_block": 3,
  "virtual_op": 0
}
2018/10/04 04:14:30
authorelingmeyatmaja
bodyThank you for your moderation, I've updated my tittle too.
json metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
parent authorportugalcoin
parent permlinkre-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t230302307z
permlinkre-portugalcoin-re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181004t041429634z
title
Transaction InfoBlock #26502701/Trx 3b8eb5eb7439d53eebad963e4f304681c90d825f
View Raw JSON Data
{
  "block": 26502701,
  "op": [
    "comment",
    {
      "author": "elingmeyatmaja",
      "body": "Thank you for your moderation, I've updated my tittle too.",
      "json_metadata": "{\"tags\":[\"utopian-io\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "portugalcoin",
      "parent_permlink": "re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t230302307z",
      "permlink": "re-portugalcoin-re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181004t041429634z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-04T04:14:30",
  "trx_id": "3b8eb5eb7439d53eebad963e4f304681c90d825f",
  "trx_in_block": 16,
  "virtual_op": 0
}
2018/10/04 04:06:48
authorelingmeyatmaja
body![goalng.png](https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png) # Repository <h1> https://github.com/gin-gonic/gin # What Will I Learn?<h1> - Creating a REST API with the go-restful package - Creating a connection to MySql database - Introducing the Gin framework for creating a REST API - Testing the RESTful API with this GUI tool # Requirements<h1> State the requirements the user needs in order to follow this tutorial. - Localhost xampp - Basic GoLang - Basic Gin Golang - Basic Database MySQL # Difficulty<h1> Intermediate # Tutorial Contents<h1> In this chapter, we are going to use a framework for simplifying building REST services. First, we will take a quick look at gin. Gin-gonic is a framework based on the httprouter. In this section I will show you how build REST service gin connect to mysql. Prepare your databases https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg To install Gin package, you need to install Go and set your Go workspace first. GOPATH is nothing but the current appointed workspace on your machine. It is an environment variable that tells the Go compiler about where your source code, binaries, and packages are placed. While developing, set the GOPATH to one of your projects. The Go compiler now activates that project. 1. Download and install it: $ go get -u github.com/gin-gonic/gin Simple install the package to your $GOPATH with the go tool from shell: $ go get -u github.com/go-sql-driver/mysql Make sure Git is installed on your machine and in your system's PATH. 2. REST uses the URI to decode its resource to be handled. There are quite a few REST verbs available, but six of them are used frequently. They are as follows: - GET - POST - PUT - PATCH - DELETE Breakdown code ``` package main import ( "bytes" "database/sql" "fmt" "net/http" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" ) ``` - Package bytes implements functions for the manipulation of byte slices. It is analogous to the facilities of the strings package. - Package sql provides a generic interface around SQL (or SQL-like) databases. - Package fmt implements formatted I/O with functions - Imported a few packages. github.com/gin-gonic/gin, github.com/go-sql-driver/mysql is the data service we created before. - net/http is the core package we used to handle an HTTP request through its HandleFunc function. That function's arguments are http.Request and http.ResponseWriter. Those two deal with the request and response of an HTTP request. ``` package main import ( "bytes" "database/sql" "fmt" "net/http" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" ) func main() { db, err := sql.Open("mysql", "root:passapp@tcp(127.0.0.1:3306)/gotest") if err != nil { fmt.Print(err.Error()) } defer db.Close() // make sure connection is available err = db.Ping() if err != nil { fmt.Print(err.Error()) } type Person struct { Id int First_Name string Last_Name string } router := gin.Default() // Add API handlers here router.Run(":3000") } ``` - In every gin app, we should create a Default or New gin router - We can specify :port on which our Gin applications run using port 3000 - We will keep the article structure simple with just three fields - Id, First_Name and Last_Name. This can be represented with a struct as follows: - The Data Source Name has a common format, but without type-prefix (optional parts marked by squared brackets): - example : [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN] ``` // GET a person detail router.GET("/person/:id", func(c *gin.Context) { var ( person Person result gin.H ) id := c.Param("id") row := db.QueryRow("select id, first_name, last_name from person where id = ?;", id) err = row.Scan(&person.Id, &person.First_Name, &person.Last_Name) if err != nil { // If no results send null result = gin.H{ "result": nil, "count": 0, } } else { result = gin.H{ "result": person, "count": 1, } } c.JSON(http.StatusOK, result) }) ``` - Routing is one of the core features that all modern frameworks provide. Any web page or an API end point is accessed by a URL. Frameworks use routes to handle requests to these URLs. - Gin offers a fast router that's easy to configure and use. Apart from handling specified URLs, Gin routers can also handle patterns and grouped URLs. - A GET method fetches the given resource from the server. To specify a resource, GET uses a few types of URI queries: - Query parameters - Path-based parameters - We use http.StatusOK to set the status code of the response header. The WriteHeader and Write functions are available on the response object for writing the header and body, respectively. ``` /// GET all persons router.GET("/persons", func(c *gin.Context) { var ( person Person persons []Person ) rows, err := db.Query("select id, first_name, last_name from person;") if err != nil { fmt.Print(err.Error()) } for rows.Next() { err = rows.Scan(&person.Id, &person.First_Name, &person.Last_Name) persons = append(persons, person) if err != nil { fmt.Print(err.Error()) } } defer rows.Close() c.JSON(http.StatusOK, gin.H{ "result": persons, "count": len(persons), }) }) ``` Here, the resource query is with the path parameter. Query parameters are intended to add detailed information to identify a resource from the server. For example, take this sample fictitious API. Let us assume this API is created for fetching, creating, and updating ``` // POST new person details router.POST("/person", func(c *gin.Context) { var buffer bytes.Buffer first_name := c.PostForm("first_name") last_name := c.PostForm("last_name") stmt, err := db.Prepare("insert into person (first_name, last_name) values(?,?);") if err != nil { fmt.Print(err.Error()) } _, err = stmt.Exec(first_name, last_name) if err != nil { fmt.Print(err.Error()) } // Fastest way to append strings buffer.WriteString(first_name) buffer.WriteString(" ") buffer.WriteString(last_name) defer stmt.Close() name := buffer.String() c.JSON(http.StatusOK, gin.H{ "message": fmt.Sprintf(" %s successfully created", name), }) }) ``` The POST method is used to create a resource on the server. A successful POST operation returns a 201 status code. ``` // PUT - update a person details router.PUT("/person", func(c *gin.Context) { var buffer bytes.Buffer id := c.Query("id") first_name := c.PostForm("first_name") last_name := c.PostForm("last_name") stmt, err := db.Prepare("update person set first_name= ?, last_name= ? where id= ?;") if err != nil { fmt.Print(err.Error()) } _, err = stmt.Exec(first_name, last_name, id) if err != nil { fmt.Print(err.Error()) } // Fastest way to append strings buffer.WriteString(first_name) buffer.WriteString(" ") buffer.WriteString(last_name) defer stmt.Close() name := buffer.String() c.JSON(http.StatusOK, gin.H{ "message": fmt.Sprintf("Successfully updated to %s", name), }) }) ``` - In this part, create and initialize a new Buffer using string as its initial contents. It is intended to prepare a buffer to read an existing string. - The PUT method is similar to POST. It is used to replace the resource that already exists. The main difference is that PUT is idempotent. A POST call creates two instances with the same data. But PUT updates a single resource that already exists. ``` // Delete resources router.DELETE("/person", func(c *gin.Context) { id := c.Query("id") stmt, err := db.Prepare("delete from person where id= ?;") if err != nil { fmt.Print(err.Error()) } _, err = stmt.Exec(id) if err != nil { fmt.Print(err.Error()) } c.JSON(http.StatusOK, gin.H{ "message": fmt.Sprintf("Successfully deleted user: %s", id), }) }) ``` The DELETE API method is used to delete a resource from the database. It is similar to PUT but without any body. It just needs an ID of the resource to be deleted. Once a resource gets deleted, subsequent GET requests return a 404 not found status. If we run this program: run main.go ![gin.png](https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png) The following screenshot shows the JSON response body in Postman for the HTTP GET request: ![postman.png](https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png) # Proof of Work Done<h1> https://github.com/elingmeyatmaja/RESTful-APIs-Gin-
json metadata{"tags":["utopian-io","tutorials","webservice","restful","golang"],"image":["https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png","https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg","https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png","https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png"],"links":["https://github.com/gin-gonic/gin","https://github.com/elingmeyatmaja/RESTful-APIs-Gin-"],"app":"steemit/0.1","format":"markdown"}
parent author
parent permlinkutopian-io
permlinkbuilding-restful-apis-with-the-gin-framework
titleMySql tutorial : Building RESTful APIs with the Gin framework
Transaction InfoBlock #26502547/Trx 8c6f11bf0a3d2721e5d0476d33f77044b2793546
View Raw JSON Data
{
  "block": 26502547,
  "op": [
    "comment",
    {
      "author": "elingmeyatmaja",
      "body": "![goalng.png](https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png)\n\n# Repository <h1>\nhttps://github.com/gin-gonic/gin\n# What Will I Learn?<h1> \n- Creating a REST API with the go-restful package\n- Creating a connection to MySql database\n- Introducing the Gin framework for creating a REST API\n- Testing the RESTful API with this GUI tool\n\n# Requirements<h1> \nState the requirements the user needs in order to follow this tutorial.\n- Localhost xampp\n- Basic GoLang\n- Basic Gin Golang \n- Basic Database MySQL\n\n# Difficulty<h1> \nIntermediate\n# Tutorial Contents<h1> \nIn this chapter, we are going to use a framework for simplifying building REST services. First, we will take a quick look at gin. Gin-gonic is a framework based on the httprouter. In this section I will show you how build REST service gin connect to mysql.\n\nPrepare your databases \nhttps://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg\n\nTo install Gin package, you need to install Go and set your Go workspace first. GOPATH is nothing but the current appointed workspace on your machine. It is an\nenvironment variable that tells the Go compiler about where your source code, binaries,\nand packages are placed. While developing, set the GOPATH to one\nof your projects. The Go compiler now activates that project.\n1. Download and install it:\n$ go get -u github.com/gin-gonic/gin\nSimple install the package to your $GOPATH with the go tool from shell:\n$ go get -u github.com/go-sql-driver/mysql\nMake sure Git is installed on your machine and in your system's PATH.\n\n2. REST uses the URI to decode its resource to be handled. There are quite a few REST verbs available, but six of them are used frequently. They are as follows:\n- GET\n- POST\n- PUT\n- PATCH\n- DELETE\n\nBreakdown code\n\n```\npackage main\n\nimport (\n    \"bytes\"\n    \"database/sql\"\n    \"fmt\"\n    \"net/http\"\n\n    \"github.com/gin-gonic/gin\"\n    _ \"github.com/go-sql-driver/mysql\"\n)\n\n```\n- Package bytes implements functions for the manipulation of byte slices. It is analogous to the facilities of the strings package.\n- Package sql provides a generic interface around SQL (or SQL-like) databases. \n- Package fmt implements formatted I/O with functions\n- Imported a few packages. github.com/gin-gonic/gin, github.com/go-sql-driver/mysql is the  data service we created   before.\n- net/http is the core package we used to handle an HTTP request through its HandleFunc function. That function's arguments are http.Request and http.ResponseWriter. Those two deal with the request and response of an HTTP request.\n\n```\npackage main\n\t\n\timport (\n\t\t\"bytes\"\n\t\t\"database/sql\"\n\t\t\"fmt\"\n\t\t\"net/http\"\n\t\n\t\t\"github.com/gin-gonic/gin\"\n\t\t_ \"github.com/go-sql-driver/mysql\"\n\t)\n\t\n\tfunc main() {\n\t\tdb, err := sql.Open(\"mysql\", \"root:passapp@tcp(127.0.0.1:3306)/gotest\")\n\t\tif err != nil {\n\t\t\tfmt.Print(err.Error())\n\t\t}\n\t\tdefer db.Close()\n\t\t// make sure connection is available\n\t\terr = db.Ping()\n\t\tif err != nil {\n\t\t\tfmt.Print(err.Error())\n\t\t}\n\t\ttype Person struct {\n\t\t\tId         int\n\t\t\tFirst_Name string\n\t\t\tLast_Name  string\n\t\t}\n\t\trouter := gin.Default()\n\t\t// Add API handlers here\n\t\trouter.Run(\":3000\")\n\t}\n\n```\n\n- In every gin app, we should create a Default or New gin router\n- We can specify :port on which our Gin applications run using port 3000\n- We will keep the article structure simple with just three fields - Id, First_Name and Last_Name. This can be represented with a struct as follows:\n- The Data Source Name has a common format, but without type-prefix (optional parts marked by squared brackets):\n        - example : [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN]\n\n```\n// GET a person detail\n    router.GET(\"/person/:id\", func(c *gin.Context) {\n        var (\n            person Person\n            result gin.H\n        )\n        id := c.Param(\"id\")\n        row := db.QueryRow(\"select id, first_name, last_name from person where id = ?;\", id)\n        err = row.Scan(&person.Id, &person.First_Name, &person.Last_Name)\n        if err != nil {\n            // If no results send null\n            result = gin.H{\n                \"result\": nil,\n                \"count\":  0,\n            }\n        } else {\n            result = gin.H{\n                \"result\": person,\n                \"count\":  1,\n            }\n        }\n        c.JSON(http.StatusOK, result)\n    })\n\n```\n- Routing is one of the core features that all modern frameworks provide. Any web page or an API end point is accessed by a URL. Frameworks use routes to handle requests to these URLs. \n- Gin offers a fast router that's easy to configure and use. Apart from handling specified URLs, Gin routers can also handle patterns and grouped URLs.\n- A GET method fetches the given resource from the server. To specify a resource, GET uses a few types of URI queries:\n\t- Query parameters\n\t- Path-based parameters\n- We use http.StatusOK to set the status code of the response header. The WriteHeader and Write functions are available on the response object for writing the header and body, respectively.\n\n```\n/// GET all persons\n    router.GET(\"/persons\", func(c *gin.Context) {\n        var (\n            person  Person\n            persons []Person\n        )\n        rows, err := db.Query(\"select id, first_name, last_name from person;\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        for rows.Next() {\n            err = rows.Scan(&person.Id, &person.First_Name, &person.Last_Name)\n            persons = append(persons, person)\n            if err != nil {\n                fmt.Print(err.Error())\n            }\n        }\n        defer rows.Close()\n        c.JSON(http.StatusOK, gin.H{\n            \"result\": persons,\n            \"count\":  len(persons),\n        })\n    })\n\n```\nHere, the resource query is with the path parameter. Query parameters are intended to add detailed information to identify a resource from the server. For example, take this sample fictitious API. Let us assume this API is created for fetching, creating, and updating \n\n```\n// POST new person details\n    router.POST(\"/person\", func(c *gin.Context) {\n        var buffer bytes.Buffer\n        first_name := c.PostForm(\"first_name\")\n        last_name := c.PostForm(\"last_name\")\n        stmt, err := db.Prepare(\"insert into person (first_name, last_name) values(?,?);\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        _, err = stmt.Exec(first_name, last_name)\n\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n\n        // Fastest way to append strings\n        buffer.WriteString(first_name)\n        buffer.WriteString(\" \")\n        buffer.WriteString(last_name)\n        defer stmt.Close()\n        name := buffer.String()\n        c.JSON(http.StatusOK, gin.H{\n            \"message\": fmt.Sprintf(\" %s successfully created\", name),\n        })\n    })\n\n```\nThe POST method  is used to create a resource on the server. A successful POST operation returns a 201 status code.\n```\n// PUT - update a person details\n    router.PUT(\"/person\", func(c *gin.Context) {\n        var buffer bytes.Buffer\n        id := c.Query(\"id\")\n        first_name := c.PostForm(\"first_name\")\n        last_name := c.PostForm(\"last_name\")\n        stmt, err := db.Prepare(\"update person set first_name= ?, last_name= ? where id= ?;\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        _, err = stmt.Exec(first_name, last_name, id)\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n\n        // Fastest way to append strings\n        buffer.WriteString(first_name)\n        buffer.WriteString(\" \")\n        buffer.WriteString(last_name)\n        defer stmt.Close()\n        name := buffer.String()\n        c.JSON(http.StatusOK, gin.H{\n            \"message\": fmt.Sprintf(\"Successfully updated to %s\", name),\n        })\n    })\n```\n- In this part, create and initialize a new Buffer using string as its initial contents. It is intended to prepare a buffer to read an existing string.\n- The PUT method is similar to POST. It is used to replace the resource that already exists. The main difference is that PUT is idempotent. A POST call creates two instances with the same data. But PUT updates a single resource that already exists.\n```\n// Delete resources\n    router.DELETE(\"/person\", func(c *gin.Context) {\n        id := c.Query(\"id\")\n        stmt, err := db.Prepare(\"delete from person where id= ?;\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        _, err = stmt.Exec(id)\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        c.JSON(http.StatusOK, gin.H{\n            \"message\": fmt.Sprintf(\"Successfully deleted user: %s\", id),\n        })\n    })\n\n```\n\nThe DELETE API method is used to delete a resource from the database. It is similar to PUT but without any body. It just needs an ID of the resource to be deleted. Once a resource gets deleted, subsequent GET requests return a 404 not found status.\n\nIf we run this program:\nrun main.go\n\n![gin.png](https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png)\n\nThe following screenshot shows the JSON response body in Postman for the HTTP GET\nrequest:\n\n![postman.png](https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png)\n# Proof of Work Done<h1> \nhttps://github.com/elingmeyatmaja/RESTful-APIs-Gin-",
      "json_metadata": "{\"tags\":[\"utopian-io\",\"tutorials\",\"webservice\",\"restful\",\"golang\"],\"image\":[\"https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png\",\"https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg\",\"https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png\",\"https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png\"],\"links\":[\"https://github.com/gin-gonic/gin\",\"https://github.com/elingmeyatmaja/RESTful-APIs-Gin-\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      "parent_author": "",
      "parent_permlink": "utopian-io",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "title": "MySql tutorial : Building RESTful APIs with the Gin framework"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-04T04:06:48",
  "trx_id": "8c6f11bf0a3d2721e5d0476d33f77044b2793546",
  "trx_in_block": 3,
  "virtual_op": 0
}
2018/10/04 00:06:51
authorsteem-ua
body#### Hi @elingmeyatmaja! Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io! **Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
json metadata{"app": "beem/0.20.5"}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinkre-building-restful-apis-with-the-gin-framework-20181004t000650z
title
Transaction InfoBlock #26497750/Trx 22f84e1cd99105048a5b83e572704cfac807e2fd
View Raw JSON Data
{
  "block": 26497750,
  "op": [
    "comment",
    {
      "author": "steem-ua",
      "body": "#### Hi @elingmeyatmaja!\n\nYour post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!\nYour post is eligible for our upvote, thanks to our collaboration with @utopian-io!\n**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**",
      "json_metadata": "{\"app\": \"beem/0.20.5\"}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "re-building-restful-apis-with-the-gin-framework-20181004t000650z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-04T00:06:51",
  "trx_id": "22f84e1cd99105048a5b83e572704cfac807e2fd",
  "trx_in_block": 10,
  "virtual_op": 0
}
2018/10/04 00:06:39
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votersteem-ua
weight133 (1.33%)
Transaction InfoBlock #26497746/Trx 2ae66b7be9bf8bfde05626c96176c65a802566ba
View Raw JSON Data
{
  "block": 26497746,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "steem-ua",
      "weight": 133
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-04T00:06:39",
  "trx_id": "2ae66b7be9bf8bfde05626c96176c65a802566ba",
  "trx_in_block": 25,
  "virtual_op": 0
}
2018/10/03 23:10:00
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterbullinachinashop
weight10000 (100.00%)
Transaction InfoBlock #26496613/Trx 71a3d9742f1f639f6b7dca4fc07f0c24bac7fa0c
View Raw JSON Data
{
  "block": 26496613,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "bullinachinashop",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T23:10:00",
  "trx_id": "71a3d9742f1f639f6b7dca4fc07f0c24bac7fa0c",
  "trx_in_block": 12,
  "virtual_op": 0
}
2018/10/03 23:10:00
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votermightypanda
weight4500 (45.00%)
Transaction InfoBlock #26496613/Trx 4a170723e81c0c605f4ea9b5b5d9f6988053096a
View Raw JSON Data
{
  "block": 26496613,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "mightypanda",
      "weight": 4500
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T23:10:00",
  "trx_id": "4a170723e81c0c605f4ea9b5b5d9f6988053096a",
  "trx_in_block": 11,
  "virtual_op": 0
}
2018/10/03 23:03:09
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterportugalcoin
weight2800 (28.00%)
Transaction InfoBlock #26496476/Trx 7a511483a9959d3bfc0343b97dd609dd1c8f9987
View Raw JSON Data
{
  "block": 26496476,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "portugalcoin",
      "weight": 2800
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T23:03:09",
  "trx_id": "7a511483a9959d3bfc0343b97dd609dd1c8f9987",
  "trx_in_block": 9,
  "virtual_op": 0
}
2018/10/03 23:03:03
authorportugalcoin
bodyThank you for your contribution @elingmeyatmaja. We have been analyzing your tutorial and we suggest the following points: - We suggest that you enter as a keyword in the title of your MySql tutorial. Your tutorial is very intuitive. However we have seen a tutorial that complements yours <a href="https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3">link</a>. Good work and we look forward to more tutorials from you. Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/21313323). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
json metadata{"tags":["utopian-io"],"users":["elingmeyatmaja"],"links":["https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3","https://join.utopian.io/guidelines","https://review.utopian.io/result/8/21313323","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinkre-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t230302307z
title
Transaction InfoBlock #26496474/Trx 00f2c73c4ada1fc2e4bcef811330c8dad67b43a7
View Raw JSON Data
{
  "block": 26496474,
  "op": [
    "comment",
    {
      "author": "portugalcoin",
      "body": "Thank you for your contribution @elingmeyatmaja.\nWe have been analyzing your tutorial and we suggest the following points:\n\n- We suggest that you enter as a keyword in the title of your MySql tutorial.\n\nYour tutorial is very intuitive. However we have seen a tutorial that complements yours <a href=\"https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3\">link</a>.\n\nGood work and we look forward to more tutorials from you.\n\nYour contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.\n\nTo view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/21313323).\n\n---- \nNeed help? Write a ticket on https://support.utopian.io/. \nChat with us on [Discord](https://discord.gg/uTyJkNm). \n[[utopian-moderator]](https://join.utopian.io/)",
      "json_metadata": "{\"tags\":[\"utopian-io\"],\"users\":[\"elingmeyatmaja\"],\"links\":[\"https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3\",\"https://join.utopian.io/guidelines\",\"https://review.utopian.io/result/8/21313323\",\"https://support.utopian.io/\",\"https://discord.gg/uTyJkNm\",\"https://join.utopian.io/\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t230302307z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T23:03:03",
  "trx_id": "00f2c73c4ada1fc2e4bcef811330c8dad67b43a7",
  "trx_in_block": 1,
  "virtual_op": 0
}
2018/10/03 22:18:15
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterholger80
weight7500 (75.00%)
Transaction InfoBlock #26495582/Trx 383a0cedb1086ba0ade552fe3fb699969a05e49a
View Raw JSON Data
{
  "block": 26495582,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "holger80",
      "weight": 7500
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T22:18:15",
  "trx_id": "383a0cedb1086ba0ade552fe3fb699969a05e49a",
  "trx_in_block": 14,
  "virtual_op": 0
}
2018/10/03 16:52:57
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voteramosbastian
weight500 (5.00%)
Transaction InfoBlock #26489079/Trx cc45a30d10ccf1c74b383cb5f79af27e7e2f9e26
View Raw JSON Data
{
  "block": 26489079,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "amosbastian",
      "weight": 500
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T16:52:57",
  "trx_id": "cc45a30d10ccf1c74b383cb5f79af27e7e2f9e26",
  "trx_in_block": 2,
  "virtual_op": 0
}
2018/10/03 16:04:48
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votercodingdefined
weight1000 (10.00%)
Transaction InfoBlock #26488116/Trx b4e2edc208edffaf27fd1e19f134794f845defa8
View Raw JSON Data
{
  "block": 26488116,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "codingdefined",
      "weight": 1000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T16:04:48",
  "trx_id": "b4e2edc208edffaf27fd1e19f134794f845defa8",
  "trx_in_block": 15,
  "virtual_op": 0
}
2018/10/03 15:57:45
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterremlaps2
weight10000 (100.00%)
Transaction InfoBlock #26487975/Trx f4ec8b269fe3bac1076252fbf9772d9b4ea59c54
View Raw JSON Data
{
  "block": 26487975,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "remlaps2",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:45",
  "trx_id": "f4ec8b269fe3bac1076252fbf9772d9b4ea59c54",
  "trx_in_block": 24,
  "virtual_op": 0
}
2018/10/03 15:57:45
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votercub2
weight10000 (100.00%)
Transaction InfoBlock #26487975/Trx 0e5213c0bff41d8b88cd05f4a83f6c033cea41c9
View Raw JSON Data
{
  "block": 26487975,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "cub2",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:45",
  "trx_id": "0e5213c0bff41d8b88cd05f4a83f6c033cea41c9",
  "trx_in_block": 2,
  "virtual_op": 0
}
2018/10/03 15:57:42
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterremlaps-lite
weight10000 (100.00%)
Transaction InfoBlock #26487974/Trx 9ca64771e7ca279f859a6d4e6aaded59bd4cb9b7
View Raw JSON Data
{
  "block": 26487974,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "remlaps-lite",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:42",
  "trx_id": "9ca64771e7ca279f859a6d4e6aaded59bd4cb9b7",
  "trx_in_block": 9,
  "virtual_op": 0
}
2018/10/03 15:57:39
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votercmp2020-lite
weight10000 (100.00%)
Transaction InfoBlock #26487973/Trx 7fcca0d8012684ddfe726d636bd37e031ad38f09
View Raw JSON Data
{
  "block": 26487973,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "cmp2020-lite",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:39",
  "trx_id": "7fcca0d8012684ddfe726d636bd37e031ad38f09",
  "trx_in_block": 15,
  "virtual_op": 0
}
2018/10/03 15:57:39
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterrgkmb-unofficial
weight10000 (100.00%)
Transaction InfoBlock #26487973/Trx 3ff67f5ec8eafbaef6d8a3bad803d5363d7f2da8
View Raw JSON Data
{
  "block": 26487973,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "rgkmb-unofficial",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:39",
  "trx_id": "3ff67f5ec8eafbaef6d8a3bad803d5363d7f2da8",
  "trx_in_block": 9,
  "virtual_op": 0
}
2018/10/03 15:57:36
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterrgkmb
weight10000 (100.00%)
Transaction InfoBlock #26487972/Trx 8d092f611c18513fb5ebfb2b0d6356e8b0225142
View Raw JSON Data
{
  "block": 26487972,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "rgkmb",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:36",
  "trx_id": "8d092f611c18513fb5ebfb2b0d6356e8b0225142",
  "trx_in_block": 16,
  "virtual_op": 0
}
2018/10/03 15:57:36
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterastronomyizfun
weight10000 (100.00%)
Transaction InfoBlock #26487972/Trx c284a92fe8156f11fb9db307ae72bf112a123e40
View Raw JSON Data
{
  "block": 26487972,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "astronomyizfun",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:57:36",
  "trx_id": "c284a92fe8156f11fb9db307ae72bf112a123e40",
  "trx_in_block": 3,
  "virtual_op": 0
}
2018/10/03 15:56:54
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votercub1
weight2200 (22.00%)
Transaction InfoBlock #26487958/Trx c32d08279e56b2574cb071ad294d1d7a8b7a7d42
View Raw JSON Data
{
  "block": 26487958,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "cub1",
      "weight": 2200
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:56:54",
  "trx_id": "c32d08279e56b2574cb071ad294d1d7a8b7a7d42",
  "trx_in_block": 1,
  "virtual_op": 0
}
2018/10/03 15:56:51
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votercmp2020
weight2200 (22.00%)
Transaction InfoBlock #26487957/Trx f4c833634db3f960a4e7fca94f2d071470b555e9
View Raw JSON Data
{
  "block": 26487957,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "cmp2020",
      "weight": 2200
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:56:51",
  "trx_id": "f4c833634db3f960a4e7fca94f2d071470b555e9",
  "trx_in_block": 14,
  "virtual_op": 0
}
2018/10/03 15:50:12
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votersvemirac
weight10000 (100.00%)
Transaction InfoBlock #26487824/Trx 768c9b4ef389c3e63d634bead58a07243c3d3ca9
View Raw JSON Data
{
  "block": 26487824,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "svemirac",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:50:12",
  "trx_id": "768c9b4ef389c3e63d634bead58a07243c3d3ca9",
  "trx_in_block": 7,
  "virtual_op": 0
}
2018/10/03 15:05:12
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterandeladenaro
weight10000 (100.00%)
Transaction InfoBlock #26486924/Trx 004d1c647e46d8bf8567491982bacc80d95eacda
View Raw JSON Data
{
  "block": 26486924,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "andeladenaro",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:05:12",
  "trx_id": "004d1c647e46d8bf8567491982bacc80d95eacda",
  "trx_in_block": 8,
  "virtual_op": 0
}
2018/10/03 15:02:39
authorpinoy
bodyI upvoted your post. Cheers to you. @Pinoy Posted using https://Steeming.com condenser site.
json metadata{}
parent authorelingmeyatmaja
parent permlinkbuilding-restful-apis-with-the-gin-framework
permlinkre-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t150237956z
titlefossbot voter comment
Transaction InfoBlock #26486873/Trx 1e2fef6441a78c8e2192451fcd4ff756e402b7fc
View Raw JSON Data
{
  "block": 26486873,
  "op": [
    "comment",
    {
      "author": "pinoy",
      "body": "I upvoted your post.\r\n\r\nCheers to you.\r\n@Pinoy\r\n\r\nPosted using https://Steeming.com condenser site.",
      "json_metadata": "{}",
      "parent_author": "elingmeyatmaja",
      "parent_permlink": "building-restful-apis-with-the-gin-framework",
      "permlink": "re-elingmeyatmaja-building-restful-apis-with-the-gin-framework-20181003t150237956z",
      "title": "fossbot voter comment"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:02:39",
  "trx_id": "1e2fef6441a78c8e2192451fcd4ff756e402b7fc",
  "trx_in_block": 1,
  "virtual_op": 0
}
2018/10/03 15:02:30
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterpinoy
weight10000 (100.00%)
Transaction InfoBlock #26486870/Trx 5ad4f6064b7bf90cd5411db80c8158dc70fc368a
View Raw JSON Data
{
  "block": 26486870,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "pinoy",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:02:30",
  "trx_id": "5ad4f6064b7bf90cd5411db80c8158dc70fc368a",
  "trx_in_block": 21,
  "virtual_op": 0
}
2018/10/03 15:01:45
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voteralphabot
weight100 (1.00%)
Transaction InfoBlock #26486855/Trx 1fc209cc4227779f100a8cb572a8c4666599c4a1
View Raw JSON Data
{
  "block": 26486855,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "alphabot",
      "weight": 100
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:01:45",
  "trx_id": "1fc209cc4227779f100a8cb572a8c4666599c4a1",
  "trx_in_block": 28,
  "virtual_op": 0
}
2018/10/03 15:01:36
authorelingmeyatmaja
body@@ -1,12 +1,117 @@ +!%5Bgoalng.png%5D(https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png)%0A%0A # Repository
json metadata{"tags":["utopian-io","tutorials","webservice","restful","golang"],"image":["https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png","https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg","https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png","https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png"],"links":["https://github.com/gin-gonic/gin","https://github.com/elingmeyatmaja/RESTful-APIs-Gin-"],"app":"steemit/0.1","format":"markdown"}
parent author
parent permlinkutopian-io
permlinkbuilding-restful-apis-with-the-gin-framework
titleBuilding RESTful APIs with the Gin framework
Transaction InfoBlock #26486852/Trx ea4d34bed7fe26a180d7f4476824f4a75482e113
View Raw JSON Data
{
  "block": 26486852,
  "op": [
    "comment",
    {
      "author": "elingmeyatmaja",
      "body": "@@ -1,12 +1,117 @@\n+!%5Bgoalng.png%5D(https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png)%0A%0A\n # Repository\n",
      "json_metadata": "{\"tags\":[\"utopian-io\",\"tutorials\",\"webservice\",\"restful\",\"golang\"],\"image\":[\"https://cdn.steemitimages.com/DQmecweo98CY8AM1phvmEZ5SZ1oCJtwmbVUEtUmqkgx3xqS/goalng.png\",\"https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg\",\"https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png\",\"https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png\"],\"links\":[\"https://github.com/gin-gonic/gin\",\"https://github.com/elingmeyatmaja/RESTful-APIs-Gin-\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      "parent_author": "",
      "parent_permlink": "utopian-io",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "title": "Building RESTful APIs with the Gin framework"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T15:01:36",
  "trx_id": "ea4d34bed7fe26a180d7f4476824f4a75482e113",
  "trx_in_block": 0,
  "virtual_op": 0
}
2018/10/03 14:51:24
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
votercurbot
weight1000 (10.00%)
Transaction InfoBlock #26486648/Trx 628d20b19aaf2535e99818a8b5b01d3cc5c56012
View Raw JSON Data
{
  "block": 26486648,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "curbot",
      "weight": 1000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T14:51:24",
  "trx_id": "628d20b19aaf2535e99818a8b5b01d3cc5c56012",
  "trx_in_block": 33,
  "virtual_op": 0
}
2018/10/03 14:46:09
authorelingmeyatmaja
permlinkbuilding-restful-apis-with-the-gin-framework
voterfastresteem
weight100 (1.00%)
Transaction InfoBlock #26486543/Trx 21fd68be8a32488d44b4c93891ddca51e25ccd70
View Raw JSON Data
{
  "block": 26486543,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "voter": "fastresteem",
      "weight": 100
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T14:46:09",
  "trx_id": "21fd68be8a32488d44b4c93891ddca51e25ccd70",
  "trx_in_block": 14,
  "virtual_op": 0
}
2018/10/03 14:46:00
authorelingmeyatmaja
body# Repository <h1> https://github.com/gin-gonic/gin # What Will I Learn?<h1> - Creating a REST API with the go-restful package - Creating a connection to MySql database - Introducing the Gin framework for creating a REST API - Testing the RESTful API with this GUI tool # Requirements<h1> State the requirements the user needs in order to follow this tutorial. - Localhost xampp - Basic GoLang - Basic Gin Golang - Basic Database MySQL # Difficulty<h1> Intermediate # Tutorial Contents<h1> In this chapter, we are going to use a framework for simplifying building REST services. First, we will take a quick look at gin. Gin-gonic is a framework based on the httprouter. In this section I will show you how build REST service gin connect to mysql. Prepare your databases https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg To install Gin package, you need to install Go and set your Go workspace first. GOPATH is nothing but the current appointed workspace on your machine. It is an environment variable that tells the Go compiler about where your source code, binaries, and packages are placed. While developing, set the GOPATH to one of your projects. The Go compiler now activates that project. 1. Download and install it: $ go get -u github.com/gin-gonic/gin Simple install the package to your $GOPATH with the go tool from shell: $ go get -u github.com/go-sql-driver/mysql Make sure Git is installed on your machine and in your system's PATH. 2. REST uses the URI to decode its resource to be handled. There are quite a few REST verbs available, but six of them are used frequently. They are as follows: - GET - POST - PUT - PATCH - DELETE Breakdown code ``` package main import ( "bytes" "database/sql" "fmt" "net/http" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" ) ``` - Package bytes implements functions for the manipulation of byte slices. It is analogous to the facilities of the strings package. - Package sql provides a generic interface around SQL (or SQL-like) databases. - Package fmt implements formatted I/O with functions - Imported a few packages. github.com/gin-gonic/gin, github.com/go-sql-driver/mysql is the data service we created before. - net/http is the core package we used to handle an HTTP request through its HandleFunc function. That function's arguments are http.Request and http.ResponseWriter. Those two deal with the request and response of an HTTP request. ``` package main import ( "bytes" "database/sql" "fmt" "net/http" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" ) func main() { db, err := sql.Open("mysql", "root:passapp@tcp(127.0.0.1:3306)/gotest") if err != nil { fmt.Print(err.Error()) } defer db.Close() // make sure connection is available err = db.Ping() if err != nil { fmt.Print(err.Error()) } type Person struct { Id int First_Name string Last_Name string } router := gin.Default() // Add API handlers here router.Run(":3000") } ``` - In every gin app, we should create a Default or New gin router - We can specify :port on which our Gin applications run using port 3000 - We will keep the article structure simple with just three fields - Id, First_Name and Last_Name. This can be represented with a struct as follows: - The Data Source Name has a common format, but without type-prefix (optional parts marked by squared brackets): - example : [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN] ``` // GET a person detail router.GET("/person/:id", func(c *gin.Context) { var ( person Person result gin.H ) id := c.Param("id") row := db.QueryRow("select id, first_name, last_name from person where id = ?;", id) err = row.Scan(&person.Id, &person.First_Name, &person.Last_Name) if err != nil { // If no results send null result = gin.H{ "result": nil, "count": 0, } } else { result = gin.H{ "result": person, "count": 1, } } c.JSON(http.StatusOK, result) }) ``` - Routing is one of the core features that all modern frameworks provide. Any web page or an API end point is accessed by a URL. Frameworks use routes to handle requests to these URLs. - Gin offers a fast router that's easy to configure and use. Apart from handling specified URLs, Gin routers can also handle patterns and grouped URLs. - A GET method fetches the given resource from the server. To specify a resource, GET uses a few types of URI queries: - Query parameters - Path-based parameters - We use http.StatusOK to set the status code of the response header. The WriteHeader and Write functions are available on the response object for writing the header and body, respectively. ``` /// GET all persons router.GET("/persons", func(c *gin.Context) { var ( person Person persons []Person ) rows, err := db.Query("select id, first_name, last_name from person;") if err != nil { fmt.Print(err.Error()) } for rows.Next() { err = rows.Scan(&person.Id, &person.First_Name, &person.Last_Name) persons = append(persons, person) if err != nil { fmt.Print(err.Error()) } } defer rows.Close() c.JSON(http.StatusOK, gin.H{ "result": persons, "count": len(persons), }) }) ``` Here, the resource query is with the path parameter. Query parameters are intended to add detailed information to identify a resource from the server. For example, take this sample fictitious API. Let us assume this API is created for fetching, creating, and updating ``` // POST new person details router.POST("/person", func(c *gin.Context) { var buffer bytes.Buffer first_name := c.PostForm("first_name") last_name := c.PostForm("last_name") stmt, err := db.Prepare("insert into person (first_name, last_name) values(?,?);") if err != nil { fmt.Print(err.Error()) } _, err = stmt.Exec(first_name, last_name) if err != nil { fmt.Print(err.Error()) } // Fastest way to append strings buffer.WriteString(first_name) buffer.WriteString(" ") buffer.WriteString(last_name) defer stmt.Close() name := buffer.String() c.JSON(http.StatusOK, gin.H{ "message": fmt.Sprintf(" %s successfully created", name), }) }) ``` The POST method is used to create a resource on the server. A successful POST operation returns a 201 status code. ``` // PUT - update a person details router.PUT("/person", func(c *gin.Context) { var buffer bytes.Buffer id := c.Query("id") first_name := c.PostForm("first_name") last_name := c.PostForm("last_name") stmt, err := db.Prepare("update person set first_name= ?, last_name= ? where id= ?;") if err != nil { fmt.Print(err.Error()) } _, err = stmt.Exec(first_name, last_name, id) if err != nil { fmt.Print(err.Error()) } // Fastest way to append strings buffer.WriteString(first_name) buffer.WriteString(" ") buffer.WriteString(last_name) defer stmt.Close() name := buffer.String() c.JSON(http.StatusOK, gin.H{ "message": fmt.Sprintf("Successfully updated to %s", name), }) }) ``` - In this part, create and initialize a new Buffer using string as its initial contents. It is intended to prepare a buffer to read an existing string. - The PUT method is similar to POST. It is used to replace the resource that already exists. The main difference is that PUT is idempotent. A POST call creates two instances with the same data. But PUT updates a single resource that already exists. ``` // Delete resources router.DELETE("/person", func(c *gin.Context) { id := c.Query("id") stmt, err := db.Prepare("delete from person where id= ?;") if err != nil { fmt.Print(err.Error()) } _, err = stmt.Exec(id) if err != nil { fmt.Print(err.Error()) } c.JSON(http.StatusOK, gin.H{ "message": fmt.Sprintf("Successfully deleted user: %s", id), }) }) ``` The DELETE API method is used to delete a resource from the database. It is similar to PUT but without any body. It just needs an ID of the resource to be deleted. Once a resource gets deleted, subsequent GET requests return a 404 not found status. If we run this program: run main.go ![gin.png](https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png) The following screenshot shows the JSON response body in Postman for the HTTP GET request: ![postman.png](https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png) # Proof of Work Done<h1> https://github.com/elingmeyatmaja/RESTful-APIs-Gin-
json metadata{"tags":["utopian-io","tutorials","webservice","restful","golang"],"image":["https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg","https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png","https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png"],"links":["https://github.com/gin-gonic/gin","https://github.com/elingmeyatmaja/RESTful-APIs-Gin-"],"app":"steemit/0.1","format":"markdown"}
parent author
parent permlinkutopian-io
permlinkbuilding-restful-apis-with-the-gin-framework
titleBuilding RESTful APIs with the Gin framework
Transaction InfoBlock #26486540/Trx 0f6b11aaf862dbc511d7d0f36048322ade2b403c
View Raw JSON Data
{
  "block": 26486540,
  "op": [
    "comment",
    {
      "author": "elingmeyatmaja",
      "body": "# Repository <h1>\nhttps://github.com/gin-gonic/gin\n# What Will I Learn?<h1> \n- Creating a REST API with the go-restful package\n- Creating a connection to MySql database\n- Introducing the Gin framework for creating a REST API\n- Testing the RESTful API with this GUI tool\n\n# Requirements<h1> \nState the requirements the user needs in order to follow this tutorial.\n- Localhost xampp\n- Basic GoLang\n- Basic Gin Golang \n- Basic Database MySQL\n\n# Difficulty<h1> \nIntermediate\n# Tutorial Contents<h1> \nIn this chapter, we are going to use a framework for simplifying building REST services. First, we will take a quick look at gin. Gin-gonic is a framework based on the httprouter. In this section I will show you how build REST service gin connect to mysql.\n\nPrepare your databases \nhttps://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg\n\nTo install Gin package, you need to install Go and set your Go workspace first. GOPATH is nothing but the current appointed workspace on your machine. It is an\nenvironment variable that tells the Go compiler about where your source code, binaries,\nand packages are placed. While developing, set the GOPATH to one\nof your projects. The Go compiler now activates that project.\n1. Download and install it:\n$ go get -u github.com/gin-gonic/gin\nSimple install the package to your $GOPATH with the go tool from shell:\n$ go get -u github.com/go-sql-driver/mysql\nMake sure Git is installed on your machine and in your system's PATH.\n\n2. REST uses the URI to decode its resource to be handled. There are quite a few REST verbs available, but six of them are used frequently. They are as follows:\n- GET\n- POST\n- PUT\n- PATCH\n- DELETE\n\nBreakdown code\n\n```\npackage main\n\nimport (\n    \"bytes\"\n    \"database/sql\"\n    \"fmt\"\n    \"net/http\"\n\n    \"github.com/gin-gonic/gin\"\n    _ \"github.com/go-sql-driver/mysql\"\n)\n\n```\n- Package bytes implements functions for the manipulation of byte slices. It is analogous to the facilities of the strings package.\n- Package sql provides a generic interface around SQL (or SQL-like) databases. \n- Package fmt implements formatted I/O with functions\n- Imported a few packages. github.com/gin-gonic/gin, github.com/go-sql-driver/mysql is the  data service we created   before.\n- net/http is the core package we used to handle an HTTP request through its HandleFunc function. That function's arguments are http.Request and http.ResponseWriter. Those two deal with the request and response of an HTTP request.\n\n```\npackage main\n\t\n\timport (\n\t\t\"bytes\"\n\t\t\"database/sql\"\n\t\t\"fmt\"\n\t\t\"net/http\"\n\t\n\t\t\"github.com/gin-gonic/gin\"\n\t\t_ \"github.com/go-sql-driver/mysql\"\n\t)\n\t\n\tfunc main() {\n\t\tdb, err := sql.Open(\"mysql\", \"root:passapp@tcp(127.0.0.1:3306)/gotest\")\n\t\tif err != nil {\n\t\t\tfmt.Print(err.Error())\n\t\t}\n\t\tdefer db.Close()\n\t\t// make sure connection is available\n\t\terr = db.Ping()\n\t\tif err != nil {\n\t\t\tfmt.Print(err.Error())\n\t\t}\n\t\ttype Person struct {\n\t\t\tId         int\n\t\t\tFirst_Name string\n\t\t\tLast_Name  string\n\t\t}\n\t\trouter := gin.Default()\n\t\t// Add API handlers here\n\t\trouter.Run(\":3000\")\n\t}\n\n```\n\n- In every gin app, we should create a Default or New gin router\n- We can specify :port on which our Gin applications run using port 3000\n- We will keep the article structure simple with just three fields - Id, First_Name and Last_Name. This can be represented with a struct as follows:\n- The Data Source Name has a common format, but without type-prefix (optional parts marked by squared brackets):\n        - example : [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN]\n\n```\n// GET a person detail\n    router.GET(\"/person/:id\", func(c *gin.Context) {\n        var (\n            person Person\n            result gin.H\n        )\n        id := c.Param(\"id\")\n        row := db.QueryRow(\"select id, first_name, last_name from person where id = ?;\", id)\n        err = row.Scan(&person.Id, &person.First_Name, &person.Last_Name)\n        if err != nil {\n            // If no results send null\n            result = gin.H{\n                \"result\": nil,\n                \"count\":  0,\n            }\n        } else {\n            result = gin.H{\n                \"result\": person,\n                \"count\":  1,\n            }\n        }\n        c.JSON(http.StatusOK, result)\n    })\n\n```\n- Routing is one of the core features that all modern frameworks provide. Any web page or an API end point is accessed by a URL. Frameworks use routes to handle requests to these URLs. \n- Gin offers a fast router that's easy to configure and use. Apart from handling specified URLs, Gin routers can also handle patterns and grouped URLs.\n- A GET method fetches the given resource from the server. To specify a resource, GET uses a few types of URI queries:\n\t- Query parameters\n\t- Path-based parameters\n- We use http.StatusOK to set the status code of the response header. The WriteHeader and Write functions are available on the response object for writing the header and body, respectively.\n\n```\n/// GET all persons\n    router.GET(\"/persons\", func(c *gin.Context) {\n        var (\n            person  Person\n            persons []Person\n        )\n        rows, err := db.Query(\"select id, first_name, last_name from person;\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        for rows.Next() {\n            err = rows.Scan(&person.Id, &person.First_Name, &person.Last_Name)\n            persons = append(persons, person)\n            if err != nil {\n                fmt.Print(err.Error())\n            }\n        }\n        defer rows.Close()\n        c.JSON(http.StatusOK, gin.H{\n            \"result\": persons,\n            \"count\":  len(persons),\n        })\n    })\n\n```\nHere, the resource query is with the path parameter. Query parameters are intended to add detailed information to identify a resource from the server. For example, take this sample fictitious API. Let us assume this API is created for fetching, creating, and updating \n\n```\n// POST new person details\n    router.POST(\"/person\", func(c *gin.Context) {\n        var buffer bytes.Buffer\n        first_name := c.PostForm(\"first_name\")\n        last_name := c.PostForm(\"last_name\")\n        stmt, err := db.Prepare(\"insert into person (first_name, last_name) values(?,?);\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        _, err = stmt.Exec(first_name, last_name)\n\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n\n        // Fastest way to append strings\n        buffer.WriteString(first_name)\n        buffer.WriteString(\" \")\n        buffer.WriteString(last_name)\n        defer stmt.Close()\n        name := buffer.String()\n        c.JSON(http.StatusOK, gin.H{\n            \"message\": fmt.Sprintf(\" %s successfully created\", name),\n        })\n    })\n\n```\nThe POST method  is used to create a resource on the server. A successful POST operation returns a 201 status code.\n```\n// PUT - update a person details\n    router.PUT(\"/person\", func(c *gin.Context) {\n        var buffer bytes.Buffer\n        id := c.Query(\"id\")\n        first_name := c.PostForm(\"first_name\")\n        last_name := c.PostForm(\"last_name\")\n        stmt, err := db.Prepare(\"update person set first_name= ?, last_name= ? where id= ?;\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        _, err = stmt.Exec(first_name, last_name, id)\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n\n        // Fastest way to append strings\n        buffer.WriteString(first_name)\n        buffer.WriteString(\" \")\n        buffer.WriteString(last_name)\n        defer stmt.Close()\n        name := buffer.String()\n        c.JSON(http.StatusOK, gin.H{\n            \"message\": fmt.Sprintf(\"Successfully updated to %s\", name),\n        })\n    })\n```\n- In this part, create and initialize a new Buffer using string as its initial contents. It is intended to prepare a buffer to read an existing string.\n- The PUT method is similar to POST. It is used to replace the resource that already exists. The main difference is that PUT is idempotent. A POST call creates two instances with the same data. But PUT updates a single resource that already exists.\n```\n// Delete resources\n    router.DELETE(\"/person\", func(c *gin.Context) {\n        id := c.Query(\"id\")\n        stmt, err := db.Prepare(\"delete from person where id= ?;\")\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        _, err = stmt.Exec(id)\n        if err != nil {\n            fmt.Print(err.Error())\n        }\n        c.JSON(http.StatusOK, gin.H{\n            \"message\": fmt.Sprintf(\"Successfully deleted user: %s\", id),\n        })\n    })\n\n```\n\nThe DELETE API method is used to delete a resource from the database. It is similar to PUT but without any body. It just needs an ID of the resource to be deleted. Once a resource gets deleted, subsequent GET requests return a 404 not found status.\n\nIf we run this program:\nrun main.go\n\n![gin.png](https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png)\n\nThe following screenshot shows the JSON response body in Postman for the HTTP GET\nrequest:\n\n![postman.png](https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png)\n# Proof of Work Done<h1> \nhttps://github.com/elingmeyatmaja/RESTful-APIs-Gin-",
      "json_metadata": "{\"tags\":[\"utopian-io\",\"tutorials\",\"webservice\",\"restful\",\"golang\"],\"image\":[\"https://cdn.steemitimages.com/DQmdbTKeCA9SNHXD8QxcH6Rt9x8rrMdsyx4YSFufwKN7xof/Untitled.jpg\",\"https://cdn.steemitimages.com/DQmf8GhP13e8AWGbuvQNedn3GsAsrmQFSSrK9cH9ge5s31s/gin.png\",\"https://cdn.steemitimages.com/DQmayjxBvXCSBFEgQZQdDXGEU4e2JL7pk5RipmzW3UQ7HAd/postman.png\"],\"links\":[\"https://github.com/gin-gonic/gin\",\"https://github.com/elingmeyatmaja/RESTful-APIs-Gin-\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      "parent_author": "",
      "parent_permlink": "utopian-io",
      "permlink": "building-restful-apis-with-the-gin-framework",
      "title": "Building RESTful APIs with the Gin framework"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-10-03T14:46:00",
  "trx_id": "0f6b11aaf862dbc511d7d0f36048322ade2b403c",
  "trx_in_block": 0,
  "virtual_op": 0
}
steemdelegated 17.868 SP to @elingmeyatmaja
2018/09/17 11:14:39
delegateeelingmeyatmaja
delegatorsteem
vesting shares29061.149834 VESTS
Transaction InfoBlock #26037583/Trx 7776507a9f8c3a5195917ba22b73d5a9384fa8a3
View Raw JSON Data
{
  "block": 26037583,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "29061.149834 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-09-17T11:14:39",
  "trx_id": "7776507a9f8c3a5195917ba22b73d5a9384fa8a3",
  "trx_in_block": 19,
  "virtual_op": 0
}
elingmeyatmajaclaimed reward balance: 0.004 SP
2018/09/17 10:35:24
accountelingmeyatmaja
reward sbd0.000 SBD
reward steem0.000 STEEM
reward vests6.125922 VESTS
Transaction InfoBlock #26036798/Trx dc26c028334fe0a16dadd0da1415d7ce8bb0a0d0
View Raw JSON Data
{
  "block": 26036798,
  "op": [
    "claim_reward_balance",
    {
      "account": "elingmeyatmaja",
      "reward_sbd": "0.000 SBD",
      "reward_steem": "0.000 STEEM",
      "reward_vests": "6.125922 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-09-17T10:35:24",
  "trx_id": "dc26c028334fe0a16dadd0da1415d7ce8bb0a0d0",
  "trx_in_block": 20,
  "virtual_op": 0
}
steemdelegated 5.477 SP to @elingmeyatmaja
2018/06/04 03:56:03
delegateeelingmeyatmaja
delegatorsteem
vesting shares8908.094679 VESTS
Transaction InfoBlock #23016939/Trx f22d42cb4d25414c273676ef554374b698dd4565
View Raw JSON Data
{
  "block": 23016939,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "8908.094679 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-06-04T03:56:03",
  "trx_id": "f22d42cb4d25414c273676ef554374b698dd4565",
  "trx_in_block": 43,
  "virtual_op": 0
}
steemdelegated 18.020 SP to @elingmeyatmaja
2018/04/19 15:31:42
delegateeelingmeyatmaja
delegatorsteem
vesting shares29309.302692 VESTS
Transaction InfoBlock #21707335/Trx ffe6e1359aee90dab0c5fa4218ad7febed706d7d
View Raw JSON Data
{
  "block": 21707335,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "elingmeyatmaja",
      "delegator": "steem",
      "vesting_shares": "29309.302692 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-04-19T15:31:42",
  "trx_id": "ffe6e1359aee90dab0c5fa4218ad7febed706d7d",
  "trx_in_block": 31,
  "virtual_op": 0
}
elingmeyatmajareceived 0.004 SP curation reward for @aftaruannisa / new-logo-for-freecad
2018/03/11 00:44:15
comment authoraftaruannisa
comment permlinknew-logo-for-freecad
curatorelingmeyatmaja
reward6.125922 VESTS
Transaction InfoBlock #20567599/Virtual Operation #22
View Raw JSON Data
{
  "block": 20567599,
  "op": [
    "curation_reward",
    {
      "comment_author": "aftaruannisa",
      "comment_permlink": "new-logo-for-freecad",
      "curator": "elingmeyatmaja",
      "reward": "6.125922 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-11T00:44:15",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 22
}
2018/03/05 03:06:27
authoraftaruannisa
permlinknew-logo-for-freecad
voterelingmeyatmaja
weight10000 (100.00%)
Transaction InfoBlock #20397903/Trx 19e9c1b2253b2919162c6722bea33af42ab7ac22
View Raw JSON Data
{
  "block": 20397903,
  "op": [
    "vote",
    {
      "author": "aftaruannisa",
      "permlink": "new-logo-for-freecad",
      "voter": "elingmeyatmaja",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-05T03:06:27",
  "trx_id": "19e9c1b2253b2919162c6722bea33af42ab7ac22",
  "trx_in_block": 34,
  "virtual_op": 0
}
2018/02/19 09:16:45
authorvickysylvester
permlinktouring-bersama-byson-independent-siantar-6a44fceaef6f5
voterelingmeyatmaja
weight10000 (100.00%)
Transaction InfoBlock #20002398/Trx 68ed79f50d20123f35762b3945b8e5ca87de1d70
View Raw JSON Data
{
  "block": 20002398,
  "op": [
    "vote",
    {
      "author": "vickysylvester",
      "permlink": "touring-bersama-byson-independent-siantar-6a44fceaef6f5",
      "voter": "elingmeyatmaja",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-19T09:16:45",
  "trx_id": "68ed79f50d20123f35762b3945b8e5ca87de1d70",
  "trx_in_block": 14,
  "virtual_op": 0
}
2018/02/16 12:15:48
idfollow
json["follow",{"follower":"elingmeyatmaja","following":"nelvi-sari","what":["blog"]}]
required auths[]
required posting auths["elingmeyatmaja"]
Transaction InfoBlock #19919606/Trx 2e58cb6c6d6970a9c0130bf4140608a4fdb20bce
View Raw JSON Data
{
  "block": 19919606,
  "op": [
    "custom_json",
    {
      "id": "follow",
      "json": "[\"follow\",{\"follower\":\"elingmeyatmaja\",\"following\":\"nelvi-sari\",\"what\":[\"blog\"]}]",
      "required_auths": [],
      "required_posting_auths": [
        "elingmeyatmaja"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-16T12:15:48",
  "trx_id": "2e58cb6c6d6970a9c0130bf4140608a4fdb20bce",
  "trx_in_block": 17,
  "virtual_op": 0
}
elingmeyatmajaclaimed reward balance: 0.105 SBD, 0.028 SP
2018/02/14 02:48:42
accountelingmeyatmaja
reward sbd0.105 SBD
reward steem0.000 STEEM
reward vests45.009704 VESTS
Transaction InfoBlock #19850738/Trx 89c07eb37bff60b5f27c66c8a10b863e1d1ab9ff
View Raw JSON Data
{
  "block": 19850738,
  "op": [
    "claim_reward_balance",
    {
      "account": "elingmeyatmaja",
      "reward_sbd": "0.105 SBD",
      "reward_steem": "0.000 STEEM",
      "reward_vests": "45.009704 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-14T02:48:42",
  "trx_id": "89c07eb37bff60b5f27c66c8a10b863e1d1ab9ff",
  "trx_in_block": 36,
  "virtual_op": 0
}
2018/02/09 07:44:42
authordanuega
permlinknew-logo-proposal-for-parkendd
voterelingmeyatmaja
weight10000 (100.00%)
Transaction InfoBlock #19712759/Trx 19c2017d55f6b517abfac74a5f6e9b9a44ce7fbd
View Raw JSON Data
{
  "block": 19712759,
  "op": [
    "vote",
    {
      "author": "danuega",
      "permlink": "new-logo-proposal-for-parkendd",
      "voter": "elingmeyatmaja",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-09T07:44:42",
  "trx_id": "19c2017d55f6b517abfac74a5f6e9b9a44ce7fbd",
  "trx_in_block": 43,
  "virtual_op": 0
}
elingmeyatmajareceived 0.093 SBD, 0.024 SP author reward for @elingmeyatmaja / wisata-kuliner-malam-di-tanjung-morawa
2018/02/02 18:44:06
authorelingmeyatmaja
permlinkwisata-kuliner-malam-di-tanjung-morawa
sbd payout0.093 SBD
steem payout0.000 STEEM
vesting payout38.871024 VESTS
Transaction InfoBlock #19524776/Virtual Operation #5
View Raw JSON Data
{
  "block": 19524776,
  "op": [
    "author_reward",
    {
      "author": "elingmeyatmaja",
      "permlink": "wisata-kuliner-malam-di-tanjung-morawa",
      "sbd_payout": "0.093 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "38.871024 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-02T18:44:06",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 5
}
2018/01/31 08:14:03
authordanuega
permlinknew-logo-proposal-for-taskbar
voterelingmeyatmaja
weight10000 (100.00%)
Transaction InfoBlock #19454680/Trx e538342a0966fd1eae8d60cc18d17ec595ea70ea
View Raw JSON Data
{
  "block": 19454680,
  "op": [
    "vote",
    {
      "author": "danuega",
      "permlink": "new-logo-proposal-for-taskbar",
      "voter": "elingmeyatmaja",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-31T08:14:03",
  "trx_id": "e538342a0966fd1eae8d60cc18d17ec595ea70ea",
  "trx_in_block": 22,
  "virtual_op": 0
}
2018/01/31 08:13:57
authordanuega
permlinknew-logo-proposal-for-cache-cleaner
voterelingmeyatmaja
weight10000 (100.00%)
Transaction InfoBlock #19454678/Trx c0d78b5e5ba56977c158f2cf05219dae2237659c
View Raw JSON Data
{
  "block": 19454678,
  "op": [
    "vote",
    {
      "author": "danuega",
      "permlink": "new-logo-proposal-for-cache-cleaner",
      "voter": "elingmeyatmaja",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-31T08:13:57",
  "trx_id": "c0d78b5e5ba56977c158f2cf05219dae2237659c",
  "trx_in_block": 7,
  "virtual_op": 0
}
2018/01/30 03:35:42
authorelingmeyatmaja
permlinkflask-login-implementation-with-sql-alchemy-and-postgresql
sbd payout0.012 SBD
steem payout0.000 STEEM
vesting payout6.138680 VESTS
Transaction InfoBlock #19420356/Virtual Operation #11
View Raw JSON Data
{
  "block": 19420356,
  "op": [
    "author_reward",
    {
      "author": "elingmeyatmaja",
      "permlink": "flask-login-implementation-with-sql-alchemy-and-postgresql",
      "sbd_payout": "0.012 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "6.138680 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-30T03:35:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 11
}
utopian.payreceived 0.001 SP benefactor reward from @elingmeyatmaja
2018/01/30 03:35:42
authorelingmeyatmaja
benefactorutopian.pay
permlinkflask-login-implementation-with-sql-alchemy-and-postgresql
sbd payout0.000 SBD
steem payout0.000 STEEM
vesting payout2.046226 VESTS
Transaction InfoBlock #19420356/Virtual Operation #10
View Raw JSON Data
{
  "block": 19420356,
  "op": [
    "comment_benefactor_reward",
    {
      "author": "elingmeyatmaja",
      "benefactor": "utopian.pay",
      "permlink": "flask-login-implementation-with-sql-alchemy-and-postgresql",
      "sbd_payout": "0.000 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "2.046226 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-30T03:35:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 10
}
2018/01/29 06:54:30
authorriyo.s94
permlinkwebsite-tour-using-trip-js
voterelingmeyatmaja
weight10000 (100.00%)
Transaction InfoBlock #19395549/Trx 63fcedd42cd8df668ac926e5a443db9cdc9ddf98
View Raw JSON Data
{
  "block": 19395549,
  "op": [
    "vote",
    {
      "author": "riyo.s94",
      "permlink": "website-tour-using-trip-js",
      "voter": "elingmeyatmaja",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-29T06:54:30",
  "trx_id": "63fcedd42cd8df668ac926e5a443db9cdc9ddf98",
  "trx_in_block": 2,
  "virtual_op": 0
}
2018/01/27 13:09:39
authorelingmeyatmaja
permlinkwisata-kuliner-malam-di-tanjung-morawa
voterandeladenaro
weight10000 (100.00%)
Transaction InfoBlock #19345467/Trx 94cd140819253774013a69fd0a285518167b63b9
View Raw JSON Data
{
  "block": 19345467,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "wisata-kuliner-malam-di-tanjung-morawa",
      "voter": "andeladenaro",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-27T13:09:39",
  "trx_id": "94cd140819253774013a69fd0a285518167b63b9",
  "trx_in_block": 13,
  "virtual_op": 0
}
2018/01/27 09:16:48
authorelingmeyatmaja
permlinkwisata-kuliner-malam-di-tanjung-morawa
voternelvi-sari
weight10000 (100.00%)
Transaction InfoBlock #19340815/Trx cc653eeff6edc4240fb786e5b0450e58b4077951
View Raw JSON Data
{
  "block": 19340815,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "wisata-kuliner-malam-di-tanjung-morawa",
      "voter": "nelvi-sari",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-27T09:16:48",
  "trx_id": "cc653eeff6edc4240fb786e5b0450e58b4077951",
  "trx_in_block": 62,
  "virtual_op": 0
}
2018/01/27 06:17:24
authorelingmeyatmaja
permlinkwisata-kuliner-malam-di-tanjung-morawa
votercalmunicorn
weight10000 (100.00%)
Transaction InfoBlock #19337231/Trx f11eb34af86973ea68a26e57987d49c6db33e0c0
View Raw JSON Data
{
  "block": 19337231,
  "op": [
    "vote",
    {
      "author": "elingmeyatmaja",
      "permlink": "wisata-kuliner-malam-di-tanjung-morawa",
      "voter": "calmunicorn",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-27T06:17:24",
  "trx_id": "f11eb34af86973ea68a26e57987d49c6db33e0c0",
  "trx_in_block": 10,
  "virtual_op": 0
}
2018/01/27 03:43:48
idfollow
json["follow",{"follower":"elingmeyatmaja","following":"kakilasak","what":["blog"]}]
required auths[]
required posting auths["elingmeyatmaja"]
Transaction InfoBlock #19334160/Trx 55486c7d48243cd5827a806a4ea0294965f97c19
View Raw JSON Data
{
  "block": 19334160,
  "op": [
    "custom_json",
    {
      "id": "follow",
      "json": "[\"follow\",{\"follower\":\"elingmeyatmaja\",\"following\":\"kakilasak\",\"what\":[\"blog\"]}]",
      "required_auths": [],
      "required_posting_auths": [
        "elingmeyatmaja"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-01-27T03:43:48",
  "trx_id": "55486c7d48243cd5827a806a4ea0294965f97c19",
  "trx_in_block": 51,
  "virtual_op": 0
}

Account Metadata

POSTING JSON METADATA
profile{"profile_image":"https://s20.postimg.org/pq9j7pywd/IMG-20171119-_WA0003.png","name":"Eling Meyatmaja","about":"Traveler, Sport & Coder","location":"Medan"}
JSON METADATA
profile{"profile_image":"https://s20.postimg.org/pq9j7pywd/IMG-20171119-_WA0003.png","name":"Eling Meyatmaja","about":"Traveler, Sport & Coder","location":"Medan"}
{
  "posting_json_metadata": {
    "profile": {
      "profile_image": "https://s20.postimg.org/pq9j7pywd/IMG-20171119-_WA0003.png",
      "name": "Eling Meyatmaja",
      "about": "Traveler, Sport & Coder",
      "location": "Medan"
    }
  },
  "json_metadata": {
    "profile": {
      "profile_image": "https://s20.postimg.org/pq9j7pywd/IMG-20171119-_WA0003.png",
      "name": "Eling Meyatmaja",
      "about": "Traveler, Sport & Coder",
      "location": "Medan"
    }
  }
}

Auth Keys

Owner
Single Signature
Public Keys
STM6CN6ne9MNuZHDQh4TQ2LSa6TzD65WmptvquQFAC2JGDW7YeGZc1/1
Active
Single Signature
Public Keys
STM5FkvxJaXc7b7WxP4AjxCbg8ZVPUFY6cSDsaasKmY1aazDG2Wm21/1
Posting
Single Signature
Public Keys
STM5iw4oEGTmo6E7EtQSuLAJoUHPvHxe1BRQ2ow8G2r5SqxVZPJUt1/1
App Permissions
Memo
STM6SVpdvr2KWybnzQbqTpgM6Rm3WDvS7mzjm6GUbHtXFyt6LXyZ3
{
  "owner": {
    "account_auths": [],
    "key_auths": [
      [
        "STM6CN6ne9MNuZHDQh4TQ2LSa6TzD65WmptvquQFAC2JGDW7YeGZc",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "active": {
    "account_auths": [],
    "key_auths": [
      [
        "STM5FkvxJaXc7b7WxP4AjxCbg8ZVPUFY6cSDsaasKmY1aazDG2Wm2",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "posting": {
    "account_auths": [
      [
        "utopian.app",
        1
      ]
    ],
    "key_auths": [
      [
        "STM5iw4oEGTmo6E7EtQSuLAJoUHPvHxe1BRQ2ow8G2r5SqxVZPJUt",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "memo": "STM6SVpdvr2KWybnzQbqTpgM6Rm3WDvS7mzjm6GUbHtXFyt6LXyZ3"
}

Witness Votes

0 / 30
No active witness votes.
[]