Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtabaakbari221b committed Feb 20, 2023
1 parent 8704eda commit fc3871f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="smsir-python",
version="1.0.4",
version="1.0.5",
author="Mojtaba Akbari",
author_email="[email protected]",
packages=["sms_ir"],
Expand Down
19 changes: 11 additions & 8 deletions sms_ir/services.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
from typing import List
from requests.models import Response
from typing import TypeVar
from .mixins import RequestsMixin, LoggerMixin

T = TypeVar('T', int, None)


class SmsIr(RequestsMixin, LoggerMixin):
ENDPOINT = 'https://api.sms.ir'

def __init__(
self,
api_key: str,
linenumber: int|None = None,
linenumber: T = None,
) -> None:

self.config_logger()
Expand All @@ -25,7 +28,7 @@ def send_sms(
self,
number: str,
message: str,
linenumber: int|None = None,
linenumber: T = None,
) -> Response:
"""
Send message to specific mobile number
Expand All @@ -41,7 +44,7 @@ def send_bulk_sms(
self,
numbers: List[str],
message: str,
linenumber: int|None = None,
linenumber: T = None,
) -> Response:
"""
Send message to multiple mobile numbers
Expand All @@ -64,7 +67,7 @@ def send_like_to_like(
self,
numbers: List[str],
messages: List[str],
linenumber: int|None =None,
linenumber: T =None,
send_date_time: str|None =None,
) -> Response:
"""
Expand Down Expand Up @@ -173,8 +176,8 @@ def report_today(

def report_archived(
self,
from_date: int|None =None,
to_date: int|None =None,
from_date: T =None,
to_date: T =None,
page_size: int =10,
page_number: int =1,
) -> Response:
Expand Down Expand Up @@ -238,8 +241,8 @@ def report_today_received(

def report_archived_received(
self,
from_date: int|None =None,
to_date: int|None =None,
from_date: T =None,
to_date: T =None,
page_size: int =10,
page_number: int =1,
) -> Response:
Expand Down

0 comments on commit fc3871f

Please sign in to comment.