Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
olijeffers0n committed Oct 19, 2024
1 parent 919c26c commit f4f7cf9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api-methods/getting-the-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Calling `rust_socket.get_map(add_icons: bool, add_events: bool, add_vending_mach

### Getting the Map Data

Calling `rust_socket.get_raw_map_data()` will return a `RustMap` object with the following data:
Calling `rust_socket.get_map_info()` will return a `RustMap` object with the following data:

```python
class RustMap with fields:
Expand Down
9 changes: 8 additions & 1 deletion docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,11 @@ asyncio.run(main())

This will run, and print the time on the Rust Server.

API methods will return `None` if they are not successful. This is to allow for better error handling, and reconnecting to the server.
API methods will return an instance of `RustError` if they are not successful. This is to allow for better error handling, and reconnecting to the server. You can detect these by:

{% code title="main.py" %}
```python
time = await socket.get_time()
if isinstance(time, RustError):
print(f"Error Occurred, Reason: {time.reason}")
```

0 comments on commit f4f7cf9

Please sign in to comment.