summaryrefslogtreecommitdiff
path: root/python-fortnite-python.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 09:37:49 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 09:37:49 +0000
commit7c73911739a84f538450d15d412a3bc657c4f013 (patch)
tree75439d0aba8746abdd618915b9707fdb72b44a6b /python-fortnite-python.spec
parent16820bc0082eddfb2f812a61064458746b500992 (diff)
automatic import of python-fortnite-python
Diffstat (limited to 'python-fortnite-python.spec')
-rw-r--r--python-fortnite-python.spec420
1 files changed, 420 insertions, 0 deletions
diff --git a/python-fortnite-python.spec b/python-fortnite-python.spec
new file mode 100644
index 0000000..b23f4d5
--- /dev/null
+++ b/python-fortnite-python.spec
@@ -0,0 +1,420 @@
+%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
+
+<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
+```
+
+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
+<Player 20a8fafaa-6chfj-6455-b715-2424fff xbox>
+```
+
+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')
+<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
+
+>>> fortnite.matches(player.id, 5)
+[<Match 806686859>, <Match 806611889>, <Match 806602331>, <Match 806532871>,
+ <Match 806522998>]
+```
+
+
+#### Retrieving the current Challenges:
+
+```
+>>> from fortnite_python import Fortnite
+
+>>> fortnite = Fortnite('Given api key')
+>>> challenges = fortnite.challenges()
+>>> print (challenges)
+[<Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>]
+>>> 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()
+[<StoreItem 1974>, <StoreItem 6010>, <StoreItem 1246>, <StoreItem 6012>,
+<StoreItem 918>, <StoreItem 4835>, <StoreItem 6050>, <StoreItem 5981>]
+```
+
+%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
+
+<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
+```
+
+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
+<Player 20a8fafaa-6chfj-6455-b715-2424fff xbox>
+```
+
+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')
+<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
+
+>>> fortnite.matches(player.id, 5)
+[<Match 806686859>, <Match 806611889>, <Match 806602331>, <Match 806532871>,
+ <Match 806522998>]
+```
+
+
+#### Retrieving the current Challenges:
+
+```
+>>> from fortnite_python import Fortnite
+
+>>> fortnite = Fortnite('Given api key')
+>>> challenges = fortnite.challenges()
+>>> print (challenges)
+[<Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>]
+>>> 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()
+[<StoreItem 1974>, <StoreItem 6010>, <StoreItem 1246>, <StoreItem 6012>,
+<StoreItem 918>, <StoreItem 4835>, <StoreItem 6050>, <StoreItem 5981>]
+```
+
+%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
+
+<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
+```
+
+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
+<Player 20a8fafaa-6chfj-6455-b715-2424fff xbox>
+```
+
+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')
+<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
+
+>>> fortnite.matches(player.id, 5)
+[<Match 806686859>, <Match 806611889>, <Match 806602331>, <Match 806532871>,
+ <Match 806522998>]
+```
+
+
+#### Retrieving the current Challenges:
+
+```
+>>> from fortnite_python import Fortnite
+
+>>> fortnite = Fortnite('Given api key')
+>>> challenges = fortnite.challenges()
+>>> print (challenges)
+[<Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>]
+>>> 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()
+[<StoreItem 1974>, <StoreItem 6010>, <StoreItem 1246>, <StoreItem 6012>,
+<StoreItem 918>, <StoreItem 4835>, <StoreItem 6050>, <StoreItem 5981>]
+```
+
+%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
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.5-1
+- Package Spec generated