smartfm 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -2
- data/README +3 -10
- data/lib/smartfm.rb +3 -2
- data/lib/smartfm/core/version.rb +2 -2
- data/lib/smartfm/models.rb +7 -0
- data/lib/smartfm/{model → models}/base.rb +2 -1
- data/lib/smartfm/{model → models}/item.rb +18 -86
- data/lib/smartfm/models/like.rb +20 -0
- data/lib/smartfm/{model → models}/list.rb +35 -64
- data/lib/smartfm/models/notification.rb +26 -0
- data/lib/smartfm/models/sentence.rb +70 -0
- data/lib/smartfm/{model → models}/user.rb +54 -16
- data/lib/smartfm/modules.rb +4 -0
- data/lib/smartfm/modules/acts_as_likable.rb +16 -0
- data/lib/smartfm/modules/media_support.rb +37 -0
- data/lib/smartfm/modules/private_content.rb +25 -0
- data/lib/smartfm/modules/public_content.rb +51 -0
- data/lib/smartfm/rest_clients.rb +9 -0
- data/lib/smartfm/{rest_client → rest_clients}/base.rb +0 -0
- data/lib/smartfm/rest_clients/item.rb +17 -0
- data/lib/smartfm/rest_clients/like.rb +7 -0
- data/lib/smartfm/rest_clients/list.rb +18 -0
- data/lib/smartfm/rest_clients/notification.rb +8 -0
- data/lib/smartfm/rest_clients/sentence.rb +14 -0
- data/lib/smartfm/rest_clients/user.rb +20 -0
- data/spec/smartfm/{model → models}/base_spec.rb +5 -3
- data/spec/smartfm/{model → models}/item_spec.rb +24 -5
- data/spec/smartfm/models/like_spec.rb +19 -0
- data/spec/smartfm/models/list_spec.rb +70 -0
- data/spec/smartfm/models/notification_spec.rb +11 -0
- data/spec/smartfm/models/sentence_spec.rb +11 -0
- data/spec/smartfm/{model → models}/user_spec.rb +53 -19
- data/spec/smartfm/{rest_client → rest_clients}/base_spec.rb +0 -0
- data/spec/smartfm/{rest_client → rest_clients}/item_spec.rb +0 -0
- data/spec/smartfm/rest_clients/like_spec.rb +7 -0
- data/spec/smartfm/{rest_client → rest_clients}/list_spec.rb +0 -0
- data/spec/smartfm/rest_clients/notification_spec.rb +7 -0
- data/spec/smartfm/{rest_client → rest_clients}/sentence_spec.rb +0 -0
- data/spec/smartfm/{rest_client → rest_clients}/user_spec.rb +0 -0
- metadata +37 -24
- data/lib/smartfm/model.rb +0 -5
- data/lib/smartfm/model/sentence.rb +0 -118
- data/lib/smartfm/rest_client.rb +0 -8
- data/lib/smartfm/rest_client/item.rb +0 -14
- data/lib/smartfm/rest_client/list.rb +0 -15
- data/lib/smartfm/rest_client/sentence.rb +0 -12
- data/lib/smartfm/rest_client/user.rb +0 -14
- data/spec/smartfm/model/list_spec.rb +0 -7
- data/spec/smartfm/model/sentence_spec.rb +0 -7
data/lib/smartfm/rest_client.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
class Smartfm::RestClient::Item < Smartfm::RestClient::Base
|
2
|
-
|
3
|
-
ACTIONS = {
|
4
|
-
:recent => { :path => '/items' },
|
5
|
-
:find => { :path => '/items/__id__' },
|
6
|
-
:matching => { :path => '/items/matching/__keyword__' },
|
7
|
-
:extract => { :path => '/items/extract', },
|
8
|
-
:create => { :path => '/items', :http_method => :post },
|
9
|
-
:add_image => { :path => '/items/__id__/images', :http_method => :post },
|
10
|
-
:add_sound => { :path => '/items/__id__/sounds', :http_method => :post },
|
11
|
-
:add_tags => { :path => '/items/__id__/tags', :http_method => :post }
|
12
|
-
}
|
13
|
-
|
14
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class Smartfm::RestClient::List < Smartfm::RestClient::Base
|
2
|
-
|
3
|
-
ACTIONS = {
|
4
|
-
:recent => { :path => '/lists' },
|
5
|
-
:find => { :path => '/lists/__id__' },
|
6
|
-
:items => { :path => '/lists/__id__/items' },
|
7
|
-
:sentences => { :path => '/lists/__id__/sentences' },
|
8
|
-
:matching => { :path => '/lists/matching/__keyword__' },
|
9
|
-
:create => { :path => '/lists', :http_method => :post },
|
10
|
-
:delete => { :path => '/lists/__id__', :http_method => :delete },
|
11
|
-
:add_item => { :path => '/lists/__list_id__/items', :http_method => :post },
|
12
|
-
:delete_item => { :path => '/lists/__list_id__/items/__id__', :http_method => :delete }
|
13
|
-
}
|
14
|
-
|
15
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class Smartfm::RestClient::Sentence < Smartfm::RestClient::Base
|
2
|
-
|
3
|
-
ACTIONS = {
|
4
|
-
:recent => { :path => '/sentences' },
|
5
|
-
:find => { :path => '/sentences/__id__' },
|
6
|
-
:matching => { :path => '/sentences/matching/__keyword__' },
|
7
|
-
:create => { :path => '/sentences', :http_method => :post },
|
8
|
-
:add_image => { :path => '/sentences/__id__/images', :http_method => :post },
|
9
|
-
:add_sound => { :path => '/sentences/__id__/sounds', :http_method => :post }
|
10
|
-
}
|
11
|
-
|
12
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class Smartfm::RestClient::User < Smartfm::RestClient::Base
|
2
|
-
|
3
|
-
ACTIONS = {
|
4
|
-
:find => { :path => '/users/__username__' },
|
5
|
-
:lists => { :path => '/users/__username__/lists' },
|
6
|
-
:items => { :path => '/users/__username__/items' },
|
7
|
-
:friends => { :path => '/users/__username__/friends' },
|
8
|
-
:followers => { :path => '/users/__username__/followers' },
|
9
|
-
:study_results => { :path => '/users/__username__/study_results/__application__' },
|
10
|
-
:matching => { :path => '/users/matching/__keyword__' },
|
11
|
-
:username => { :path => '/sessions' }
|
12
|
-
}
|
13
|
-
|
14
|
-
end
|