Skip to content

Commit

Permalink
Merge pull request #18 from mguinada/review-docs
Browse files Browse the repository at this point in the history
Documentation review
  • Loading branch information
mguinada committed Oct 8, 2012
2 parents 68182fd + 533d806 commit e3bc224
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .yardopts
@@ -1,2 +1,2 @@
--no-private --protected --markup markdown lib/**/*.rb - README.md LICENSE
--no-private --protected --markup-provider redcarpet --markup markdown lib/**/*.rb - README.md LICENSE

14 changes: 14 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,14 @@
0.1.0
-----

Added track streaming URI acquisition (Tracks#stream)

0.0.2
-----

Added the per_page parameter & corrected pagination threshold

0.0.1
-----

1st release
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -59,6 +59,7 @@ track.metadata.artist.name

### Search for an artist
```ruby

api.search_artists('radiohead').map(&:name)
=> ["Radiohead", "Radiohead at Lollapalooza 2008", "REM & Radiohead", "Radiohead 6. Permanent Daylight live", "Radiohead @ Optimus Alive'12", "I Can't Take The Hurt (Johnny Cash vs Tegan and Sarah and Radiohead)"]
```
Expand All @@ -67,7 +68,7 @@ api.search_artists('radiohead').map(&:name)
```ruby

activity = []
api.genre_channels('punk', 'rock').each do |act|
api.genre_channels('punk', 'rock', page: 1, per_page: 10).each do |act|
activity << "#{act.verb.capitalize} on #{act.actor.title} refering music track #{act.object.metadata.title}"
end

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -23,7 +23,7 @@ namespace :doc do
desc "Generate documentation"
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
t.options = ['--no-private', '--protected', '--markup', 'markdown']
t.options = ['--no-private', '--protected', '--markup-provider', 'redcarpet', '--markup', 'markdown']
end
end

Expand Down
27 changes: 16 additions & 11 deletions lib/shuffler_fm/api/channels.rb
Expand Up @@ -13,15 +13,15 @@ module Channels
# @return [Array] an array with the channel's activity stream
#
# @example
# api.media_channels('youtube', page: 2)
# api.media_channels('soundcloud')
#
def media_channels(key, options = {})
channel(:media, key, options)
end

# Reads the blog channels activity stream
#
# @param [String] key The channel key.
# @param [Integer] key The blog id
# @param [Hash] options
# @option options [Integer] :page The page to request on paginated operation responses. First page is page 1.
# @option options [Integer] :per_page The page size. Default is 50, maximum is 100.
Expand All @@ -37,7 +37,6 @@ def blog_channels(key, options = {})

# Reads the artist channels activity stream
#
# @param key The channel key.
# @param [Hash] options
# @option options [Integer] :page The page to request on paginated operation responses. First page is page 1.
# @option options [Integer] :per_page The page size. Default is 50, maximum is 100.
Expand All @@ -53,16 +52,22 @@ def artist_channels(key, options = {})

# Reads the genere channels activity stream.
#
# @param [Array] keys The channel keys.
# @param [Hash] options
# @option options [Integer] :page The page to request on paginated operation responses. First page is page 1.
# @option options [Integer] :per_page The page size. Default is 50, maximum is 100.
# @overload genre_channels(*keys)
# @param [Array] keys The channel keys.
#
# @return [Array] an array with the channel's activity stream
# @example
# api.genre_channels('punk')
# api.genre_channels('punk', 'rock')
#
# @example
# api.genre_channels('rock')
# api.genre_channels('punk', 'rock', page: 2)
# @overload genre_channels(*keys, options)
# @param [Hash] options
# @option options [Integer] :page The page to request on paginated operation responses. First page is page 1.
# @option options [Integer] :per_page The page size. Default is 50, maximum is 100.
#
# @example
# api.genre_channels('punk', 'rock', page: 1, per_page: 10)
#
# @return [Array] an array with the channel's activity stream
#
def genre_channels(*keys)
channel(:genre, *keys)
Expand Down
2 changes: 1 addition & 1 deletion lib/shuffler_fm/api/tracks.rb
Expand Up @@ -32,7 +32,7 @@ def track(id)

# Streaming URI for a track.
#
# NOTE: This operation required a specific authorization form shuffler.fm
# NOTE: This operation requires a specific authorization form shuffler.fm
#
# @param [Integer] id The track id
#
Expand Down
3 changes: 2 additions & 1 deletion shuffler_fm.gemspec
Expand Up @@ -33,5 +33,6 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'vcr'
gem.add_development_dependency 'simplecov'
gem.add_development_dependency 'yard'
gem.add_development_dependency 'maruku'
gem.add_development_dependency 'redcarpet'
gem.add_development_dependency 'github-markup'
end

0 comments on commit e3bc224

Please sign in to comment.