From e3b5f9089378a5396c8997923b72bc77a9782675 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 26 Jul 2020 21:56:30 +0300 Subject: [PATCH] doc: fix examples in readme --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6014f1b..7059c9d 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ use sonic_channel::*; fn main() -> result::Result<()> { let channel = SonicChannel::connect_with_start( - "localhost:1491", ChannelMode::Search, + "localhost:1491", "SecretPassword", )?; @@ -50,14 +50,14 @@ use sonic_channel::*; fn main() -> result::Result<()> { let mut channel = SonicChannel::connect_with_start( + ChannelMode::Ingest, "localhost:1491", - ChannelMode::Ingest, "SecretPassword", )?; - let pushed = channel.push("collection", "bucket", "user:1", "my best recipe")?; + let pushed = channel.push("collection", "bucket", "object:1", "my best recipe")?; // or - // let pushed = channel.push_with_locale("collection", "bucket", "user:1", "Мой лучший рецепт", Some("rus"))?; + // let pushed = channel.push_with_locale("collection", "bucket", "object:1", "Мой лучший рецепт", "rus")?; dbg!(pushed); Ok(()) @@ -74,4 +74,3 @@ fn main() -> result::Result<()> { [sonic]: https://github.com/valeriansaliou/sonic -[documentation]: https://docs.rs/sonic-channel \ No newline at end of file