From 93a8d396f2f1444594ba8e46eb9f842499597943 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 12 Apr 2023 01:00:33 +0000 Subject: automatic import of python-smsapi-client --- .gitignore | 1 + python-smsapi-client.spec | 358 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 360 insertions(+) create mode 100644 python-smsapi-client.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..b6d795e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/smsapi-client-2.7.0.tar.gz diff --git a/python-smsapi-client.spec b/python-smsapi-client.spec new file mode 100644 index 0000000..3632ad1 --- /dev/null +++ b/python-smsapi-client.spec @@ -0,0 +1,358 @@ +%global _empty_manifest_terminate_build 0 +Name: python-smsapi-client +Version: 2.7.0 +Release: 1 +Summary: SmsAPI client +License: Apache Software License +URL: https://github.com/smsapi/smsapi-python-client +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/45/85/5fe508d8567facc87571345e1b91539ea1b7cd9717f3b23ae42e4274d7d2/smsapi-client-2.7.0.tar.gz +BuildArch: noarch + +Requires: python3-requests + +%description +# smsapi-python + +[![Build Status](https://travis-ci.org/smsapi/smsapi-python-client.svg?branch=master)](https://travis-ci.org/smsapi/smsapi-python-client) +[![PyPI](https://img.shields.io/pypi/v/smsapi-client.svg)](https://pypi.python.org/pypi/smsapi-client) + +Client for SMSAPI. + +## COMPATIBILITY + +Compatible with Python 2.7+, 3.+. + +## REQUIREMENTS + +requests + +## INSTALLATION + +If You have pip installed: + + sudo pip install smsapi-client + +else You can install manually: + + git clone https://github.com/smsapi/smsapi-python-client.git + + cd smsapi-python + + python setup.py install + +## Client instance + +If You are smsapi.pl customer You should import + +```python +from smsapi.client import SmsApiPlClient +``` + +else You need to use client for smsapi.com + +```python +from smsapi.client import SmsApiComClient +``` + +## Credentials + +#### Access Token + +```python +from smsapi.client import SmsApiPlClient + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) +``` + +## Examples + +#### Send SMS + +```python +from smsapi.client import SmsApiPlClient + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) + +send_results = client.sms.send(to="phone number", message="text message") + +for result in send_results: + print(result.id, result.points, result.error) +``` + +- **You can find more examples in "examples" directory in project files.** + +## Error handling + +```python +from smsapi.client import SmsApiPlClient +from smsapi.exception import SmsApiException + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) + +try: + contact = client.sms.send(to="123123") +except SmsApiException as e: + print(e.message, e.code) +``` + +## LICENSE + +[Apache 2.0 License](https://github.com/smsapi/smsapi-python-client/blob/master/LICENSE) + + + + +%package -n python3-smsapi-client +Summary: SmsAPI client +Provides: python-smsapi-client +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-smsapi-client +# smsapi-python + +[![Build Status](https://travis-ci.org/smsapi/smsapi-python-client.svg?branch=master)](https://travis-ci.org/smsapi/smsapi-python-client) +[![PyPI](https://img.shields.io/pypi/v/smsapi-client.svg)](https://pypi.python.org/pypi/smsapi-client) + +Client for SMSAPI. + +## COMPATIBILITY + +Compatible with Python 2.7+, 3.+. + +## REQUIREMENTS + +requests + +## INSTALLATION + +If You have pip installed: + + sudo pip install smsapi-client + +else You can install manually: + + git clone https://github.com/smsapi/smsapi-python-client.git + + cd smsapi-python + + python setup.py install + +## Client instance + +If You are smsapi.pl customer You should import + +```python +from smsapi.client import SmsApiPlClient +``` + +else You need to use client for smsapi.com + +```python +from smsapi.client import SmsApiComClient +``` + +## Credentials + +#### Access Token + +```python +from smsapi.client import SmsApiPlClient + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) +``` + +## Examples + +#### Send SMS + +```python +from smsapi.client import SmsApiPlClient + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) + +send_results = client.sms.send(to="phone number", message="text message") + +for result in send_results: + print(result.id, result.points, result.error) +``` + +- **You can find more examples in "examples" directory in project files.** + +## Error handling + +```python +from smsapi.client import SmsApiPlClient +from smsapi.exception import SmsApiException + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) + +try: + contact = client.sms.send(to="123123") +except SmsApiException as e: + print(e.message, e.code) +``` + +## LICENSE + +[Apache 2.0 License](https://github.com/smsapi/smsapi-python-client/blob/master/LICENSE) + + + + +%package help +Summary: Development documents and examples for smsapi-client +Provides: python3-smsapi-client-doc +%description help +# smsapi-python + +[![Build Status](https://travis-ci.org/smsapi/smsapi-python-client.svg?branch=master)](https://travis-ci.org/smsapi/smsapi-python-client) +[![PyPI](https://img.shields.io/pypi/v/smsapi-client.svg)](https://pypi.python.org/pypi/smsapi-client) + +Client for SMSAPI. + +## COMPATIBILITY + +Compatible with Python 2.7+, 3.+. + +## REQUIREMENTS + +requests + +## INSTALLATION + +If You have pip installed: + + sudo pip install smsapi-client + +else You can install manually: + + git clone https://github.com/smsapi/smsapi-python-client.git + + cd smsapi-python + + python setup.py install + +## Client instance + +If You are smsapi.pl customer You should import + +```python +from smsapi.client import SmsApiPlClient +``` + +else You need to use client for smsapi.com + +```python +from smsapi.client import SmsApiComClient +``` + +## Credentials + +#### Access Token + +```python +from smsapi.client import SmsApiPlClient + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) +``` + +## Examples + +#### Send SMS + +```python +from smsapi.client import SmsApiPlClient + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) + +send_results = client.sms.send(to="phone number", message="text message") + +for result in send_results: + print(result.id, result.points, result.error) +``` + +- **You can find more examples in "examples" directory in project files.** + +## Error handling + +```python +from smsapi.client import SmsApiPlClient +from smsapi.exception import SmsApiException + +token = "XXXX" + +client = SmsApiPlClient(access_token=token) + +try: + contact = client.sms.send(to="123123") +except SmsApiException as e: + print(e.message, e.code) +``` + +## LICENSE + +[Apache 2.0 License](https://github.com/smsapi/smsapi-python-client/blob/master/LICENSE) + + + + +%prep +%autosetup -n smsapi-client-2.7.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-smsapi-client -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot - 2.7.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..3648bcb --- /dev/null +++ b/sources @@ -0,0 +1 @@ +fe759c8b895d0acc25aa5d2127fdb0c1 smsapi-client-2.7.0.tar.gz -- cgit v1.2.3