Skip to content

Commit 6ab45cd

Browse files
committed
Add another example code snippet in README
1 parent 2dffb08 commit 6ab45cd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ def latest_auctions_raw() -> dict: # Make a function for returning API output,
3232
latest_auctions_raw() # Run the actual function now.
3333
```
3434

35+
Here's another example snippet on getting information on a player in Hypixel.
36+
37+
```py
38+
import skyblockpy
39+
40+
skyblock = skyblockpy.Skyblock("api_key") # Initialize the Skyblock class with a prospective Hypixel API key.
41+
42+
def get_player_info() -> dict: # Make a function for returning API output, and highlight return output type as dict.
43+
output = skyblock.get_player_info("notsniped") # Gets an API response on player info for a user "notsniped".
44+
return output
45+
46+
get_player_info() # Run the actual function.
47+
```
48+
3549
## Extra
3650
### I found a bug/I want to add a missing feature!
3751
Just make a new issue [here](https://github.com/PyBotDevs/skyblockpy/issues/new) and describe the bug/feature.

0 commit comments

Comments
 (0)