summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-31 05:37:48 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-31 05:37:48 +0000
commit169ef1909a8cc1ed07f7fb76f668191f30a0c584 (patch)
tree746c92ab707a0e558720c53d4943f8331cc833ac
parente99d854309e5faf26bef877fd9aa7656c078f2d0 (diff)
automatic import of python-apex-legends-api
-rw-r--r--.gitignore1
-rw-r--r--python-apex-legends-api.spec270
-rw-r--r--sources1
3 files changed, 272 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6e303e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/apex-legends-api-2.0.3.tar.gz
diff --git a/python-apex-legends-api.spec b/python-apex-legends-api.spec
new file mode 100644
index 0000000..411dcfd
--- /dev/null
+++ b/python-apex-legends-api.spec
@@ -0,0 +1,270 @@
+%global _empty_manifest_terminate_build 0
+Name: python-apex-legends-api
+Version: 2.0.3
+Release: 1
+Summary: Python wrapper for https://apexlegendsapi.com
+License: MIT
+URL: https://github.com/johnsturgeon/apex-legends-api
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1d/6f/1b8d92f9fc2dd9f56cb9666630e1edaa50f65d99cc9dbecd8f3933a0e1de/apex-legends-api-2.0.3.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-arrow
+Requires: python3-Python-Deprecated
+
+%description
+# apex-legends-api
+Python wrapper for https://apexlegendsapi.com
+
+[![Downloads](https://pepy.tech/badge/apex-legends-api/week)](https://pepy.tech/project/apex-legends-api)
+
+# Installation
+You can install it from source, or pip (recommended)
+
+# Requirements
+`python >= 3.9`
+
+### Source installation
+`python ./setup.py install`
+
+### Pip installation
+`pip install apex-legends-api`
+
+# Usage
+* Register for an API Key at [Apex Legends API](https://apexlegendsapi.com)
+* Here's a quick snippet to get started
+* All method calls return a dictionary representing the JSON in the response.
+
+```python
+import sys
+from apex_legends_api import ApexLegendsAPI,\
+ ALPlatform,\
+ ALPlayer,\
+ ALAction,\
+ ALHTTPExceptionFromResponse
+from apex_legends_api.al_base import print_description
+
+api = ApexLegendsAPI(api_key='<api_key>')
+
+player_name = str("PlayerName")
+player_uid = str("1234567890")
+platform = ALPlatform.PC
+action = ALAction.GET
+
+# Example 1:
+# straight API calls
+try:
+ basic = api.basic_player_stats(player_name=player_name, platform=platform)
+ # or query by UID
+ # basic = api.basic_player_stats_by_uid(uid=player_uid, platform=platform)
+ history = api.events(player_name=player_name, platform=platform, action=action)
+ origin_player = api.get_player_origin(player_name=player_name, show_all_hits=True)
+except ALHTTPExceptionFromResponse as exception:
+ print(exception)
+ sys.exit()
+
+print(basic)
+print(history)
+print(origin_player)
+
+# Example 2:
+# retrieve an 'ALPlayer' object
+player: ALPlayer = api.get_player(name=player_name, platform=platform)
+print_description(player)
+
+```
+## Notes
+- See detailed documentation at [ReadTheDocs](https://apex-legends-api.readthedocs.io/en/latest/index.html)
+- See https://apexlegendsapi.com for complete documentation.
+- See [CHANGELOG.md](https://github.com/johnsturgeon/apex-legends-api/blob/main/CHANGELOG.md) for history of changes
+
+
+
+%package -n python3-apex-legends-api
+Summary: Python wrapper for https://apexlegendsapi.com
+Provides: python-apex-legends-api
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-apex-legends-api
+# apex-legends-api
+Python wrapper for https://apexlegendsapi.com
+
+[![Downloads](https://pepy.tech/badge/apex-legends-api/week)](https://pepy.tech/project/apex-legends-api)
+
+# Installation
+You can install it from source, or pip (recommended)
+
+# Requirements
+`python >= 3.9`
+
+### Source installation
+`python ./setup.py install`
+
+### Pip installation
+`pip install apex-legends-api`
+
+# Usage
+* Register for an API Key at [Apex Legends API](https://apexlegendsapi.com)
+* Here's a quick snippet to get started
+* All method calls return a dictionary representing the JSON in the response.
+
+```python
+import sys
+from apex_legends_api import ApexLegendsAPI,\
+ ALPlatform,\
+ ALPlayer,\
+ ALAction,\
+ ALHTTPExceptionFromResponse
+from apex_legends_api.al_base import print_description
+
+api = ApexLegendsAPI(api_key='<api_key>')
+
+player_name = str("PlayerName")
+player_uid = str("1234567890")
+platform = ALPlatform.PC
+action = ALAction.GET
+
+# Example 1:
+# straight API calls
+try:
+ basic = api.basic_player_stats(player_name=player_name, platform=platform)
+ # or query by UID
+ # basic = api.basic_player_stats_by_uid(uid=player_uid, platform=platform)
+ history = api.events(player_name=player_name, platform=platform, action=action)
+ origin_player = api.get_player_origin(player_name=player_name, show_all_hits=True)
+except ALHTTPExceptionFromResponse as exception:
+ print(exception)
+ sys.exit()
+
+print(basic)
+print(history)
+print(origin_player)
+
+# Example 2:
+# retrieve an 'ALPlayer' object
+player: ALPlayer = api.get_player(name=player_name, platform=platform)
+print_description(player)
+
+```
+## Notes
+- See detailed documentation at [ReadTheDocs](https://apex-legends-api.readthedocs.io/en/latest/index.html)
+- See https://apexlegendsapi.com for complete documentation.
+- See [CHANGELOG.md](https://github.com/johnsturgeon/apex-legends-api/blob/main/CHANGELOG.md) for history of changes
+
+
+
+%package help
+Summary: Development documents and examples for apex-legends-api
+Provides: python3-apex-legends-api-doc
+%description help
+# apex-legends-api
+Python wrapper for https://apexlegendsapi.com
+
+[![Downloads](https://pepy.tech/badge/apex-legends-api/week)](https://pepy.tech/project/apex-legends-api)
+
+# Installation
+You can install it from source, or pip (recommended)
+
+# Requirements
+`python >= 3.9`
+
+### Source installation
+`python ./setup.py install`
+
+### Pip installation
+`pip install apex-legends-api`
+
+# Usage
+* Register for an API Key at [Apex Legends API](https://apexlegendsapi.com)
+* Here's a quick snippet to get started
+* All method calls return a dictionary representing the JSON in the response.
+
+```python
+import sys
+from apex_legends_api import ApexLegendsAPI,\
+ ALPlatform,\
+ ALPlayer,\
+ ALAction,\
+ ALHTTPExceptionFromResponse
+from apex_legends_api.al_base import print_description
+
+api = ApexLegendsAPI(api_key='<api_key>')
+
+player_name = str("PlayerName")
+player_uid = str("1234567890")
+platform = ALPlatform.PC
+action = ALAction.GET
+
+# Example 1:
+# straight API calls
+try:
+ basic = api.basic_player_stats(player_name=player_name, platform=platform)
+ # or query by UID
+ # basic = api.basic_player_stats_by_uid(uid=player_uid, platform=platform)
+ history = api.events(player_name=player_name, platform=platform, action=action)
+ origin_player = api.get_player_origin(player_name=player_name, show_all_hits=True)
+except ALHTTPExceptionFromResponse as exception:
+ print(exception)
+ sys.exit()
+
+print(basic)
+print(history)
+print(origin_player)
+
+# Example 2:
+# retrieve an 'ALPlayer' object
+player: ALPlayer = api.get_player(name=player_name, platform=platform)
+print_description(player)
+
+```
+## Notes
+- See detailed documentation at [ReadTheDocs](https://apex-legends-api.readthedocs.io/en/latest/index.html)
+- See https://apexlegendsapi.com for complete documentation.
+- See [CHANGELOG.md](https://github.com/johnsturgeon/apex-legends-api/blob/main/CHANGELOG.md) for history of changes
+
+
+
+%prep
+%autosetup -n apex-legends-api-2.0.3
+
+%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-apex-legends-api -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.3-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..3c02dd8
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+205fd4302b56c42eaacaf45ade09bf7d apex-legends-api-2.0.3.tar.gz