-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
240 lines (231 loc) · 11.4 KB
/
index.html
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE HTML>
<html>
<head>
<title>DirecTV Remote API</title>
<link rel="stylesheet" href="website/css/bootstrap.css" type="text/css"/>
<link rel="stylesheet" href="website/css/bootstrap-custom.css" type="text/css"/>
<link rel="stylesheet" href="website/css/bootstrap-responsive.css" type="text/css"/>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28421267-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body data-spy="scroll">
<!-- GitHub 'Fork Me' Badge -->
<a href="https://github.com/whitlockjc/directv-remote-api" class="navbar-fixed-top">
<img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
</a>
<!-- Navigation Bar -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="http://whitlockjc.github.com/directv-remote-api/">DirecTV Remote API</a>
<ul class="nav">
<li class="active"><a href="#overview">Overview</a></li>
<li><a href="#about">About</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">JavaScript <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#javascript-documentation">Documentation</a></li>
<li><a href="#javascript-downloads">Downloads</a></li>
<li><a href="#javascript-examples">Examples</a></li>
</ul>
</li>
<li><a href="#resources">Resources</a></li>
</ul>
</div>
</div>
</div>
<!-- Main Content -->
<div class="container">
<!-- Overview -->
<section>
<div class="hero-unit">
<h1 id="overview">DirecTV Remote API</h1>
<p>
Providing consistent APIs for interacting with your <a href="http://www.directv.com">DirecTV</a> <abbr title="set-top-box">STB</abbr>, because someone had to do it.
<p>
</div>
</section>
<!-- About -->
<section>
<div class="page-header">
<h1 id="about">About the Project <small>Reasons behind the project and the project goals</small></h1>
</div>
<div class="row">
<div class="span6">
<h3>History</h3>
<p>
I've often found myself wanting to have a smarter remote control. Sure, I can go buy some multi-device
remote and all but with my smartphone, I already have remotes for most of my media center already. All
that I needed was a remote for my DirecTV <abbr title="set-top-box">STB</abbr>.
</p>
<p>
As most others do, I looked in my respective smartphone app stores and saw nothing compelling. Being a
hacker, like most reading this, I looked into writing my own and that is when I realized something: DirecTV
doesn't have an official API nor is there any official documentation on the subject. So how is everyone
else doing it?
</p>
<p>
After some port scanning and <a href="http://www.google.com">Google</a> searching, I found out that I
can indeed control my DirecTV <abbr title="set-top-box">STB</abbr> programmatically but most of the
code I found on the subject were one-off hacks only solving the needs of the project the code was
associated with. So here I am, hoping to provide you with an API, a consistent/common API, for
interacting with the DirecTV <abbr title="set-top-box">STB</abbr> programmatically.
</p>
</div>
<div class="span6">
<h3>Goals</h3>
<p>
The goals for this project are to design a very simple, yet full-featured, API for using every
available API provided by DirecTV for interating with your <abbr title="set-top-box">STB</abbr>
programmatically and to provide this API across a few languages:
</p>
<ul>
<li>Java</li>
<li><a href="#javascript">JavaScript</a></li>
<li>Objective-C</li>
</ul>
<p>
<span class="label notice">NOTE</span> The list of proposed/supported languages is not set in stone.
</p>
<p>
The main focus for this project is to provider APIs for languages with a mobile presence which is
why you see the proposed langauges above.
</p>
</div>
</div>
</section>
<!-- JavaScript-->
<section>
<div class="page-header">
<h1 id="javascript">JavaScript</h1>
</div>
<div class="row">
<div class="span4">
<h3>Resources</h3>
<p>
To the right you will see information on how to download the JavaScript API, documentation on
how to use the JavaScript API and example applications.
</p>
</div>
<div class="span8">
<h3 id="javascript-documentation">Documentation</h3>
<p>
Documentation for the JavaScript API right now consists of two items:
</p>
<dl>
<dt><a href="js/test/">Online Test Suite</a></dt>
<dd>This is a test suite that runs in your browser.</dd>
<dt><a href="js/docs/dtv.remote.api.html">Annotated Source Code</a></dt>
<dd>This is the actual source code for the JavaScript API presented in annotated form.</dd>
</dl>
<p>
The annotated source will help you not only see what APIs are available but also what options
are available, or required, when calling the particular functions or creating the particular
objects. Pretty soon we'll have a API documentation but until then, the annotated source and
test suite should show you how to use the API properly.
</p>
<h3 id="javascript-downloads">Downloads <small>(Right-click and use "Save as")</small></h3>
<table class="table table-striped">
<thead>
<tr>
<th>File name</th>
<th>Version</th>
<th>Size</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="js/dtv.remote.api.js">dtv.remote.api.js</a></td>
<td>0.0.1</td>
<td>20kb</td>
<td>Development version <em>(Uncompressed with comments)</em></td>
</tr>
<tr>
<td><a href="js/dtv.remote.api-min.js">dtv.remote.api-min.js</a></td>
<td>0.0.1</td>
<td>8kb</td>
<td>Production version <em>(Minified)</em></td>
</tr>
</tbody>
</table>
<p>
The JavaScript API has two hard dependencies:
</p>
<ul>
<li><a href="http://jquery.com/">jQuery</a> 1.7 or greater</li>
<li><a href="http://documentcloud.github.com/underscore/">Underscore.js</a> 1.2.2 or greater</li>
</ul>
<h3 id="javascript-examples">Examples</h3>
<p>
The <a href="js/examples">example application</a> is a work in progress that will allow you to
connect to a DirecTV <abbr title="set-top-box">STB</abbr> on your local network and interact with
it: View information about the currently tuned channel, change channels, see what's currently on
other channels and many more. You can also use the <a href="https://github.com/whitlockjc/directv-remote-api/blob/master/js/test/tests.js">online test suite sources</a>
as a low-level, code-based example on how to use the full JavaScript API.
</p>
</div>
</div>
</section>
<!-- Resources -->
<section>
<div class="page-header">
<h1 id="resources">Resources <small>Useful reading</small></h1>
</div>
<div class="row">
<div class="span12">
<p>
Below you will find links, with explanation, to some very useful resources that either helped in
the creation of these APIs, are using these APIs or are tools/libraries/apis being used by this
project:
</p>
<div class="row">
<div class="span6">
<h3>Tools Used</h3>
<dl>
<dt><a href="http://twitter.github.com/bootstrap/">Bootstrap</a></dt>
<dd>Bootstrap is a "toolkit from Twitter designed to kickstart development of webapps and sites" and is used for the UI of this site and the <a href="#javascript">JavaScript API</a> example application.</dd>
<dt><a href="http://jashkenas.github.com/docco/">Docco</a></dt>
<dd>Docco is the tool used to generated the annotated source for the <a href="#javascript">JavaScript API</a>.</dd>
<dt><a href="http://jquery.com/">jQuery</a></dt>
<dd>jQuery is the "Write less, do more, JavaScript library" that provides the AJAX functionality for the <a href="#javascript">JavaScript API</a>.</dd>
<dt><a href="http://docs.jquery.com/QUnit">QUnit</a></dt>
<dd>QUnit is a JavaScript unit test library written by the jQuery guys and is used by our <a href="#javascript">JavaScript API</a> to run its in-browser test suite.</dd>
<dt><a href="http://documentcloud.github.com/underscore/">Underscore</a></dt>
<dd>Underscore is "a utility-belt library for JavaScript" used by the <a href="#javascript">JavaScript API</a>.</dd>
</dl>
</div>
<div class="span6">
<h3>Reading Materials</h3>
<dl>
<dt><a href="http://www.sbcatest.com/TechUpdates/DTV-MD-0359-DIRECTV%20SHEF%20Public%20Beta%20Command%20Set-V1.0.pdf">DirecTV SHEF Command Set Public Beta</a></dt>
<dd>This PDF documents the available HTTP-based API for interacting with your DirecTV <abbr title="set-top-box">STB</abbr>.</dd>
<dt><a href="http://www.sbcatest.com/DTV-MD-0058-DIRECTVSet-topInformationforInstallers-V2.2.pdf">DirecTV Set-Top-Box Information for the Installer</a></dt>
<dd>This PDF documents the available serial commands available to be invoked via the HTTP API documented above.</dd>
</dl>
<p>
<span class="label notice">NOTE</span> The <strong>DirecTV SHEF Command Set Public Beta</strong> and <strong>DirecTV Set-Top-Box Information for the Installer</strong>
documents are out of date. That being said, with these documents being the closest thing to real DirecTV API documentation they were still essential in
helping create these APIs.
</p>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- Scripts -->
<script type="text/javascript" src="website/js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="website/js/bootstrap-scrollspy.js"></script>
<script type="text/javascript" src="website/js/bootstrap-dropdown.js"></script>
</body>
</html>