%global _empty_manifest_terminate_build 0 Name: python-fortnite-python Version: 0.3.5 Release: 1 Summary: Python wrapper for http://fortnitetracker.com/ api. License: MIT URL: https://github.com/xcodinas/fortnite-python Source0: https://mirrors.nju.edu.cn/pypi/web/packages/39/16/71511a3d475f76edc165c38805ce3c17e710f4f963762602a2dc8ce97e4f/fortnite-python-0.3.5.tar.gz BuildArch: noarch %description [![Build Status](https://travis-ci.org/xcodinas/fortnite-python.svg?branch=master)](https://travis-ci.org/xcodinas/fortnite-python) [![PyPI version](https://badge.fury.io/py/fortnite-python.svg)](https://badge.fury.io/py/fortnite-python) [![Requirements Status](https://requires.io/github/xcodinas/fortnite-python/requirements.svg?branch=master)](https://requires.io/github/xcodinas/fortnite-python/requirements/?branch=master) # fortnite-python Python wrapper for http://fortnitetracker.com/ api. ## Installation You can install it via pip ``` pip install fortnite-python ``` ## Usage You need to register for an api key at https://fortnitetracker.com/site-api Then it's just easy as: ``` from fortnite_python import Fortnite fortnite = Fortnite('Given api key') ``` #### Retrieving a player: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername') player ``` The default platform is PC, if you want to use a diferent platform you should do it this way: ``` >>> from fortnite_python import Fortnite >>> from fortnite_python.domain import Platform >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername', Platform.XBOX) >>> player ``` You can check the available platforms [here](https://github.com/xcodinas/fortnite-python/blob/master/fortnite_python/domain.py#L4) #### Retrieving player stats: ``` >>> from fortnite_python import Fortnite >>> from fortnite_python.domain import Mode >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername') >>> stats = player.get_stats(Mode.DUO) >>> stats.top1 '10' >>> stats.top3 '20' ``` You can check the available modes [here](https://github.com/xcodinas/fortnite-python/blob/master/fortnite_python/domain.py#L10) #### Getting matches data: When calling matches you have to pass the player id and the number of matches you want (from 1 to 50) ``` >>> player = fortnite.player('playername') >>> fortnite.matches(player.id, 5) [, , , , ] ``` #### Retrieving the current Challenges: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> challenges = fortnite.challenges() >>> print (challenges) [, , , , , , ] >>> challenges[0].name Visit all of the Corrupted Areas >>> challenges[0].reward_picture_url https://cdn.thetrackernetwork.com/cdn/trackernetwork/63D2upload.png ``` #### Retrieving the current Fortnite store: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> store = fortnite.store() >>> fortnite.store() [, , , , , , , ] ``` %package -n python3-fortnite-python Summary: Python wrapper for http://fortnitetracker.com/ api. Provides: python-fortnite-python BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-fortnite-python [![Build Status](https://travis-ci.org/xcodinas/fortnite-python.svg?branch=master)](https://travis-ci.org/xcodinas/fortnite-python) [![PyPI version](https://badge.fury.io/py/fortnite-python.svg)](https://badge.fury.io/py/fortnite-python) [![Requirements Status](https://requires.io/github/xcodinas/fortnite-python/requirements.svg?branch=master)](https://requires.io/github/xcodinas/fortnite-python/requirements/?branch=master) # fortnite-python Python wrapper for http://fortnitetracker.com/ api. ## Installation You can install it via pip ``` pip install fortnite-python ``` ## Usage You need to register for an api key at https://fortnitetracker.com/site-api Then it's just easy as: ``` from fortnite_python import Fortnite fortnite = Fortnite('Given api key') ``` #### Retrieving a player: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername') player ``` The default platform is PC, if you want to use a diferent platform you should do it this way: ``` >>> from fortnite_python import Fortnite >>> from fortnite_python.domain import Platform >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername', Platform.XBOX) >>> player ``` You can check the available platforms [here](https://github.com/xcodinas/fortnite-python/blob/master/fortnite_python/domain.py#L4) #### Retrieving player stats: ``` >>> from fortnite_python import Fortnite >>> from fortnite_python.domain import Mode >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername') >>> stats = player.get_stats(Mode.DUO) >>> stats.top1 '10' >>> stats.top3 '20' ``` You can check the available modes [here](https://github.com/xcodinas/fortnite-python/blob/master/fortnite_python/domain.py#L10) #### Getting matches data: When calling matches you have to pass the player id and the number of matches you want (from 1 to 50) ``` >>> player = fortnite.player('playername') >>> fortnite.matches(player.id, 5) [, , , , ] ``` #### Retrieving the current Challenges: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> challenges = fortnite.challenges() >>> print (challenges) [, , , , , , ] >>> challenges[0].name Visit all of the Corrupted Areas >>> challenges[0].reward_picture_url https://cdn.thetrackernetwork.com/cdn/trackernetwork/63D2upload.png ``` #### Retrieving the current Fortnite store: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> store = fortnite.store() >>> fortnite.store() [, , , , , , , ] ``` %package help Summary: Development documents and examples for fortnite-python Provides: python3-fortnite-python-doc %description help [![Build Status](https://travis-ci.org/xcodinas/fortnite-python.svg?branch=master)](https://travis-ci.org/xcodinas/fortnite-python) [![PyPI version](https://badge.fury.io/py/fortnite-python.svg)](https://badge.fury.io/py/fortnite-python) [![Requirements Status](https://requires.io/github/xcodinas/fortnite-python/requirements.svg?branch=master)](https://requires.io/github/xcodinas/fortnite-python/requirements/?branch=master) # fortnite-python Python wrapper for http://fortnitetracker.com/ api. ## Installation You can install it via pip ``` pip install fortnite-python ``` ## Usage You need to register for an api key at https://fortnitetracker.com/site-api Then it's just easy as: ``` from fortnite_python import Fortnite fortnite = Fortnite('Given api key') ``` #### Retrieving a player: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername') player ``` The default platform is PC, if you want to use a diferent platform you should do it this way: ``` >>> from fortnite_python import Fortnite >>> from fortnite_python.domain import Platform >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername', Platform.XBOX) >>> player ``` You can check the available platforms [here](https://github.com/xcodinas/fortnite-python/blob/master/fortnite_python/domain.py#L4) #### Retrieving player stats: ``` >>> from fortnite_python import Fortnite >>> from fortnite_python.domain import Mode >>> fortnite = Fortnite('Given api key') >>> player = fortnite.player('playername') >>> stats = player.get_stats(Mode.DUO) >>> stats.top1 '10' >>> stats.top3 '20' ``` You can check the available modes [here](https://github.com/xcodinas/fortnite-python/blob/master/fortnite_python/domain.py#L10) #### Getting matches data: When calling matches you have to pass the player id and the number of matches you want (from 1 to 50) ``` >>> player = fortnite.player('playername') >>> fortnite.matches(player.id, 5) [, , , , ] ``` #### Retrieving the current Challenges: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> challenges = fortnite.challenges() >>> print (challenges) [, , , , , , ] >>> challenges[0].name Visit all of the Corrupted Areas >>> challenges[0].reward_picture_url https://cdn.thetrackernetwork.com/cdn/trackernetwork/63D2upload.png ``` #### Retrieving the current Fortnite store: ``` >>> from fortnite_python import Fortnite >>> fortnite = Fortnite('Given api key') >>> store = fortnite.store() >>> fortnite.store() [, , , , , , , ] ``` %prep %autosetup -n fortnite-python-0.3.5 %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-fortnite-python -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 0.3.5-1 - Package Spec generated