create account

Steemex v0.9 released: operation streaming and support for market, follows, accounts and witnesses API methods by ontofractal

View this thread on: hive.blogpeakd.comecency.com
· @ontofractal ·
$13.91
Steemex v0.9 released: operation streaming and support for market, follows, accounts and witnesses API methods
![](http://i.imgur.com/QKOa4iu.png)
I've just released a large update to Steemex, an open source websockets Steem client library for Elixir/Erlang. 

# Changelog

* `Steemex.Streamer` provides a simple and convenient subscription interface to the stream of new Steem blockchain operations 
* streaming handler example module
* functions for witnesses database API methods
* functions for accounts database API methods
* functions for market API methods 
* functions for follows API methods
* Modules and structs are implemented for most types of operations
* docs and typespecs for all database API

# Repos and docs

* [github](https://github.com/cyberpunk-ventures/steemex)
* [hex.pm](https://hex.pm/packages/steemex)
* [docs](https://hexdocs.pm/steemex)

Steemex is used for data collection on [Steempunks](http://steempunks.com).

# Example of an operation stream handler module


```
defmodule Steemex.OpsHandlerExample do
  use GenServer
  require Logger

  @doc"""
  Starts the handler module
  """
  def start_link do
    GenServer.start_link(__MODULE__, %{}, name: __MODULE__)
  end

  def init(config \\ %{}) do
    {:ok, config}
  end

  def handle_info({:comment, data}, state) do
    Logger.info("New post or comment:  #{inspect(data)}" )
    {:noreply, state}
  end

  def handle_info({:vote, data}, state) do
    Logger.info("New vote:  #{inspect(data)}" )
    {:noreply, state}
  end


  def handle_info({op_type, op_data}, state) do
    Logger.info("New operation #{op_type}:  #{inspect(op_data)}" )
    {:noreply, state}
  end


end
```


# Roadmap

* Investigate using GenStage
* Add more utility functions
* Add more types and structs
* Add transaction broadcast

# About Elixir

Elixir is a functional programming language with superior concurrency primitives, distributed computation and fault tolerance capabilities based on Erlang/OTP.
Personally, I am really happy with my bet on Elixir to build cryptotokens related apps and strongly recommend every developer to try it.

Learning resources:

* [ElixirConf Jose Valim Keynote](http://confreaks.tv/videos/elixirconf2016-keynote)
* [ElixirConf 2016 Chris McCord Keynote](http://confreaks.tv/videos/elixirconf2016-keynote)
* [Elixir School](https://elixirschool.com/)
* [Elixir Crash Course](http://elixir-lang.org/crash-course.html)

<center>(∩`-´)⊃━炎炎炎炎炎</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 86 others
properties (23)
authorontofractal
permlinksteemex-v0-9-released-operation-streaming-and-support-for-market-follows-accounts-and-witnesses-api-methods
categorysteemit
json_metadata{"tags":["steemit","steem","blockchain","opensource"],"image":["http://i.imgur.com/QKOa4iu.png"],"links":["https://github.com/cyberpunk-ventures/steemex","https://hex.pm/packages/steemex","https://hexdocs.pm/steemex","http://steempunks.com","http://confreaks.tv/videos/elixirconf2016-keynote","https://elixirschool.com/","http://elixir-lang.org/crash-course.html"],"app":"steemit/0.1","format":"markdown"}
created2017-03-07 12:49:09
last_update2017-03-07 12:49:09
depth0
children2
last_payout2017-04-07 17:58:09
cashout_time1969-12-31 23:59:59
total_payout_value12.670 HBD
curator_payout_value1.237 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,338
author_reputation61,670,850,962,884
root_title"Steemex v0.9 released: operation streaming and support for market, follows, accounts and witnesses API methods"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,664,854
net_rshares52,885,209,924,368
author_curate_reward""
vote details (150)
@pnc ·
Congratulation @ontofractal. looking forward to see what can we build on steem with Elixir
👍  
properties (23)
authorpnc
permlinkre-ontofractal-steemex-v0-9-released-operation-streaming-and-support-for-market-follows-accounts-and-witnesses-api-methods-20170308t041401282z
categorysteemit
json_metadata{"tags":["steemit"],"users":["ontofractal"],"app":"steemit/0.1"}
created2017-03-08 04:14:03
last_update2017-03-08 04:14:03
depth1
children0
last_payout2017-04-07 17:58:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length90
author_reputation31,760,797,277,823
root_title"Steemex v0.9 released: operation streaming and support for market, follows, accounts and witnesses API methods"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,670,161
net_rshares5,615,309,558
author_curate_reward""
vote details (1)
@transisto · (edited)
Good job, 

I'm trying to kickstart the use of a new tag #steemdev , Your post would fit well that tag.
https://steemit.com/active/steemdev
properties (22)
authortransisto
permlinkre-ontofractal-steemex-v0-9-released-operation-streaming-and-support-for-market-follows-accounts-and-witnesses-api-methods-20170308t071246578z
categorysteemit
json_metadata{"tags":["steemdev","steemit"],"links":["https://steemit.com/active/steemdev"],"app":"steemit/0.1"}
created2017-03-08 07:12:57
last_update2017-03-08 07:14:03
depth1
children0
last_payout2017-04-07 17:58:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length139
author_reputation330,357,940,720,833
root_title"Steemex v0.9 released: operation streaming and support for market, follows, accounts and witnesses API methods"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,670,778
net_rshares0