Class: Smartfm::RestClient::List

Inherits:
Base
  • Object
show all
Defined in:
lib/smartfm/rest_clients/list.rb

Constant Summary collapse

ACTIONS =
{
  :recent      => {:path => '/lists'                     },
  :find        => {:path => '/lists/__id__'              },
  :items       => {:path => '/lists/__id__/items'        },
  :sentences   => {:path => '/lists/__id__/sentences'    },
  :matching    => {:path => '/lists/matching/__keyword__'},
  :likes       => {:path => '/lists/__id__/likes'        },
  :create      => {:path => '/lists',                          :http_method => :post},
  :add_item    => {:path => '/lists/__list_id__/items',        :http_method => :post}, # id is used for item_id here..
  :like!       => {:path => '/lists/__id__/likes',             :http_method => :post},
  :delete      => {:path => '/lists/__id__',                   :http_method => :delete},
  :delete_item => {:path => '/lists/__id__/items/__item_id__', :http_method => :delete},
  :unlike!     => {:path => '/lists/__id__/likes',             :http_method => :delete}
}

Method Summary

Methods inherited from Base

http_method, method_missing, path, valid_action?