Skip to content

Commit

Permalink
Added .localvars (completed #2)
Browse files Browse the repository at this point in the history
- Moved some absolute variables to a .localvares submodule
- Added API_TYPE_ variables to .localvars
- Added STREAM_VIS_ variables to .localvars
  • Loading branch information
thelabcat committed Apr 18, 2024
1 parent 90a13bf commit 78ac757
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/cocorum/localvars.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
#Cocorum local variable definitions
#S.D.G.

TIMESTAMP_FORMAT = "%Y-%m-%dT%H:%M:%S" #Rumble timestamp format, not including the 6 TODO characters at the end

HEADERS = {"User-Agent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"}

STATIC_KEYS = [ #Keys of the API JSON that should not change unless the API URL changes, and so do not trigger a refresh
"user_id",
"username",
"channel_id",
"channel_name",
]

STATIC_KEYS_STREAM = [ #Keys of the API JSON stream object that should not change unless the API URL changes, and so do not trigger a refresh
"id",
"created_on"
]

#API types, under JSON["type"]
API_TYPE_USER = "user"
API_TYPE_CHANNEL = "channel"

#Stream visibility possibilities, under JSON["livestreams"][0]["visibility"]
STREAM_VIS_PUBLIC = "public"
STREAM_VIS_UNLISTED = "unlisted"
STREAM_VIS_PRIVATE = "private"

0 comments on commit 78ac757

Please sign in to comment.