Class: VoxcastApi::Version01
- Defined in:
- lib/voxcast_api/purge.rb
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Http
Instance Method Summary collapse
Methods inherited from Purge
#_purge_files, get, #get_urls, #limit, #purge
Methods inherited from Base
#api_sig, #auth_key?, #devices, #execute_method, #get_basic_auth, #get_data, #get_method, #initialize, #log_download, #log_list, #populate, #process_response, #status, #test
Methods inherited from Http
#execute, #get_basic_auth, #get_http, #get_method, #initialize, #timestamp
Constructor Details
This class inherits a constructor from VoxcastApi::Base
Instance Method Details
#get_path_and_params(params = {}, url = nil) ⇒ Object
175 176 177 178 179 180 181 182 |
# File 'lib/voxcast_api/purge.rb', line 175 def get_path_and_params(params = {}, url = nil) # override get_path_and_params to do a "dumbed" down version of the params url = @url if url.blank? uri = URI.parse(url) # for version 01, the key/secret key is the user/password data = get_data(params, @user, @password, 'user') [uri.request_uri, data] end |
#lookup_method(key) ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/voxcast_api/purge.rb', line 157 def lookup_method(key) #override the default case key.to_s when 'purge_site' 'voxel.cdn.content.purgeSite' when 'purge_file' 'voxel.cdn.content.purge' when 'purge_dir' 'voxel.cdn.content.purgeDirectory' when 'populate' 'voxel.cdn.content.populate' when 'status' 'voxel.cdn.transaction.status' else super(key) end end |