module Delicious::Tags::Methods::All

Public Instance Methods

all() click to toggle source

Get all tags

@return [Array<Tag>] List of tags

# File lib/delicious/tags/methods/all.rb, line 13
def all
  response = @client.connection.get '/v1/tags/get'
  fail Delicious::Error, 'Error getting tags' unless response.body['tags']
  response.body['tags']['tag'].map do |attrs|
    Tag.build_persisted @client, name: attrs['tag'], count: attrs['count'].to_i
  end
end