Skip to content

Commit f5b60af

Browse files
committed
Move examples to the bottom
1 parent 6178e0b commit f5b60af

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,6 @@ Library to query Source and GoldSource servers. Rewrite of the
77

88
Just Python 3.5+
99

10-
## Examples
11-
12-
Example output shown may be shortened.
13-
14-
```py
15-
>>> import a2s
16-
>>> address = ("stomping.kinofemu.net", 27015)
17-
>>> a2s.info(address)
18-
SourceInfo(protocol=17, server_name=" 24/7 Dustbowl :: Nemu's Stomping Ground", map_name='cp_dustbowl',
19-
folder='tf', game='Team Fortress', app_id=440, player_count=31, max_players=33, bot_count=21,
20-
server_type='d', platform='l', password_protected=True, vac_enabled=True, version='5579073',
21-
edf=177, port=27015, steam_id=85568392920040090, stv_port=None, stv_name=None,
22-
keywords='brutus,celt,couch,cp,dustbowl,increased_maxplayers,nemu,nocrits,nodmgspread,pony,replays,vanilla',
23-
game_id=440, ping=0.253798684978392)
24-
25-
>>> a2s.players(address)
26-
[Player(index=0, name='Brutus', score=34, duration=836.4749145507812),
27-
Player(index=0, name='RageQuit', score=6, duration=1080.8099365234375),
28-
Player(index=0, name="Screamin' Eagles", score=1, duration=439.8598327636719)]
29-
30-
>>> a2s.rules(address)
31-
{'coop': '0', 'deathmatch': '1', 'decalfrequency': '10', 'metamod_version': '1.10.7-devV',
32-
'mp_allowNPCs': '1', 'mp_autocrosshair': '1', 'mp_autoteambalance': '0', 'mp_disable_respawn_times': '0',
33-
'mp_fadetoblack': '0'}
34-
```
35-
3610
## API
3711

3812
### Functions
@@ -62,6 +36,32 @@ game_id=440, ping=0.253798684978392)
6236
* `socket.timeout` - No response
6337
* `socket.gaierror` - Address resolution error
6438

39+
## Examples
40+
41+
Example output shown may be shortened.
42+
43+
```py
44+
>>> import a2s
45+
>>> address = ("stomping.kinofemu.net", 27015)
46+
>>> a2s.info(address)
47+
SourceInfo(protocol=17, server_name=" 24/7 Dustbowl :: Nemu's Stomping Ground", map_name='cp_dustbowl',
48+
folder='tf', game='Team Fortress', app_id=440, player_count=31, max_players=33, bot_count=21,
49+
server_type='d', platform='l', password_protected=True, vac_enabled=True, version='5579073',
50+
edf=177, port=27015, steam_id=85568392920040090, stv_port=None, stv_name=None,
51+
keywords='brutus,celt,couch,cp,dustbowl,increased_maxplayers,nemu,nocrits,nodmgspread,pony,replays,vanilla',
52+
game_id=440, ping=0.253798684978392)
53+
54+
>>> a2s.players(address)
55+
[Player(index=0, name='Brutus', score=34, duration=836.4749145507812),
56+
Player(index=0, name='RageQuit', score=6, duration=1080.8099365234375),
57+
Player(index=0, name="Screamin' Eagles", score=1, duration=439.8598327636719)]
58+
59+
>>> a2s.rules(address)
60+
{'coop': '0', 'deathmatch': '1', 'decalfrequency': '10', 'metamod_version': '1.10.7-devV',
61+
'mp_allowNPCs': '1', 'mp_autocrosshair': '1', 'mp_autoteambalance': '0', 'mp_disable_respawn_times': '0',
62+
'mp_fadetoblack': '0'}
63+
```
64+
6565
## License
6666

6767
MIT

0 commit comments

Comments
 (0)