Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in docs #105

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/en/nats/2_publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ asyncio.run(pub())

The `publish` method accepts the following arguments:

* `message`: bytes | str | dict | Sequence[Any] | pydatic.BaseModel - message to send
* `message`: bytes | str | dict | Sequence[Any] | pydantic.BaseModel - message to send
* `subject`: str - *subject*, where the message will be sent.

## Message Parameters
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/en/rabbit/4_publishing.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Rabbit Publishing

`RabbitBroker` also uses the unified `publish` method to send messages.
However, in this case, an object of the `aio_pika.Message` class (if necessary) can act as a message (in addition to `str`, `bytes`, `dict`, `pydatic.BaseModel`).
However, in this case, an object of the `aio_pika.Message` class (if necessary) can act as a message (in addition to `str`, `bytes`, `dict`, `pydantic.BaseModel`).

```python
import asyncio
from propan import RabbitBroker

async def pub():
async with RabbitBroker() as broker:
await broker.publish("Hi!", queue="test", exhcange="test")
await broker.publish("Hi!", queue="test", exchange="test")

asyncio.run(pub())
```
Expand All @@ -18,7 +18,7 @@ asyncio.run(pub())

The `publish` method takes the following arguments:

* `message`: bytes | str | dict | Sequence[Any] | pydatic.BaseModel | aio_pika.Message = "" - message to send
* `message`: bytes | str | dict | Sequence[Any] | pydantic.BaseModel | aio_pika.Message = "" - message to send
* `exchange`: str | RabbitExchange | None = None - the exchange where the message will be sent to. If not specified - *default* is used
* `queue`: str | RabbitQueue = "" - the queue where the message will be sent (since most queues use their name as the routing key, this is a human-readable version of `routing_key`)
* `routing_key`: str = "" - also a message routing key, if not specified, the `queue` argument is used
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/en/redis/2_publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ asyncio.run(pub())

The `publish` method accepts the following arguments:

* `message`: bytes | str | dict | Sequence[Any] | pydatic.BaseModel - message to send
* `message`: bytes | str | dict | Sequence[Any] | pydantic.BaseModel - message to send
* `channel`: str = "" - *channel* to which the message will be sent.

## Message Parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ru/nats/2_publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ asyncio.run(pub())

Метод `publish` принимает следующие аргументы:

* `message`: bytes | str | dict | Sequence[Any] | pydatic.BaseModel - сообщение для отправки
* `message`: bytes | str | dict | Sequence[Any] | pydantic.BaseModel - сообщение для отправки
* `subject`: str - *subject*, куда будет отправлено сообщение.

## Параметры сообщения
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/ru/rabbit/4_publishing.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Rabbit Publishing

Для отправки сообщений `RabbitBroker` также использует унифицированный метод `publish`.
Однако, в данном случае в качестве сообщения (помимо `str`, `bytes`, `dict`, `pydatic.BaseModel`) может выступать объект класса `aio_pika.Message` (при необходимости).
Однако, в данном случае в качестве сообщения (помимо `str`, `bytes`, `dict`, `pydantic.BaseModel`) может выступать объект класса `aio_pika.Message` (при необходимости).

```python
import asyncio
from propan import RabbitBroker

async def pub():
async with RabbitBroker() as broker:
await broker.publish("Hi!", queue="test", exhcange="test")
await broker.publish("Hi!", queue="test", exchange="test")

asyncio.run(pub())
```
Expand All @@ -18,7 +18,7 @@ asyncio.run(pub())

Метод `publish` принимает следующие аргументы:

* `message`: bytes | str | dict | Sequence[Any] | pydatic.BaseModel | aio_pika.Message = "" - сообщение для отправки
* `message`: bytes | str | dict | Sequence[Any] | pydantic.BaseModel | aio_pika.Message = "" - сообщение для отправки
* `exchange`: str | RabbitExchange | None = None - exchange, куда будет отправлено сообщение. Если не указан - используется *default*
* `queue`: str | RabbitQueue = "" - очередь, куда будет отправлено сообщение (т.к. большинство очередей используют свое название в качестве ключа маршрутизации, это человекочитаемый вариант `routing_key`)
* `routing_key`: str = "" - тоже ключ маршрутизации сообщения, если не указан - используется аргумент `queue`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ru/redis/2_publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ asyncio.run(pub())

Метод `publish` принимает следующие аргументы:

* `message`: bytes | str | dict | Sequence[Any] | pydatic.BaseModel - сообщение для отправки
* `message`: bytes | str | dict | Sequence[Any] | pydantic.BaseModel - сообщение для отправки
* `channel`: str = "" - *channel*, куда будет отправлено сообщение.

## Параметры сообщения
Expand Down