cocorum.servicephp
The primary use from this module is the ServicePHP class, a wrapper for Rumble's internal service.php API. Login is performed via this API, as well as most Rumble functions other than chat messaging and video upload.
All other classes are supporting sub-classes.
Service.PHP interactions
Control Rumble via Service.PHP
Copyright 2026 Wilbur Jaywright d.b.a. Marswide BGL.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
S.D.G.
APIComment
Bases: JSONObj, BaseComment
A comment on a video as returned by a successful attempt to make it
Source code in cocorum/servicephp.py
62 63 64 65 66 67 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 | |
comment_id
property
The numeric ID of the comment in base 10
servicephp = servicephp
instance-attribute
Our parent ServicePHP wrapper
text
property
The text of the comment
tree_size
property
TODO
user_display
property
The display name of the user who commented
__init__(jsondata, servicephp)
A comment on a video as returned by a successful attempt to make it
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jsondata
|
dict
|
The JSON block for a single comment. |
required |
servicephp
|
ServicePHP
|
The ServicePHP object that spawned us. |
required |
Source code in cocorum/servicephp.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
__repr__()
String to represent this object
Source code in cocorum/servicephp.py
84 85 86 | |
APIPlaylist
Bases: JSONObj, BasePlaylist
Playlist as returned by the API
Source code in cocorum/servicephp.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 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 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
channel
property
The channel the playlist is under, can be None
created_on
property
The time the playlist was created in seconds since epoch
description
property
The description of the playlist
extra
property
TODO -> None, unknown
is_following
property
TODO -> Bool
items
property
The items of the playlist
num_items
property
The number of items in the playlist
permissions
property
The permissions the ServicePHP user has on this playlist
playlist_id
property
The numeric playlist ID in base 64
servicephp = servicephp
instance-attribute
Our parent ServicePHP wrapper
title
property
The title of the playlist
updated_on
property
The time the playlist was last updated in seconds since epoch
url
property
The URL of the playlist
user = APIUser(jsondata['user'], self.servicephp)
instance-attribute
The user that created this playlist
visibility
property
The visibility of the playlist
__init__(jsondata, servicephp)
Playlist as returned by the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jsondata
|
dict
|
The JSON data block of a playlist. |
required |
servicephp
|
ServicePHP
|
The ServicePHP object that spawned us. |
required |
Source code in cocorum/servicephp.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
APIUser
User data as returned by the API
Source code in cocorum/servicephp.py
109 110 111 112 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 188 189 190 | |
followed
property
TODO -> Bool
followers
property
The number of followers this user has
picture
property
The user's profile picture as a bytes string
picture_url
property
The URL of the user's profile picture
servicephp = servicephp
instance-attribute
Our parent ServicePHP wrapper
user_id
property
The numeric ID of the user in base 10
user_id_b10
property
The numeric ID of the user in base 10
user_id_b36
property
The numeric ID of the user in base 36
username
property
The username of the user
verified_badge
property
Is the user verified?
__init__(jsondata, servicephp)
User data as returned by the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jsondata
|
dict
|
The JSON data block of a single user. |
required |
servicephp
|
ServicePHP
|
The ServicePHP object that spawned us. |
required |
Source code in cocorum/servicephp.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
__repr__()
String to represent this object
Source code in cocorum/servicephp.py
127 128 129 130 131 | |
APIUserBadge
Bases: JSONObj, BaseUserBadge
A badge of a user as returned by the API
Source code in cocorum/servicephp.py
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 | |
icon_url
property
The URL of the badge's icon
label
property
A dictionary of lang:label pairs
slug = slug
instance-attribute
The unique identification for this badge type
__init__(slug, jsondata)
A badge of a user as returned by the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slug
|
str
|
The string identifier of the badge. |
required |
jsondata
|
dict
|
The JSON data block of the badge. |
required |
Source code in cocorum/servicephp.py
37 38 39 40 41 42 43 44 45 46 47 48 49 | |
BaseComment
A comment on a Rumble video
Source code in cocorum/basehandles.py
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 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 | |
comment_id_b10
property
The base 10 ID of the comment
comment_id_b36
property
The base 36 ID of the comment
__eq__(other)
Determine if this comment is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
__int__()
The comment in integer form (its ID)
Source code in cocorum/basehandles.py
81 82 83 | |
__str__()
The comment as a string (its text)
Source code in cocorum/basehandles.py
85 86 87 | |
delete()
Delete this comment
Source code in cocorum/basehandles.py
136 137 138 139 | |
pin(unpin=False)
Pin or unpin this comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unpin
|
bool
|
If true, unpins instead of pinning comment. |
False
|
Source code in cocorum/basehandles.py
127 128 129 130 131 132 133 134 | |
restore()
Un-delete this comment
Source code in cocorum/basehandles.py
141 142 143 144 | |
BaseContentVotes
Likes and dislikes on a video or comment
Source code in cocorum/basehandles.py
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 | |
__eq__(other)
Determine if this content votes is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
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 | |
__int__()
The integer form of the content votes
Source code in cocorum/basehandles.py
154 155 156 | |
__repr__()
String to represent this object
Source code in cocorum/basehandles.py
150 151 152 | |
BasePlaylist
A playlist of Rumble videos
Source code in cocorum/basehandles.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
playlist_id_b10
property
The numeric ID of the playlist in base 10
playlist_id_b64
property
The numeric ID of the playlist in base 64
__eq__(other)
Determine if this playlist is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
__int__()
The playlist as an integer (it's ID in base 10)
Source code in cocorum/basehandles.py
248 249 250 | |
__repr__()
String to represent this object
Source code in cocorum/basehandles.py
256 257 258 | |
__str__()
The playlist as a string (it's ID in base 64)
Source code in cocorum/basehandles.py
252 253 254 | |
add_video(video_id)
Add a video to this playlist
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
SupportsInt | str
|
The numeric ID of the video to add, in base 10 or 36. |
required |
Source code in cocorum/basehandles.py
297 298 299 300 301 302 303 304 | |
delete()
Delete this playlist
Source code in cocorum/basehandles.py
343 344 345 346 | |
delete_video(video_id)
Remove a video from this playlist
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
SupportsInt | str
|
The numeric ID of the video to remove, in base 10 or 36. |
required |
Source code in cocorum/basehandles.py
306 307 308 309 310 311 312 313 | |
edit(title=None, description=None, visibility=None, channel_id=None)
Edit the details of this playlist. WARNING: The original object will probably be stale after this operation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
The title of the playlist. Defaults to staying the same. |
None
|
description
|
str
|
Describe the playlist. Defaults to staying the same. |
None
|
visibility
|
str
|
Set to public, unlisted, or private via string. Defaults to staying the same. |
None
|
channel_id
|
SupportsInt | str
|
The ID of the channel to have the playlist under. TODO: Cannot be retrieved! Defaults to resetting to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
playlist |
APIPlaylist
|
The edit result. |
Source code in cocorum/basehandles.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | |
BaseUser
A Rumble user
Source code in cocorum/basehandles.py
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 214 215 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 | |
user_id_b10
property
The numeric ID of the user in base 10
user_id_b36
property
The numeric ID of the user in base 36
__eq__(other)
Determine if this user is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
__int__()
The user as an integer (it's ID in base 10)
Source code in cocorum/basehandles.py
188 189 190 | |
mute(duration=None, total=False)
Mute this user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
duration
|
int
|
How long to mute the user in seconds. Defaults to infinite. |
None
|
total
|
bool
|
Wether or not they are muted across all videos. Defaults to False, just this video. |
False
|
Source code in cocorum/basehandles.py
228 229 230 231 232 233 234 235 236 237 238 | |
unmute()
Unmute this user.
Source code in cocorum/basehandles.py
240 241 242 | |
BaseUserBadge
A badge on a username
Source code in cocorum/basehandles.py
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 | |
icon
property
The badge's icon as a bytestring
__eq__(other)
Check if this badge is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
__repr__()
String to represent this object
Source code in cocorum/basehandles.py
59 60 61 | |
__str__()
The chat user badge in string form
Source code in cocorum/basehandles.py
55 56 57 | |
ServicePHP
Interact with Rumble's service.php API
Source code in cocorum/servicephp.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | |
session_cookie = None
instance-attribute
The session token cookie we received on login. Can be reused if not logged out.
session_token
property
The token stored in our session cookie, empty if if we are not logged in
user_id
property
The numeric ID of the logged in user in base 10
user_id_b10
property
The numeric ID of the logged in user in base 10
user_id_b36
property
The numeric ID of the logged in user in base 36
username = username
instance-attribute
The username this ServicePHP wrapper is working under
__init__(username=None, session=None)
Interact with Rumble's service.php API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
The username we will be working under. Defaults to None, refer to session. |
None
|
session
|
str | dict
|
A pre-existing session token. Defaults to None, await login. |
None
|
Source code in cocorum/servicephp.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
__repr__()
String to represent this object
Source code in cocorum/servicephp.py
416 417 418 | |
chat_pin(stream_id, message, unpin=False)
Pin or unpin a message in a chat.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_id
|
int | str
|
ID of the stream in base 10 or 36. |
required |
message
|
int
|
Converting this to int must return a chat message ID. |
required |
unpin
|
bool
|
If true, unpins a message instead of pinning it. |
False
|
Source code in cocorum/servicephp.py
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | |
comment_add(video_id, comment, reply_id=0)
Post a comment on a video.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
SupportsInt | str
|
The numeric ID of a video / stream in base 10 or 36. |
required |
comment
|
str
|
What to say. |
required |
reply_id
|
SupportsInt
|
The ID of the comment to reply to. Defaults to zero (don't reply to anybody). |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
Comment |
APIComment
|
The comment, as parsed from the response data. |
Source code in cocorum/servicephp.py
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | |
comment_delete(comment_id)
Delete a comment by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comment_id
|
SupportsInt
|
The numeric ID of the comment to delete. |
required |
Source code in cocorum/servicephp.py
770 771 772 773 774 775 776 777 778 779 780 | |
comment_list(video_id)
Get the list of comments under a video.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
str | SupportsInt
|
The numeric ID of a video in base 10 or 36. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comments |
list[HTMLComment]
|
A list of scraping.HTMLComment objects. |
Source code in cocorum/servicephp.py
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | |
comment_pin(comment_id, unpin=False)
Pin or unpin a comment by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comment_id
|
SupportsInt
|
The numeric ID of the comment to pin/unpin. |
required |
unpin
|
bool
|
If true, unpins instead of pinning comment. |
False
|
Source code in cocorum/servicephp.py
757 758 759 760 761 762 763 764 765 766 767 768 | |
comment_restore(comment_id)
Restore a deleted comment by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comment_id
|
SupportsInt
|
The numeric ID of the comment to restore. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
comment |
APIComment
|
The restored comment. |
Source code in cocorum/servicephp.py
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 | |
get_2fa_first_step(password_hashes)
Get 2FA info on our account as a first 2FA step
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password_hashes
|
str
|
The hashed password. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
info |
TwoFacAuth
|
Information on 2FA. |
Source code in cocorum/servicephp.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | |
get_hashed_password(password)
Use Rumble's salts to hash a pasword for login
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password
|
str
|
The password to hash with the salts. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
hashed |
str
|
The hashed password to use in the rest of the login. |
Source code in cocorum/servicephp.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
get_video_url(video_id)
Get the URL of a Rumble video.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
SupportsInt | str
|
The numeric ID of the video. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
URL |
str
|
The URL of the video. |
Source code in cocorum/servicephp.py
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 | |
login_basic(password)
Perform a basic password authentication as the first step of login. If successful, sets our session token and returns None. If incomplete, returns TwoFacAuth() for next step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password
|
str
|
The password to login with. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
TwoFacAuth | None
|
The result of the first login step. None means login is complete. |
Source code in cocorum/servicephp.py
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | |
login_second_factor(two_fac_auth, code)
Complete login with a 2FA code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
two_fac_auth
|
TwoFacAuth
|
2FA information on this account. |
required |
code
|
str
|
The code to enter. |
required |
Source code in cocorum/servicephp.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | |
logout()
Log out this ServicePHP instance
Source code in cocorum/servicephp.py
624 625 626 627 | |
mute_user(username, is_channel=False, video=None, duration=None, total=False)
Mute a user or channel by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
The user to mute. |
required |
is_channel
|
bool
|
Is this a channel name rather than a username? |
False
|
video
|
SupportsInt
|
The video to mute the user on. Defaults to None. |
None
|
duration
|
int
|
How long the user will be muted for, in seconds. Defaults to None, mute permanently. |
None
|
total
|
bool
|
Is this a mute across all videos? Defaults to False, requires video if False. |
False
|
Source code in cocorum/servicephp.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | |
playlist_add(title, description='', visibility='public', channel_id=None)
Create a new playlist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
The title of the playlist. |
required |
description
|
str
|
Describe the playlist. Defaults to nothing. |
''
|
visibility
|
str
|
Set to public, unlisted, or private via string. Defaults to 'public'. |
'public'
|
channel_id
|
SupportsInt | str
|
The numeric ID of the channel to create the playlist under. Defaults to none. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Playlist |
APIPlaylist
|
The playlist as parsed from the response data. |
Source code in cocorum/servicephp.py
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 | |
playlist_add_video(playlist_id, video_id)
Add a video to a playlist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
playlist_id
|
str
|
The numeric ID of the playlist in base 64. |
required |
video_id
|
SupportsInt | str
|
The numeric ID of the video to add, in base 10 or 36. |
required |
Source code in cocorum/servicephp.py
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | |
playlist_delete(playlist_id)
Delete a playlist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
playlist_id
|
str
|
The numeric ID of the playlist to delete in base 64. |
required |
Source code in cocorum/servicephp.py
921 922 923 924 925 926 927 928 929 930 931 | |
playlist_delete_video(playlist_id, video_id)
Remove a video from a playlist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
playlist_id
|
str
|
The numeric ID of the playlist in base 64. |
required |
video_id
|
(int, str)
|
The numeric ID of the video to remove, in base 10 or 36. |
required |
Source code in cocorum/servicephp.py
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 | |
playlist_edit(playlist_id, title, description='', visibility='public', channel_id=None)
Edit the details of an existing playlist
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
playlist_id
|
str
|
The numeric ID of the playlist to edit in base 64. |
required |
title
|
str
|
The title of the playlist. |
required |
description
|
str
|
Describe the playlist. Defaults to nothing. |
''
|
visibility
|
str
|
Set to public, unlisted, or private via string. Defaults to 'public'. |
'public'
|
channel_id
|
SupportsInt | str
|
The numeric ID of the channel to have the playlist under. Defaults to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Playlist |
APIPlaylist
|
The playlist as parsed from the response data. |
Source code in cocorum/servicephp.py
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | |
raid_confirm(stream_id)
Confirm a raid, previously set up by command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_id
|
SupportsInt | str
|
The numeric ID of the stream to confirm the raid from, in base 10 or 36. |
required |
Source code in cocorum/servicephp.py
933 934 935 936 937 938 939 940 941 942 943 | |
reset_rls_api_key(channel_id=None)
Reset the Live Stream API URL for a user or channel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_id
|
SupportsInt | str
|
The channel to reset the API key for. Defaults to None, reset the user API key. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
success |
bool
|
The success attribute of the returned JSON. |
Source code in cocorum/servicephp.py
945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | |
sphp_request(service_name, data={}, additional_params={}, logged_in=True, method='POST')
Make a request to Service.PHP with common settings
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_name
|
str
|
The name parameter of the specific PHP service |
required |
data
|
dict
|
Form data. Defaults to {}. |
{}
|
additional_params
|
dict
|
Any additional query string parameters. Defaults to {}. |
{}
|
logged_in
|
bool
|
Should the request use the session cookie? Defaults to True. |
True
|
method
|
str
|
What request method to use. Defaults to 'POST'. |
'POST'
|
Returns:
| Name | Type | Description |
|---|---|---|
response |
Response
|
The response from Rumble. |
Source code in cocorum/servicephp.py
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | |
unmute_user(record_id)
Unmute a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record_id
|
SupportsInt
|
The numeric ID of the mute record to undo. |
required |
Source code in cocorum/servicephp.py
680 681 682 683 684 685 686 687 688 689 690 691 692 | |
TwoFacAuth
Bases: JSONObj
Handle and use the resposne data from the 2FA request
Source code in cocorum/servicephp.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
options
property
The options we have for 2FA
servicephp = servicephp
instance-attribute
Our parent ServicePHP wrapper
totp_id
property
Is None when 2FA is disabled
user_key
property
Is None when 2FA is disabled
__init__(jsondata, servicephp)
Handle and use the resposne data from the 2FA request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jsondata
|
dict
|
The JSON data block of the 2FA first step data. |
required |
servicephp
|
ServicePHP
|
The ServicePHP object that spawned us. |
required |
Source code in cocorum/servicephp.py
283 284 285 286 287 288 289 290 291 292 293 | |
__repr__()
String to represent this object
Source code in cocorum/servicephp.py
295 296 297 | |
request_2fa_code(option='authenticator')
Tell Rumble to send the user a 2FA code
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
option
|
str
|
The 2FA option to use. Must be in self.options. Defaults to "authenticator" app. |
'authenticator'
|
Returns:
| Name | Type | Description |
|---|---|---|
sent_to |
str | None
|
The code destination, semi-censored. If 'authenticator' was used, returns None, as such apps generate the 2FA codes on demand. |
Source code in cocorum/servicephp.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
S.D.G.