jobs
This module contains classes intended to parse and deal with data from Roblox server instance (or "job") endpoints.
GameInstance
¶
Bases: BaseJob
Represents a game (or place) instance, or "job".
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The instance's job ID. |
capacity |
int
|
The server's capacity. |
ping |
int
|
The server's ping. |
fps |
float
|
The server's FPS. |
show_slow_game_message |
bool
|
Whether to show the "slow game" message. |
place |
BasePlace
|
The server's place. |
current_players |
List[GameInstancePlayer]
|
A list of the players in this server. |
can_join |
bool
|
Whether the authenticated user can join this server. |
show_shutdown_button |
bool
|
Whether to show the shutdown button on this server. |
friends_description |
str
|
What text should be shown if this server is a "friends are in" server. |
friends_mouseover |
What text should be shown on mouseover if this server is a "friends are in" server. |
|
capacity_message |
str
|
The server's capacity as a parsed message. |
join_script |
str
|
JavaScript code that, when evaluated on a /games page on the Roblox website, launches this game. |
app_join_script |
str
|
JavaScript code that, when evaluated on a /games page on the Roblox website, launches this game through the Roblox mobile app. |
Source code in roblox/jobs.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
GameInstancePlayer
¶
Bases: BaseUser
Represents a single player in a game instance. Data, like user ID and username, may be filled with placeholder data. Do not rely on this object containing proper data. If the id attribute is 0, this object should not be used.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The player's user ID. |
name |
str
|
The player's username. |
thumbnail |
GameInstancePlayerThumbnail
|
The player's thumbnail. |
Source code in roblox/jobs.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
GameInstancePlayerThumbnail
¶
Represent a player in a game instance's thumbnail. As the asset part of these thumbnails is no longer in use, this endpoint does not attempt to implement asset information.
Attributes:
Name | Type | Description |
---|---|---|
url |
str
|
The thumbnail's URL. |
final |
bool
|
Whether the thumbnail is finalized or not. |
Source code in roblox/jobs.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
GameInstances
¶
Represents a game/place's active server instances.
Attributes:
Name | Type | Description |
---|---|---|
place |
BasePlace
|
The place. |
show_shutdown_all_button |
bool
|
Whether to show the "Shutdown All" button on the server list. |
is_game_instance_list_unavailable |
bool
|
Whether the list is unavailable. |
collection |
List[GameInstance]
|
A list of the game instances. |
total_collection_size |
int
|
How many active servers there are. |
Source code in roblox/jobs.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
PrivateServer
¶
Bases: Server
Represents a private server.
Attributes:
Name | Type | Description |
---|---|---|
id |
The private server's job id. |
|
vip_server_id |
int
|
The private server's vipServerId. |
max_players |
int
|
The maximum number of players that can be in the server at once. |
playing |
int
|
The amount of players in the server. |
player_tokens |
int
|
A list of thumbnail tokens for all the players in the server. |
players |
int
|
A list of ServerPlayer objects representing the players in the server. Only friends of the authenticated user will show up here. |
fps |
int
|
The server's fps. |
ping |
int
|
The server's ping. |
name |
str
|
The private server's name. |
access_code |
str
|
The private server's access code. |
owner |
PartialUser
|
A PartialUser object representing the owner of the private server. |
Source code in roblox/jobs.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
__init__(client, data)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
Client
|
The Client this object belongs to. |
required |
data |
dict
|
A PrivateServerResponse object. |
required |
Source code in roblox/jobs.py
234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
Server
¶
Bases: BaseItem
Represents a public server.
Attributes:
Name | Type | Description |
---|---|---|
id |
Optional[str]
|
The server's job id. |
max_players |
int
|
The maximum number of players that can be in the server at once. |
playing |
int
|
The amount of players in the server. |
player_tokens |
List[str]
|
A list of thumbnail tokens for all the players in the server. |
players |
List[ServerPlayer]
|
A list of ServerPlayer objects representing the players in the server. Only friends of the authenticated user will show up here. |
fps |
float
|
The server's fps. |
ping |
Optional[int]
|
The server's ping. |
Source code in roblox/jobs.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
__init__(client, data)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
Client
|
The Client this object belongs to. |
required |
data |
dict
|
A GameServerResponse object. |
required |
Source code in roblox/jobs.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
ServerPlayer
¶
Bases: BaseUser
Represents a player in a server.
Attributes:
Name | Type | Description |
---|---|---|
id |
The player's user id. |
|
name |
str
|
The player's username. |
display_name |
str
|
The player's display name. |
player_token |
str
|
The player's token. |
Source code in roblox/jobs.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
__init__(client, data)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
Client
|
The Client this object belongs to. |
required |
data |
dict
|
A GameServerPlayerResponse object. |
required |
Source code in roblox/jobs.py
166 167 168 169 170 171 172 173 174 175 176 177 |
|
ServerType
¶
Bases: Enum
Represents the type of server.
Source code in roblox/jobs.py
146 147 148 149 150 151 152 |
|