Skip to content

Commit

Permalink
revert changes for testing, readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
nadineloepfe committed Jan 2, 2025
1 parent ae14c89 commit 8aca40f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ submitting messages.
- [Submitting a Topic Message](#submitting-a-topic-message)
- [Updating a Topic](#updating-a-topic)
- [Deleting a Topic](#deleting-a-topic)
- [Querying Topic](#querying-topic)
- [Querying Topic Message](#querying-topic-message)
- [Contributing](#contributing)

## Installation
Expand Down Expand Up @@ -265,6 +267,19 @@ topic_info = topic_info_query.execute(client)
print(topic_info)
```

### Querying Topic Message

```
query = (
TopicMessageQuery()
.set_topic_id(topic_id)
.set_start_time(datetime.utcnow())
.set_chunking_enabled(True)
.set_limit(0)
)
query.subscribe(client)
```

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion examples/query_topic_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def query_topic_info():
operator_id = AccountId.from_string(os.getenv('OPERATOR_ID'))
operator_key = PrivateKey.from_string(os.getenv('OPERATOR_KEY'))
topic_id = TopicId.from_string("0.0.5336794")
topic_id = TopicId.from_string(os.getenv('TOPIC_ID'))

network = Network(network='testnet')
client = Client(network)
Expand Down
2 changes: 1 addition & 1 deletion examples/query_topic_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def on_error_handler(e):

query = (
TopicMessageQuery()
.set_topic_id("0.0.5337028")
.set_topic_id(os.getenv('TOPIC_ID'))
.set_start_time(datetime.utcnow())
.set_chunking_enabled(True)
.set_limit(0)
Expand Down

0 comments on commit 8aca40f

Please sign in to comment.