Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
docstrings added to ItemDescription
example historical streaming fixed
  • Loading branch information
liampauling committed May 28, 2018
1 parent add21c8 commit cbca1c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion betfairlightweight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from . import filters

__title__ = 'betfairlightweight'
__version__ = '1.6.1'
__version__ = '1.6.2'
__author__ = 'Liam Pauling'

# Set default logging handler to avoid "No handler found" warnings.
Expand Down
11 changes: 11 additions & 0 deletions betfairlightweight/resources/bettingresources.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,16 @@ def __init__(self, **kwargs):


class ItemDescription(object):
"""
:type event_desc: unicode
:type event_type_desc: unicode
:type market_desc: unicode
:type market_start_time: datetime
:type market_type: unicode
:type number_of_winners: int
:type runner_desc: unicode
:type each_way_divisor: unicode
"""

def __init__(self, eventDesc=None, eventTypeDesc=None, marketDesc=None, marketStartTime=None, marketType=None,
numberOfWinners=None, runnerDesc=None, eachWayDivisor=None):
Expand Down Expand Up @@ -603,6 +613,7 @@ class ClearedOrder(object):
:type side: unicode
:type size_settled: float
:type size_cancelled float
:type item_description ItemDescription
"""

def __init__(self, **kwargs):
Expand Down
3 changes: 2 additions & 1 deletion examples/examplestreaminghistorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def on_process(self, market_books):

# how to get runner details from the market definition
market_def = market_book.market_definition
runner_def = market_def.runners_dict.get(
runners_dict = {(runner.selection_id, runner.handicap): runner for runner in market_def.runners}
runner_def = runners_dict.get(
(runner.selection_id, runner.handicap)
)

Expand Down

0 comments on commit cbca1c0

Please sign in to comment.