Skip to content

Commit f818589

Browse files
committed
Add new client example to readme
1 parent 9f1b1d4 commit f818589

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# spectrum.py
22

33
spectrum.py is a [discord.py](https://github.com/Rapptz/discord.py) style proof-of-concept library for making chatbots
4-
for Star Citizen's [Spectrum](https://robertsspaceindustries.com/spectrum/community/SC) chat client.
4+
for Star Citizen's [Spectrum](https://robertsspaceindustries.com/spectrum/community/SC) chat client. It also offers HTTP clients for interacting
5+
with both Spectrum's REST API and the Community Hub's GraphQL API.
56

67
## Installation
78
```shell
@@ -59,6 +60,18 @@ async def run():
5960
asyncio.run(run())
6061
```
6162

63+
### Community Hub
64+
```python
65+
import asyncio
66+
from spectrum import CommunityHubClient
67+
68+
async def run():
69+
client = CommunityHubClient()
70+
print(await client.fetch_user_profile("Khuzdul"))
71+
72+
asyncio.run(run())
73+
```
74+
6275
## Authentication
6376
The bot can be run in a read only state without any authentication.
6477
If you want to be able to send messages or read private messages (and eventually do other things),

0 commit comments

Comments
 (0)