Tracks import

This commit is contained in:
Gregory Eremin
2012-09-01 21:55:01 +04:00
parent b5f616a9d9
commit 43422624f1
34 changed files with 1094 additions and 156 deletions
+4 -2
View File
@@ -3,5 +3,7 @@ lastfm:
api_secret: secret
client_name: BeatHaven
rovi:
api_key: secret
api_secret: secret
meta_api_key: secret
meta_api_secret: secret
autocomplete_api_key: secret
autocomplete_api_secret: secret
+1 -4
View File
@@ -5,9 +5,6 @@ File.open("#{Rails.root}/config/api_keys.yml") do |file|
LastFM.secret = config["lastfm"]["api_secret"]
LastFM.client_name = config["lastfm"]["client_name"]
Robbie.setup(
api_key: config["rovi"]["api_key"],
api_secret: config["rovi"]["api_secret"]
)
Robbie.setup(config["rovi"].symbolize_keys)
Robbie.enable_cache
end
+5 -1
View File
@@ -1,10 +1,14 @@
BeatHaven::Application.routes.draw do
namespace :api do
resources :artists, only: [:show], constraints: { id: /.+/ }
resources :albums, only: [:picture] do
resources :albums, only: [:show, :picture] do
member { get :picture }
end
resources :search, only: [] do
collection { get :complete; get :wtfis }
end
end
match "/:path" => "application#main", constraints: { path: /.*/ }
root to: "application#main"
end