delivery
Contains classes and functions related to Roblox asset delivery.
BaseCDNHash
¶
Represents a cdn_hash on a Roblox content delivery network.
Attributes:
Name | Type | Description |
---|---|---|
cdn_hash |
str
|
The CDN hash as a string. |
Source code in roblox/delivery.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
__init__(client, cdn_hash)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
Client
|
The Client object. |
required |
cdn_hash |
str
|
The CDN hash as a string. |
required |
Source code in roblox/delivery.py
39 40 41 42 43 44 45 46 47 |
|
get_cdn_number()
¶
Returns the CDN number of this CDN hash.
Returns:
Type | Description |
---|---|
int
|
The computed number of the given cdn_hash |
Source code in roblox/delivery.py
52 53 54 55 56 57 58 59 60 |
|
get_url(site=cdn_site)
¶
Gets the cdn_hash's URL. This should be implemented by subclasses.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
site |
str
|
Represents the URL for what site it should target, be it rbxcdn.com, or roblox.com etc. |
cdn_site
|
Returns:
Type | Description |
---|---|
str
|
The computed URL from the given cdn_hash attribute. |
Source code in roblox/delivery.py
66 67 68 69 70 71 72 73 74 75 76 77 |
|
ContentCDNHash
¶
Bases: BaseCDNHash
Represents a CDN hash on cX.rbxcdn.com.
Source code in roblox/delivery.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
get_url(site=cdn_site)
¶
Returns:
Type | Description |
---|---|
str
|
This hash's URL. |
Source code in roblox/delivery.py
104 105 106 107 108 109 110 |
|
DeliveryProvider
¶
Provides CDN hashes and other delivery-related objects.
Source code in roblox/delivery.py
113 114 115 116 117 118 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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
__init__(client)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
Client
|
The client object, which is passed to all objects this client generates. |
required |
Source code in roblox/delivery.py
118 119 120 121 122 123 |
|
get_cdn_hash(cdn_hash)
¶
Gets a Roblox CDN cdn_hash.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cdn_hash |
str
|
The cdn_hash. |
required |
Returns:
Type | Description |
---|---|
BaseCDNHash
|
A BaseCDNHash. |
Source code in roblox/delivery.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
get_cdn_hash_from_url(url, site=cdn_site)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
A CDN url. |
required |
site |
str
|
The site this cdn_hash is located at. |
cdn_site
|
Returns:
Type | Description |
---|---|
BaseCDNHash
|
The CDN cdn_hash for the supplied CDN URL. |
Source code in roblox/delivery.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|
get_content_cdn_hash(cdn_hash)
¶
Gets a Roblox CDN cdn_hash.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cdn_hash |
str
|
The cdn_hash. |
required |
Returns:
Type | Description |
---|---|
ContentCDNHash
|
A ContentCDNHash. |
Source code in roblox/delivery.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
get_thumbnail_cdn_hash(cdn_hash)
¶
Gets a Roblox CDN cdn_hash.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cdn_hash |
str
|
The cdn_hash. |
required |
Returns:
Type | Description |
---|---|
ThumbnailCDNHash
|
A ThumbnailCDNHash. |
Source code in roblox/delivery.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
ThumbnailCDNHash
¶
Bases: BaseCDNHash
Represents a CDN hash on tX.rbxcdn.com.
Source code in roblox/delivery.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
get_url(site=cdn_site)
¶
Returns this CDN hash's URL.
Source code in roblox/delivery.py
88 89 90 91 92 93 |
|
get_cdn_number(cdn_hash)
¶
Gets the number in the CDN where number represents X in tX.rbxcdn.com
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cdn_hash |
str
|
The CDN cdn_hash to generate a CDN number for. |
required |
Returns:
Type | Description |
---|---|
int
|
The CDN number for the supplied cdn_hash. |
Source code in roblox/delivery.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|