docs
This commit is contained in:
201
doc/index.html
Normal file
201
doc/index.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>
|
||||
File: README
|
||||
|
||||
— Documentation by YARD 0.8.7.3
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
||||
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
hasFrames = window.top.frames.main ? true : false;
|
||||
relpath = '';
|
||||
framesUrl = "frames.html#!" + escape(window.location.href);
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="_index.html">Index</a> »
|
||||
<span class="title">File: README</span>
|
||||
|
||||
|
||||
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="class_list_link"
|
||||
href="class_list.html">
|
||||
Class List
|
||||
</a>
|
||||
|
||||
<a class="full_list_link" id="method_list_link"
|
||||
href="method_list.html">
|
||||
Method List
|
||||
</a>
|
||||
|
||||
<a class="full_list_link" id="file_list_link"
|
||||
href="file_list.html">
|
||||
File List
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<iframe id="search_frame"></iframe>
|
||||
|
||||
<div id="content"><div id='filecontents'>
|
||||
<h1 id="label-Sightstone">Sightstone</h1>
|
||||
|
||||
<p>Sightstone is a ruby wrapper for riots league of legends developer api (<a
|
||||
href="http://developer.riotgames.com">developer.riotgames.com</a>). Please
|
||||
not that you need an api key from riot in order to use this gem</p>
|
||||
|
||||
<h2 id="label-Installation">Installation</h2>
|
||||
|
||||
<p>Just download the gem:
|
||||
<code>
|
||||
gem install sightstone
|
||||
</code></p>
|
||||
|
||||
<p>If you want to build it by your on, build the gem and install
|
||||
it:
|
||||
<code>
|
||||
cd Sightstone
|
||||
gem build sightstone.gemspec
|
||||
gem install
|
||||
sightstone-x.x.x.gem
|
||||
</code></p>
|
||||
|
||||
<h2 id="label-Usage+Examples">Usage Examples</h2>
|
||||
|
||||
<p>Sightstone is divided into several modules, each controlled by the base
|
||||
class 'Sightstone'. To use it, simply <code>require
|
||||
'sightstone'</code></p>
|
||||
|
||||
<p>Currently available modules are:
|
||||
summoner (summoner, runes, masteries),
|
||||
game, league, stats, champion, teams</p>
|
||||
|
||||
<p>Below are usage examples for 2 of the modules. You can review the code to
|
||||
get an idea about what is currently possible and what isnt. Especially the
|
||||
module classes under <code>sightstone/modules</code> should be interessting
|
||||
for that. Working on a wiki begins as soon as i bring myself to comment my
|
||||
code properly.</p>
|
||||
|
||||
<h3 id="label-Summoner">Summoner</h3>
|
||||
|
||||
<p>The summoner module handles all calls to the summoner api (summoner, runes,
|
||||
masteries)</p>
|
||||
|
||||
<p>Examples:
|
||||
```
|
||||
require 'sightstone'
|
||||
sightstone =
|
||||
Sightstone.new('your_api_key', 'na')</p>
|
||||
|
||||
<h1 id="label-gets+the+summoner+by+its+name+OR+id">gets the summoner by its name OR id</h1>
|
||||
|
||||
<p>summoner = sightstone.summoner.summoner 'dyrus'</p>
|
||||
|
||||
<p>summoner.name
|
||||
=> "Dyrus"
|
||||
summoner.id
|
||||
=> 5908
|
||||
```</p>
|
||||
|
||||
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'sightstone'</span>
|
||||
<span class="ruby-identifier">sightstone</span> = <span class="ruby-constant">Sightstone</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'your_api_key'</span>, <span class="ruby-string">'na'</span>)
|
||||
|
||||
<span class="ruby-comment"># gets the runebook of the summoner or a summoners id </span>
|
||||
<span class="ruby-identifier">rune_book</span> = <span class="ruby-identifier">sightstone</span>.<span class="ruby-identifier">summoner</span>.<span class="ruby-identifier">runes</span> <span class="ruby-value">5908</span>
|
||||
<span class="ruby-identifier">rune_book</span>.<span class="ruby-identifier">pages</span>.<span class="ruby-identifier">size</span>
|
||||
=<span class="ruby-operator">></span> <span class="ruby-value">20</span>
|
||||
|
||||
<span class="ruby-identifier">page</span> = <span class="ruby-identifier">rune_book</span>.<span class="ruby-identifier">pages</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-identifier">page</span>.<span class="ruby-identifier">name</span>
|
||||
=<span class="ruby-operator">></span> <span class="ruby-string">"Jax 2"</span>
|
||||
<span class="ruby-identifier">page</span>.<span class="ruby-identifier">current</span>
|
||||
=<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>
|
||||
<span class="ruby-identifier">page</span>.<span class="ruby-identifier">slots</span>[<span class="ruby-value">1</span>]
|
||||
=<span class="ruby-operator">></span> =<span class="ruby-operator">></span> <span class="ruby-comment">#<Rune:0x007fae98b55c40 @id=5245, @description="+0.95 attack damage", @name="Greater Mark of Attack Damage", @tier=3></span>
|
||||
</pre>
|
||||
|
||||
<h3 id="label-Game">Game</h3>
|
||||
|
||||
<p>This module handles calls to the game api (used to receive summoners match
|
||||
history)</p>
|
||||
|
||||
<p>Example:
|
||||
```
|
||||
require 'sightstone'
|
||||
sightstone =
|
||||
Sightstone.new('your_api_key', 'na')</p>
|
||||
|
||||
<p>summoner dyrus = sightstone.summoner.summoner(“Dyrus”)
|
||||
history =
|
||||
sightstone.game.recent(dyrus)</p>
|
||||
|
||||
<p>history.games.size
|
||||
=> 10</p>
|
||||
|
||||
<p>game = <a href="http://0">history.games</a>
|
||||
game.gameType
|
||||
=>
|
||||
"MATCHED_GAME"
|
||||
game.createDate
|
||||
=> 1386503866142
|
||||
<a
|
||||
href="http://1">game.statistics</a>.name
|
||||
=> "GOLD_EARNED"
|
||||
<a
|
||||
href="http://1">game.statistics</a>.value
|
||||
=> 7948
|
||||
```</p>
|
||||
|
||||
<h2 id="label-TODO">TODO</h2>
|
||||
<ul><li>
|
||||
<p>Non-api calls to the datadragon</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-License">License</h2>
|
||||
|
||||
<p>Licensed under the MIT License - Feel free to take on world domination with
|
||||
it.</p>
|
||||
|
||||
<h2 id="label-Feedback">Feedback</h2>
|
||||
|
||||
<p>Issues, suggestions, pull requests and whatever Dr. Mundo pleases are
|
||||
welcome.
|
||||
If you want to contact me: <strong>danijob88 at
|
||||
googlemail.com</strong></p>
|
||||
|
||||
<p><em>This product is not endorsed, certified or otherwise approved in any
|
||||
way by Riot Games, Inc. or any of its affiliates.</em></p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Sun Dec 15 01:56:07 2013 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.8.7.3 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user