___  ___    _ _    _  _ _____   _____
 / __|/ _ \  | | |  | || |_ _\ \ / / __|
| (_ | (_) | |_  _| | __ || | \ V /| _|
 \___|\___/    |_|  |_||_|___| \_/ |___|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

Spectrum API - Added get_table_rows endpoint

BY: @eostribe | CREATED: Oct. 30, 2019, 3:21 p.m. | VOTES: 1 | PAYOUT: $0.02 | [ VOTE ]

[IMAGE: https://cdn.steemitimages.com/DQmbuYX8rtVJXThPi6DSda7PEi6vXkd8DPnoatbvtuEW3r4/spectrum.jpeg]

EOS Tribe launched a new version of it's web-socket streaming Spectrum API on Telos Mainnet (https://www.telosfoundation.io/).

Telos Spectrum API web-socket endpoint: wss://api.telos.eostribe.io

This version currently supports subscriptions for get_actions, get_blocks, get_transaction and get_table_rows endpoints.

Below is the sample subscription message for the newly added get_table_rows endpoint:

{
  "apikey":"test-api-key",
  "event":"subscribe",
  "type":"get_table_rows",
  "data": {
    "code":"account name",
    "table":"table name",
    "scope":"scope name"
   }
}

Fields description for get_table_rows:

Sample client in Python for get_table_rows:

import json
import pprint

from websocket import create_connection

path="streaming"
url = "wss://api.telos.eostribe.io/"+path

messageBody ={
   "apikey":"test-api-key",
             "event":"subscribe",
             "type":"get_table_rows",
             "data": data
             }
ws = create_connection(url)
messageJson = json.dumps(messageBody)
ws.send(messageJson)

while True:
   pprint.pprint(json.loads(ws.recv()))
ws.close()

For other actions see our earlier post:

https://steemit.com/spectrum/@eostribe/spectrum-api-running-on-telos-mainnet

Feel free to give it a try and provide your feedback at out Telegram channel: https://t.me/EOSTribe

Original post describing Spectrum API architecture: https://steemit.com/eosio/@eostribe/introducing-spectrum-streaming-api-for-eosio

EOS Tribe is committed to continue work on creating innovative solutions for EOSIO.

TAGS: [ #eosio ] [ #telos ] [ #spectrum ] [ #api ] [ #transaction ]

Replies

NO REPLIES FOUND.

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>