Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from josuebrunel/master
Browse files Browse the repository at this point in the history
7/2 Changes
  • Loading branch information
peacing committed Jul 3, 2015
2 parents d49d87f + 5a532f8 commit 98cfe7a
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 8 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Josue Kouka - [email protected]
Paul Singman -
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
# Yahoo Fantasy Sport API

[![Build Status](https://travis-ci.org/josuebrunel/yahoo-fantasy-sport.svg?branch=master)](https://travis-ci.org/josuebrunel/yahoo-fantasy-sport)
[![Documentation Status](https://readthedocs.org/projects/yahoo-fantasy-sport/badge/?version=latest)](https://readthedocs.org/projects/yahoo-fantasy-sport/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/josuebrunel/yahoo-fantasy-sport/badge.svg?branch=master)](https://coveralls.io/r/josuebrunel/yahoo-fantasy-sport?branch=master)
[![Code Health](https://landscape.io/github/josuebrunel/yahoo-fantasy-sport/master/landscape.svg?style=flat)](https://landscape.io/github/josuebrunel/yahoo-fantasy-sport/master)

## Authors

* [Josue Kouka](https://github.com/josuebrunel)
* [Paul Singman](https://github.com/unpairestgood)

## Installation

```shell
$ pip install yahoo-fantasy-sport
```

## Quickstart

```python
>>> from yahoo_oauth import OAuth1
>>> oauth = OAuth1(None, None, from_file='oauth.json')
>>> from fantasy_sport import FantasySport
>>> yfs = FantasySport(oauth, fmt='json')
```

### Games Resources

### Leagues Resources

### Players Resources

## How to contribute

- Open an issue
- Fork the repository
- Make your changes
- Test your changes
- Add yourself into the AUTHORS.txt file
- Submit a pull request
37 changes: 37 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Yahoo Fantasy Sport API
=======================

`|Build
Status| <https://travis-ci.org/josuebrunel/yahoo-fantasy-sport>`_
`|Coverage
Status| <https://coveralls.io/r/josuebrunel/yahoo-fantasy-sport?branch=master>`_
`|Code
Health| <https://landscape.io/github/josuebrunel/yahoo-fantasy-sport/master>`_

Authors
-------

- `Josue Kouka <https://github.com/josuebrunel>`_
- `Paul Singman <https://github.com/unpairestgood>`_

Quickstart
----------

::

How to contribute
-----------------

- Open an issue
- Fork the repository
- Make your changes
- Test your changes
- Add yourself to the AUTHORS.txt file
- Submit a pull request

.. |Build
Status| image:: https://travis-ci.org/josuebrunel/yahoo-fantasy-sport.svg?branch=master
.. |Coverage
Status| image:: https://coveralls.io/repos/josuebrunel/yahoo-fantasy-sport/badge.svg?branch=master
.. |Code
Health| image:: https://landscape.io/github/josuebrunel/yahoo-fantasy-sport/master/landscape.svg?style=flat
17 changes: 11 additions & 6 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
Jinja2==2.7.3
Markdown==2.6.2
MarkupSafe==0.23
PyYAML==3.11
coverage==3.7.1
coveralls==0.5
docopt==0.6.2
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
certifi==2015.04.28
click==4.0
distribute==0.6.24
livereload==2.4.0
mkdocs==0.14.0
myql==1.2.3
oauthlib==0.7.2
py==1.4.28
pytest==2.7.1
rauth==0.7.1
requests==2.7.0
requests-oauthlib==0.5.0
six==1.9.0
wsgiref==0.1.2
tornado==4.2
yahoo-oauth==0.1.4
34 changes: 34 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Yahoo Fantasy Sport API

[![Build Status](https://travis-ci.org/josuebrunel/yahoo-fantasy-sport.svg?branch=master)](https://travis-ci.org/josuebrunel/yahoo-fantasy-sport)
[![Coverage Status](https://coveralls.io/repos/josuebrunel/yahoo-fantasy-sport/badge.svg?branch=master)](https://coveralls.io/r/josuebrunel/yahoo-fantasy-sport?branch=master)
[![Code Health](https://landscape.io/github/josuebrunel/yahoo-fantasy-sport/master/landscape.svg?style=flat)](https://landscape.io/github/josuebrunel/yahoo-fantasy-sport/master)

## Authors

* [Josue Kouka](https://github.com/josuebrunel)
* [Paul Singman](https://github.com/unpairestgood)

## Quickstart

```python
>>> from yahoo_oauth import OAuth1
>>> oauth = OAuth1(None, None, from_file='oauth.json')
>>> from fantasy_sport import FantasySport
>>> yfs = FantasySport(oauth, fmt='json')
```

### Games Resources

### Leagues Resources

### Players Resources

## How to contribute

- Open an issue
- Fork the repository
- Make your changes
- Test your changes
- Add yourself into the AUTHORS.txt file
- Submit a pull request
1 change: 1 addition & 0 deletions docs/league.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## League
1 change: 1 addition & 0 deletions docs/player.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Player
1 change: 1 addition & 0 deletions docs/team.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Team
11 changes: 11 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
site_name: Yahoo Fantasy Sport
repo_url: https://github.com/josuebrunel/yahoo-fantasy-sport
site_url: http://yahoo-fantasy-sport.readthedocs.org/en/latest/
site_description: Yahoo Fantasy Sport Python Wrapper
site_author: Josue Kouka
pages:
- Home : index.md
- Team : team.md
- League : league.md
- Player : player.md
theme: readthedocs
46 changes: 46 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import os
from setuptools import setup, find_packages

__author__ = 'Josue Kouka'
__email__ = '[email protected]'
__version__ = "0.1.1"

#requirements.txt
with open('requirements.txt') as f:
required = f.read().splitlines()

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
name = "yahoo-fantasy-sports",
version = __version__,
description = "Python Yahoo Fantasy Sports Wrapper",
long_description = read("README.rst"),
author = __author__,
author_email = __email__,
url = "https://github.com/josuebrunel/yahoo-fantasy-sport",
download_url = "https://github.com/josuebrunel/myql/archive/{0}.tar.gz".format(__version__),
keywords = ['fantasy sports', 'yahoo'],
packages = find_packages(),
tests_suite="tests",
classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Development Status :: 5 - Production/Stable',
'Topic :: Software Development :: Libraries :: Python Modules',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License'
],
platforms=['Any'],
license='MIT',
install_requires = required
)
9 changes: 7 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,14 @@ def test_get_teams_standings(self,):
self.assertEqual(response.status_code, 200)

def test_get_teams_roster(self,):
response = self.yfs.get_teams_roster(['346.l.1328.t.12'], players='draft_analysis', filters='position=3B')
response = self.yfs.get_teams_roster(['346.l.1328.t.12'])
logging.debug(pretty_json(response.content))
self.assertEqual(response.status_code, 200)

#def test_get_teams_roster_with_filter(self,):
# response = self.yfs.get_teams_roster(['346.l.1328.t.12'], players='draft_analysis', filters='position=3B')
# logging.debug(pretty_json(response.content))
# self.assertEqual(response.status_code, 200)

def test_get_teams_draftresults(self,):
response = self.yfs.get_teams_draftresults(['346.l.1328.t.12'])
Expand All @@ -170,4 +175,4 @@ def test_get_transactions(self,):
response = self.yfs.get_transactions(['346.l.1328.tr.100'], players='draft_analysis')
logging.debug(pretty_json(response.content))
self.assertEqual(response.status_code, 200)


0 comments on commit 98cfe7a

Please sign in to comment.