Skip to content

Commit

Permalink
Fully documented the remote class
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmehle committed Jun 5, 2011
1 parent a871ae3 commit 526dc75
Show file tree
Hide file tree
Showing 24 changed files with 341 additions and 155 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2010 Jared Mehle
Copyright (c) 2010-2011 Jared Mehle

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
7 changes: 7 additions & 0 deletions README.rdoc
Expand Up @@ -39,3 +39,10 @@ Then call events, users_events(username), or concert_setlists(event_id)
== Copyright

Copyright (c) 2010-2011 Jared Mehle. See LICENSE for details.

== Thanks

Thanks to Akshay Dodeja and Tomasz Stachewicz for submitting code and pull requests.

A special thank you to Jon Nunemaker for the httparty which is used extensively within this
gem and for the twitter gem as inspiration.
4 changes: 2 additions & 2 deletions doc/APIKeyNotSet.html
Expand Up @@ -176,13 +176,13 @@ <h3 class="section-header">Public Instance Methods</h3>

<div class="method-description">


<p>Warns of missing API key</p>



<div class="method-source-code" id="to_s-source">
<pre>
<span class="ruby-comment"># File lib/songkickr.rb, line 20</span>
<span class="ruby-comment"># File lib/songkickr.rb, line 21</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
<span class="ruby-string">'API key not set!'</span>
<span class="ruby-keyword">end</span></pre>
Expand Down
2 changes: 1 addition & 1 deletion doc/LICENSE.html
Expand Up @@ -100,7 +100,7 @@ <h3 class="section-header">Class Index

<div id="documentation">

<p>Copyright © 2010 Jared Mehle</p>
<p>Copyright © 2010-2011 Jared Mehle</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
Expand Down
8 changes: 8 additions & 0 deletions doc/README_rdoc.html
Expand Up @@ -150,6 +150,14 @@ <h2>Copyright</h2>
<p>Copyright © 2010-2011 Jared Mehle. See <a href="LICENSE.html">LICENSE</a>
for details.</p>

<h2>Thanks</h2>

<p>Thanks to Akshay Dodeja and Tomasz Stachewicz for submitting code and pull
requests.</p>

<p>A special thank you to Jon Nunemaker for the httparty which is used
extensively within this gem and for the twitter gem as inspiration.</p>

</div>

<div id="validator-badges">
Expand Down
26 changes: 21 additions & 5 deletions doc/Songkickr.html
Expand Up @@ -238,14 +238,22 @@ <h3 class="section-header">Public Class Methods</h3>

<div class="method-description">

<p>Get an API key for your app from <a
href="http://developer.songkick.com/">developer.songkick.com/</a></p>
<p>Returns the Songkick API key In order to use the Songkick API, you must
have a Songkick API (their rule, not mine). Get an API key for your app
from <a href="http://developer.songkick.com/">developer.songkick.com/</a></p>

<h4>Example</h4>

<pre>require 'songkickr'
remote = Songkickr::Remote.new XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
remote.api_key
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</pre>



<div class="method-source-code" id="api_key-source">
<pre>
<span class="ruby-comment"># File lib/songkickr.rb, line 28</span>
<span class="ruby-comment"># File lib/songkickr.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">api_key</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">APIKeyNotSet</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@api_key</span>.<span class="ruby-identifier">nil?</span>

Expand Down Expand Up @@ -274,13 +282,21 @@ <h3 class="section-header">Public Class Methods</h3>

<div class="method-description">

<p>Set the API key</p>
<p>Set the API key. In the event you need to set the API key after
initializing the the remote.</p>

<h3>Parameters</h3>
<ul><li>
<p><tt><a href="Songkickr.html#method-c-api_key">api_key</a></tt> - A
developer key from Songkick. Get an API key for your app from <a
href="http://developer.songkick.com/">developer.songkick.com/</a></p>
</li></ul>



<div class="method-source-code" id="api_key-3D-source">
<pre>
<span class="ruby-comment"># File lib/songkickr.rb, line 35</span>
<span class="ruby-comment"># File lib/songkickr.rb, line 47</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">api_key=</span>(<span class="ruby-identifier">api_key</span>)
<span class="ruby-ivar">@api_key</span> = <span class="ruby-identifier">api_key</span>
<span class="ruby-keyword">end</span></pre>
Expand Down
6 changes: 3 additions & 3 deletions doc/Songkickr/Artist.html
Expand Up @@ -278,9 +278,9 @@ <h3 class="section-header">Public Class Methods</h3>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">artist_hash</span> = {})
<span class="ruby-ivar">@href</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;href&quot;</span>]
<span class="ruby-ivar">@display_name</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;displayName&quot;</span>]
<span class="ruby-ivar">@id</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;id&quot;</span>]
<span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;uri&quot;</span>]
<span class="ruby-ivar">@onTourUntil</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;onTourUntil&quot;</span>]
<span class="ruby-ivar">@id</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;id&quot;</span>]
<span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;uri&quot;</span>]
<span class="ruby-ivar">@onTourUntil</span> = <span class="ruby-identifier">artist_hash</span>[<span class="ruby-string">&quot;onTourUntil&quot;</span>]
<span class="ruby-keyword">end</span></pre>
</div><!-- new-source -->

Expand Down

0 comments on commit 526dc75

Please sign in to comment.