Skip to content

Commit

Permalink
Version 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiormb committed May 31, 2017
0 parents commit f28570e
Show file tree
Hide file tree
Showing 20 changed files with 1,103 additions and 0 deletions.
1 change: 1 addition & 0 deletions .coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!coverage.py: This is a private format, don't read it directly!{"lines":{"/home/sergiormb/python-filmaffinity/root-dir/python_filmaffinity/__init__.py":[2,3,5,6,9,11,13,19,20,21,23,24,25,26,28,29,30,32,33,34,35,37,38,39,40,42,43,44,45,46,49,51,52,53,54,55,58,60,61,62,63,64,65,66,68,69,70,71,72,73,75,76,77,78,79,80,81,83,84,85,86,87,90,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,114,116,117,118,119,121,122,123,124,125,126,127,128,129,131,140,141,142,143,144,146,147,149,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,185,195,196,197,198,199,200,201,202,203,204,206,207,208,209,210,211,212,213,214,215,217,218,220,230,231,232,233,234,235,236,237,238,239,240,242,243]}}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

*.pyc

\.cache/v/cache/

dist/

build/

build/lib.linux-x86_64-2.7/

htmlcov/

docs/_static/

docs/_build/

docs/_templates/

python_filmaffinity.egg-info/

.eggs/

test.py
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sudo: false
language: python
python:
- "2.7"
- "3.4"
- "3.5"
install:
- make travisci-install
script:
- make travisci-test
- coverage run --source python_filmaffinity setup.py test
after_success:
- coveralls
5 changes: 5 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Authors

### Lead

- Sergio Pino, [email protected], [sergiormb.github.io](https://sergiormb.github.io/)
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Changelog


### v0.0.1 (29-05-2017)

- Initial release.
23 changes: 23 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## License

The MIT License (MIT)

Copyright (c) 2014 Derrick Gilland

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include LICENSE.md README.md CHANGES.md
122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Python Filmaffinity
This is a simple python scraping for the Filmaffinity.

[![Build Status](https://travis-ci.org/sergiormb/python_filmaffinity.svg?branch=master)](https://travis-ci.org/sergiormb/python_filmaffinity)
[![Coverage Status](https://coveralls.io/repos/github/sergiormb/python_filmaffinity/badge.svg?branch=master)](https://coveralls.io/github/sergiormb/python_filmaffinity?branch=master)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/sergiormb/python_filmaffinity/blob/master/LICENSE.md)
[![PyPI](https://img.shields.io/pypi/pyversions/Django.svg)](https://pypi.python.org/pypi/python_filmaffinity/)
[![Documentation Status](https://readthedocs.org/projects/python-filmaffinity/badge/?version=latest)](http://python-filmaffinity.readthedocs.io/en/latest/?badge=latest)

## Installation
#### Pip
- `pip install python_filmaffinity`

#### From Source
- `git clone [email protected]:sergiormb/python_filmaffinity.git`
- `cd python_filmaffinity`
- `python setup.py install`

#### Requirements
- `requests >= 2.0.1`
- `bs4 >= 0.0.1`

## Example
```python
>>> import python_filmaffinity
>>> service = python_filmaffinity.Filmaffinity()
>>> movie = service.get_movie(title='Celda 211')
>>> movie['title']
Celda 211
>>> movie['rating']
7.7
>>> movie['directors']
['Daniel Monzón']
>>> movie['actors']
['Luis Tosar', 'Alberto Ammann', 'Antonio Resines', 'Carlos Bardem', 'Marta Etura', 'Vicente Romero', 'Manuel Morón', 'Manolo Solo', 'Fernando Soto', 'Luis Zahera', 'Patxi Bisquert', 'Félix Cubero', 'Josean Bengoetxea', 'Juan Carlos Mangas', 'Jesús Carroza']
```

## Usage
- ### search
| Parameter | Required | Type | Description |
|-----------|----------|--------|-----------------------------------|
| title | False | String | Search for the title of the movie |
| cast | False | String | Search movies by actor |
| director | False | String | Search movies by the director |
| from_year | False | String | Search start date |
| to_year | False | String | Search end date |
##### Example
```python
>>> movies = service.search(cast='Nicolas Cage')
```

- ### get_movie
| Parameter | Required | Type | Description |
|-----------|----------|--------|-----------------------------------|
| id | False | String | Filmaffinity id |
| title | False | String | Get movie by title |
##### Example
```python
>>> movies = service.get_movie(title='Avatar')
>>> movies = service.get_movie(id='495280')
```

- ### top_filmaffinity
| Parameter | Required | Type | Description |
|-----------|----------|--------|-----------------------------------|
| from_year | False | String | Search start date |
| to_year | False | String | Search end date |
##### Example
```python
>>> movies = service.top_filmaffinity()
>>> movies = service.top_filmaffinity(from_year=2010, to_year=2011)
```

- ### top_premieres
##### Example
```python
>>> movies = service.top_premieres()
```

## Changelog

### v0.0.2 (29-05-2017)

- Search movies by title, year, director or cast.
- Get the filmaffinity top and search by year
- Get the premieres top

### v0.0.1 (29-05-2017)

- Initial release.


## License

The MIT License (MIT)

Copyright (c) 2014 Derrick Gilland

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


## Authors

### Lead

- Sergio Pino, [email protected], [sergiormb.github.io](https://sergiormb.github.io/)
18 changes: 18 additions & 0 deletions __meta__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""Project metadata.
"""

__title__ = 'python_filmaffinity'
__summary__ = 'Python wrapper for Filmaffinity'
__url__ = 'https://github.com/sergiormb/python_filmaffinityy'

__version__ = '0.0.1'

__install_requires__ = [
'requests>=2.0.1',
'bs4>=0.0.1'
]

__author__ = 'sergiormb'
__email__ = '[email protected]'

__license__ = 'MIT License'
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = python_filmaffinity
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading

0 comments on commit f28570e

Please sign in to comment.