sltfluxpy 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sltfluxpy-0.1.0/LICENSE +8 -0
- sltfluxpy-0.1.0/PKG-INFO +8 -0
- sltfluxpy-0.1.0/README.md +3 -0
- sltfluxpy-0.1.0/pyproject.toml +18 -0
- sltfluxpy-0.1.0/setup.cfg +4 -0
- sltfluxpy-0.1.0/src/sltfluxpy/__init__.py +3 -0
- sltfluxpy-0.1.0/src/sltfluxpy/auth.py +7 -0
- sltfluxpy-0.1.0/src/sltfluxpy/messages.py +6 -0
- sltfluxpy-0.1.0/src/sltfluxpy/users.py +14 -0
- sltfluxpy-0.1.0/src/sltfluxpy.egg-info/PKG-INFO +8 -0
- sltfluxpy-0.1.0/src/sltfluxpy.egg-info/SOURCES.txt +12 -0
- sltfluxpy-0.1.0/src/sltfluxpy.egg-info/dependency_links.txt +1 -0
- sltfluxpy-0.1.0/src/sltfluxpy.egg-info/requires.txt +1 -0
- sltfluxpy-0.1.0/src/sltfluxpy.egg-info/top_level.txt +1 -0
sltfluxpy-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
fih ><> ><> ><>
|
|
2
|
+
FDWL - Fries' Do Whatever License
|
|
3
|
+
|
|
4
|
+
This code is by fries, and fries grants you full permission to do what you wish.
|
|
5
|
+
Under this one stipulation: Give even the most minimal of credit! I want to see cool projects and forks and know that I made something for them lol.
|
|
6
|
+
I may not be a lawyer, but I trust in my heart that you will be kind.
|
|
7
|
+
|
|
8
|
+
fih ><> ><> ><>
|
sltfluxpy-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sltfluxpy"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A piss easy wrapper for the Fluxer Rest API"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"requests>=2.31.0"
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[tool.setuptools]
|
|
15
|
+
package-dir = {"" = "src"}
|
|
16
|
+
|
|
17
|
+
[tool.setuptools.packages.find]
|
|
18
|
+
where = ["src"]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from datetime import datetime, timedelta, timezone
|
|
3
|
+
|
|
4
|
+
def login(email, password):
|
|
5
|
+
print("Warning: This likely does not work.")
|
|
6
|
+
response = requests.post("https://web.fluxer.app/api/v1/auth/login", headers={"Content-Type": "application/json", "Origin": "https://web.fluxer.app"}, json={"email": email,"password": password})
|
|
7
|
+
return(response.json())
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from datetime import datetime, timedelta, timezone
|
|
3
|
+
|
|
4
|
+
def sendmessage(token, channelid, content):
|
|
5
|
+
response = requests.post(f"https://web.fluxer.app/api/v1/channels/{channelid}/messages", headers={"Authorization": token,"Content-Type": "application/json", "Origin":"https://web.fluxer.app"}, json={"content":content})
|
|
6
|
+
return(response.json())
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from datetime import datetime, timedelta, timezone
|
|
3
|
+
|
|
4
|
+
def changestatus(token, status, expirehours):
|
|
5
|
+
expires_at = (datetime.now(timezone.utc) + timedelta(hours=expirehours)).isoformat(timespec="milliseconds").replace("+00:00", "Z")
|
|
6
|
+
response = requests.patch("https://web.fluxer.app/api/v1/users/@me/settings",headers={"Authorization": token,"Content-Type": "application/json","Origin": "https://web.fluxer.app"},json={"custom_status": {"text": status,"expires_at": expires_at,}},timeout=10,)
|
|
7
|
+
|
|
8
|
+
response.raise_for_status()
|
|
9
|
+
return(status)
|
|
10
|
+
|
|
11
|
+
def getuser(token, id):
|
|
12
|
+
response = requests.get(f"https://web.fluxer.app/api/v1/users/{id}",headers={"Authorization": token,"Content-Type": "application/json","Origin": "https://web.fluxer.app"})
|
|
13
|
+
response.raise_for_status()
|
|
14
|
+
return(response.json())
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/sltfluxpy/__init__.py
|
|
5
|
+
src/sltfluxpy/auth.py
|
|
6
|
+
src/sltfluxpy/messages.py
|
|
7
|
+
src/sltfluxpy/users.py
|
|
8
|
+
src/sltfluxpy.egg-info/PKG-INFO
|
|
9
|
+
src/sltfluxpy.egg-info/SOURCES.txt
|
|
10
|
+
src/sltfluxpy.egg-info/dependency_links.txt
|
|
11
|
+
src/sltfluxpy.egg-info/requires.txt
|
|
12
|
+
src/sltfluxpy.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.31.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sltfluxpy
|