dswebhook 0.2.4__tar.gz → 0.2.5__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.
- {dswebhook-0.2.4/src/dswebhook.egg-info → dswebhook-0.2.5}/PKG-INFO +1 -2
- {dswebhook-0.2.4 → dswebhook-0.2.5}/README.md +0 -1
- {dswebhook-0.2.4 → dswebhook-0.2.5}/pyproject.toml +1 -1
- {dswebhook-0.2.4 → dswebhook-0.2.5}/src/dswebhook/dswebhook.py +40 -4
- {dswebhook-0.2.4 → dswebhook-0.2.5/src/dswebhook.egg-info}/PKG-INFO +1 -2
- {dswebhook-0.2.4 → dswebhook-0.2.5}/src/dswebhook.egg-info/SOURCES.txt +0 -1
- dswebhook-0.2.5/src/dswebhook.egg-info/top_level.txt +1 -0
- dswebhook-0.2.4/src/dswebhook.egg-info/top_level.txt +0 -2
- dswebhook-0.2.4/src/exceptions.py +0 -39
- {dswebhook-0.2.4 → dswebhook-0.2.5}/LICENSE +0 -0
- {dswebhook-0.2.4 → dswebhook-0.2.5}/setup.cfg +0 -0
- {dswebhook-0.2.4 → dswebhook-0.2.5}/src/dswebhook/__init__.py +0 -0
- {dswebhook-0.2.4 → dswebhook-0.2.5}/src/dswebhook.egg-info/dependency_links.txt +0 -0
- {dswebhook-0.2.4 → dswebhook-0.2.5}/src/dswebhook.egg-info/requires.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dswebhook
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Lib for easy use of discord webhook
|
|
5
5
|
Author: Beks1k
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -15,7 +15,6 @@ A minimal and efficient Python wrapper for managing and sending messages to mult
|
|
|
15
15
|
|
|
16
16
|
## Exceptions
|
|
17
17
|
|
|
18
|
-
The module imports exceptions from an external `exceptions` file:
|
|
19
18
|
|
|
20
19
|
- **`InvalidURL`**: Raised if the URL string is empty or missing.
|
|
21
20
|
- **`AlreadyExists`**: Raised if you try to register a URL on an ID that is already taken.
|
|
@@ -4,7 +4,6 @@ A minimal and efficient Python wrapper for managing and sending messages to mult
|
|
|
4
4
|
|
|
5
5
|
## Exceptions
|
|
6
6
|
|
|
7
|
-
The module imports exceptions from an external `exceptions` file:
|
|
8
7
|
|
|
9
8
|
- **`InvalidURL`**: Raised if the URL string is empty or missing.
|
|
10
9
|
- **`AlreadyExists`**: Raised if you try to register a URL on an ID that is already taken.
|
|
@@ -1,9 +1,45 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
class BadRequest(Exception):
|
|
4
|
+
'''When 400 hits in'''
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
class InternalServerError(Exception):
|
|
8
|
+
'''When 500 hits in'''
|
|
9
|
+
pass
|
|
10
|
+
|
|
11
|
+
class InvalidURL(Exception):
|
|
12
|
+
'''When Invalid url is given'''
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
class ContentTooLarge(Exception):
|
|
16
|
+
'''When Given content bigger than 2000'''
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
class ConnectionError(Exception):
|
|
20
|
+
'''When Connection error accures such as no inter net etc.'''
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
class SchemaError(Exception):
|
|
24
|
+
'''When schema not right'''
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
class NoSuchID(Exception):
|
|
28
|
+
'''When id is not found in urlr'''
|
|
29
|
+
pass
|
|
30
|
+
|
|
31
|
+
class AlreadyExists(Exception):
|
|
32
|
+
'''When id is already exists in urlr'''
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
class HTTPError(Exception):
|
|
36
|
+
'''When other HTTP error accures'''
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
class NotJSON(Exception):
|
|
40
|
+
'''If customJSON is not a dictionary'''
|
|
41
|
+
pass
|
|
42
|
+
|
|
7
43
|
urlr = {}
|
|
8
44
|
|
|
9
45
|
def init(url:str, id=1):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dswebhook
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Lib for easy use of discord webhook
|
|
5
5
|
Author: Beks1k
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -15,7 +15,6 @@ A minimal and efficient Python wrapper for managing and sending messages to mult
|
|
|
15
15
|
|
|
16
16
|
## Exceptions
|
|
17
17
|
|
|
18
|
-
The module imports exceptions from an external `exceptions` file:
|
|
19
18
|
|
|
20
19
|
- **`InvalidURL`**: Raised if the URL string is empty or missing.
|
|
21
20
|
- **`AlreadyExists`**: Raised if you try to register a URL on an ID that is already taken.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dswebhook
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
class BadRequest(Exception):
|
|
2
|
-
'''When 400 hits in'''
|
|
3
|
-
pass
|
|
4
|
-
|
|
5
|
-
class InternalServerError(Exception):
|
|
6
|
-
'''When 500 hits in'''
|
|
7
|
-
pass
|
|
8
|
-
|
|
9
|
-
class InvalidURL(Exception):
|
|
10
|
-
'''When Invalid url is given'''
|
|
11
|
-
pass
|
|
12
|
-
|
|
13
|
-
class ContentTooLarge(Exception):
|
|
14
|
-
'''When Given content bigger than 2000'''
|
|
15
|
-
pass
|
|
16
|
-
|
|
17
|
-
class ConnectionError(Exception):
|
|
18
|
-
'''When Connection error accures such as no inter net etc.'''
|
|
19
|
-
pass
|
|
20
|
-
|
|
21
|
-
class SchemaError(Exception):
|
|
22
|
-
'''When schema not right'''
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
|
-
class NoSuchID(Exception):
|
|
26
|
-
'''When id is not found in urlr'''
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
class AlreadyExists(Exception):
|
|
30
|
-
'''When id is already exists in urlr'''
|
|
31
|
-
pass
|
|
32
|
-
|
|
33
|
-
class HTTPError(Exception):
|
|
34
|
-
'''When other HTTP error accures'''
|
|
35
|
-
pass
|
|
36
|
-
|
|
37
|
-
class NotJSON(Exception):
|
|
38
|
-
'''If customJSON is not a dictionary'''
|
|
39
|
-
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|