From 1f3fbd1e0782935f9471043c077fa631fdedef41 Mon Sep 17 00:00:00 2001 From: Carlos Souza Date: Wed, 17 Jan 2024 09:22:13 -0500 Subject: [PATCH 1/2] Fix get era start example --- examples/state_query_client.ex | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/state_query_client.ex b/examples/state_query_client.ex index 95f1f25..882dfd7 100644 --- a/examples/state_query_client.ex +++ b/examples/state_query_client.ex @@ -13,7 +13,8 @@ defmodule StateQueryClient do Then invoke functions: * StateQueryClient.get_current_epoch() - * StateQueryClient.get_era_start() # not yet supported + * StateQueryClient.get_era_start() + * StateQueryClient.get_bananas() # Returns error message Not all queries are supported yet. """ @@ -32,7 +33,14 @@ defmodule StateQueryClient do end def get_era_start() do - case send_query(:era_start) do + case send_query(:get_era_start) do + {:ok, result} -> result + {:error, reason} -> "Something went wrong #{inspect(reason)}" + end + end + + def get_bananas() do + case send_query(:get_bananas) do {:ok, result} -> result {:error, reason} -> "Something went wrong #{inspect(reason)}" end From 4ebe423af6aa42bc2d2a43d2e1f1ebea1f4b4106 Mon Sep 17 00:00:00 2001 From: Carlos Souza Date: Wed, 17 Jan 2024 09:28:24 -0500 Subject: [PATCH 2/2] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea82b3e..5416994 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Add the dependency to `mix.exs`: ```elixir defp deps do [ - {:xogmios, git: "https://github.com/wowica/xogmios"} + {:xogmios, github: "wowica/xogmios", ref: "403384c"} ] end ``` @@ -24,5 +24,5 @@ See [ChainSyncClient](./examples/chain_sync_client.ex) and [StateQueryClient](./ ## Test -Run `mix test`. Tests do not rely on a running OGMIOS instance. +Run `mix test`. Tests do NOT rely on a running Ogmios instance.