%global _empty_manifest_terminate_build 0
Name:		python-pyombi
Version:	0.1.10
Release:	1
Summary:	A python module to retrieve information from Ombi.
License:	MIT License
URL:		https://github.com/larssont/pyombi
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/e2/40/fbcd474661ac110c3b50f94151f54c8a41afe89b0e53edff037d6a6174eb/pyombi-0.1.10.tar.gz
BuildArch:	noarch

Requires:	python3-requests

%description
[![PyPI version](https://badge.fury.io/py/pyombi.svg)](https://badge.fury.io/py/pyombi)
[![Downloads](https://pepy.tech/badge/pyombi)](https://pepy.tech/project/pyombi)

# pyombi

This is a project for retrieving information from an Ombi instance using their API.


# Installation

Run the following to install:
```python
pip install pyombi
```


# Usage


#### Creating an object of your Ombi instance

**Note:** You have to supply either a `password` or an `api_key` to successfully authenticate. The `api_key` will take precedence if both are supplied.

```python
import pyombi

ombi = pyombi.Ombi(
    ssl=True,
    host="192.168.1.120",
    port="5000",
    urlbase="ombi/",
    username="MyUsername",
    password="MyPassword",
    api_key="pixf64thuh2m7kbwwgkqp52yznbj4oyo"
)
```

#### Authenticate

```python
ombi.authenticate()
```

#### Testing connection to Ombi

```python
try:
    ombi.test_connection()
except pyombi.OmbiError as e:
    print(e)
    return
```

#### Retrieving data
```python
movies = ombi.movie_requests
tv = ombi.tv_requests
music = ombi.music_requests

total = ombi.total_requests
```

#### Searching

```python
movie_search = ombi.search_movie("Movie Name")  
tv_search = ombi.search_tv("TV show name")
music_search = ombi.search_music_album("Album name")
```

#### Requesting
```python
ombi.request_movie("theMovieDbId")
ombi.request_tv("theTvDbId", request_latest=True)
ombi.request_music("foreignAlbumId")
```

# License

This project is licensed under the MIT License - see the LICENSE.txt file for details.




%package -n python3-pyombi
Summary:	A python module to retrieve information from Ombi.
Provides:	python-pyombi
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-pyombi
[![PyPI version](https://badge.fury.io/py/pyombi.svg)](https://badge.fury.io/py/pyombi)
[![Downloads](https://pepy.tech/badge/pyombi)](https://pepy.tech/project/pyombi)

# pyombi

This is a project for retrieving information from an Ombi instance using their API.


# Installation

Run the following to install:
```python
pip install pyombi
```


# Usage


#### Creating an object of your Ombi instance

**Note:** You have to supply either a `password` or an `api_key` to successfully authenticate. The `api_key` will take precedence if both are supplied.

```python
import pyombi

ombi = pyombi.Ombi(
    ssl=True,
    host="192.168.1.120",
    port="5000",
    urlbase="ombi/",
    username="MyUsername",
    password="MyPassword",
    api_key="pixf64thuh2m7kbwwgkqp52yznbj4oyo"
)
```

#### Authenticate

```python
ombi.authenticate()
```

#### Testing connection to Ombi

```python
try:
    ombi.test_connection()
except pyombi.OmbiError as e:
    print(e)
    return
```

#### Retrieving data
```python
movies = ombi.movie_requests
tv = ombi.tv_requests
music = ombi.music_requests

total = ombi.total_requests
```

#### Searching

```python
movie_search = ombi.search_movie("Movie Name")  
tv_search = ombi.search_tv("TV show name")
music_search = ombi.search_music_album("Album name")
```

#### Requesting
```python
ombi.request_movie("theMovieDbId")
ombi.request_tv("theTvDbId", request_latest=True)
ombi.request_music("foreignAlbumId")
```

# License

This project is licensed under the MIT License - see the LICENSE.txt file for details.




%package help
Summary:	Development documents and examples for pyombi
Provides:	python3-pyombi-doc
%description help
[![PyPI version](https://badge.fury.io/py/pyombi.svg)](https://badge.fury.io/py/pyombi)
[![Downloads](https://pepy.tech/badge/pyombi)](https://pepy.tech/project/pyombi)

# pyombi

This is a project for retrieving information from an Ombi instance using their API.


# Installation

Run the following to install:
```python
pip install pyombi
```


# Usage


#### Creating an object of your Ombi instance

**Note:** You have to supply either a `password` or an `api_key` to successfully authenticate. The `api_key` will take precedence if both are supplied.

```python
import pyombi

ombi = pyombi.Ombi(
    ssl=True,
    host="192.168.1.120",
    port="5000",
    urlbase="ombi/",
    username="MyUsername",
    password="MyPassword",
    api_key="pixf64thuh2m7kbwwgkqp52yznbj4oyo"
)
```

#### Authenticate

```python
ombi.authenticate()
```

#### Testing connection to Ombi

```python
try:
    ombi.test_connection()
except pyombi.OmbiError as e:
    print(e)
    return
```

#### Retrieving data
```python
movies = ombi.movie_requests
tv = ombi.tv_requests
music = ombi.music_requests

total = ombi.total_requests
```

#### Searching

```python
movie_search = ombi.search_movie("Movie Name")  
tv_search = ombi.search_tv("TV show name")
music_search = ombi.search_music_album("Album name")
```

#### Requesting
```python
ombi.request_movie("theMovieDbId")
ombi.request_tv("theTvDbId", request_latest=True)
ombi.request_music("foreignAlbumId")
```

# License

This project is licensed under the MIT License - see the LICENSE.txt file for details.




%prep
%autosetup -n pyombi-0.1.10

%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-pyombi -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.10-1
- Package Spec generated