diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-12 01:00:33 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 01:00:33 +0000 |
| commit | 93a8d396f2f1444594ba8e46eb9f842499597943 (patch) | |
| tree | a995efa7ac6c30892f092285df483f8a5dc1b613 /python-smsapi-client.spec | |
| parent | 9df68941e6027caea6a0e8bf401e1e89f1a9f402 (diff) | |
automatic import of python-smsapi-client
Diffstat (limited to 'python-smsapi-client.spec')
| -rw-r--r-- | python-smsapi-client.spec | 358 |
1 files changed, 358 insertions, 0 deletions
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 + +[](https://travis-ci.org/smsapi/smsapi-python-client) +[](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 + +[](https://travis-ci.org/smsapi/smsapi-python-client) +[](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 + +[](https://travis-ci.org/smsapi/smsapi-python-client) +[](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 <Python_Bot@openeuler.org> - 2.7.0-1 +- Package Spec generated |
