%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='') 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='') 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='') 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 - 2.0.3-1 - Package Spec generated