-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaliga.html
More file actions
193 lines (162 loc) · 10.5 KB
/
laliga.html
File metadata and controls
193 lines (162 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>LaLiga module — LEDScoreboard alpha documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Other files" href="other.html" />
<link rel="prev" title="MLB module" href="mlb.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="laliga-module">
<h1>LaLiga module<a class="headerlink" href="#laliga-module" title="Permalink to this headline">¶</a></h1>
<section id="module-laliga">
<span id="init-py"></span><h2>__init__.py<a class="headerlink" href="#module-laliga" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt id="laliga.draw_board">
<code class="sig-prename descclassname"><span class="pre">laliga.</span></code><code class="sig-name descname"><span class="pre">draw_board</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/laliga.html#draw_board"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#laliga.draw_board" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw components of LaLiga game.</p>
<p>Firstly, creates a canvas for the LED matrix using various configurations.
Requests games for the day for La Liga and draws various components of the game such as team logos, scores, period, and time.</p>
<p>Also, draws “SCORE!!!” animation for the game if there is an update in the score.</p>
<p>If button is pressed during the execution, it will load the next game. If the game is the last one for the day in La Liga, then it will
go to the next league.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Return -1 if no favorite game.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>int</p>
</dd>
</dl>
</dd></dl>
</section>
<section id="module-laliga.game">
<span id="game-py"></span><h2>game.py<a class="headerlink" href="#module-laliga.game" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt id="laliga.game.Game">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">laliga.game.</span></code><code class="sig-name descname"><span class="pre">Game</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">game_info</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">any</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">a_name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">h_name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/laliga/game.html#Game"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#laliga.game.Game" title="Permalink to this definition">¶</a></dt>
<dd><p>Represent a scheduled La Liga game.</p>
<p>Game object first parses the JSON dict information.
Also contains methods to check if the game is of a favorite team.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>game_info</strong> (<em>Dict</em><em>[</em><em>str</em><em>, </em><em>any</em><em>]</em>) – Dictionary generated from JSON object</p></li>
<li><p><strong>a_name</strong> (<em>str</em>) – Name of away team</p></li>
<li><p><strong>h_name</strong> (<em>str</em>) – Name of home team</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt id="laliga.game.Game.get_matchup">
<code class="sig-name descname"><span class="pre">get_matchup</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><a class="reference internal" href="_modules/laliga/game.html#Game.get_matchup"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#laliga.game.Game.get_matchup" title="Permalink to this definition">¶</a></dt>
<dd><p>Get information of a single game.</p>
<p>Simply game information into a dictionary to be used by the draw_board() function.
Returns a dictionary with names for home and away team, game period, game stage, game status, game clock,
score.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Game information in a dictionary.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>Dict[str, str]</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="laliga.game.Scores">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">laliga.game.</span></code><code class="sig-name descname"><span class="pre">Scores</span></code><a class="reference internal" href="_modules/laliga/game.html#Scores"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#laliga.game.Scores" title="Permalink to this definition">¶</a></dt>
<dd><p>Scores Class with static function to get scores for the leauge.</p>
<dl class="py method">
<dt id="laliga.game.Scores.get_scores">
<em class="property"><span class="pre">static</span> </em><code class="sig-name descname"><span class="pre">get_scores</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="reference internal" href="_modules/laliga/game.html#Scores.get_scores"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#laliga.game.Scores.get_scores" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a list of favorite scores/games that are on-going or planned for the day.</p>
<p>First, calls for the request of JSON from La Liga API and checks if games are favorites.
If so, then it creates Game objects from the data.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of python dicts that contain information of today’s games.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>List[Tuple[str, str]]</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>
<section id="module-laliga.teams">
<span id="teams-py"></span><h2>teams.py<a class="headerlink" href="#module-laliga.teams" title="Permalink to this headline">¶</a></h2>
<p>Abbreviation information about NHL teams</p>
</section>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">LEDScoreboard</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="config.html">config.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="utils.html">utils.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="nhl.html">NHL module</a></li>
<li class="toctree-l1"><a class="reference internal" href="nba.html">NBA module</a></li>
<li class="toctree-l1"><a class="reference internal" href="mlb.html">MLB module</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">LaLiga module</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#module-laliga">__init__.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-laliga.game">game.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-laliga.teams">teams.py</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="other.html">Other files</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="mlb.html" title="previous chapter">MLB module</a></li>
<li>Next: <a href="other.html" title="next chapter">Other files</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.5.4</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
|
<a href="_sources/laliga.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>