Class: APN::Base
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- APN::Base
show all
- Defined in:
- lib/urbanairship_on_rails/models/apn/base.rb
Overview
Constant Summary
collapse
- MAX_RETRIES =
3
- OPEN_TIMEOUT =
60
- READ_TIMEOUT =
60
Class Method Summary
collapse
Instance Method Summary
collapse
-
#http_delete(url, data = nil, headers = {}, push = false) ⇒ Object
-
#http_get(url, data = nil, headers = {}, push = false) ⇒ Object
-
#http_post(url, data = nil, headers = {}, push = false) ⇒ Object
-
#http_put(url, data = nil, headers = {}, push = false) ⇒ Object
Class Method Details
.table_name ⇒ Object
18
19
20
|
# File 'lib/urbanairship_on_rails/models/apn/base.rb', line 18
def self.table_name self.to_s.gsub("::", "_").tableize
end
|
Instance Method Details
#http_delete(url, data = nil, headers = {}, push = false) ⇒ Object
37
38
39
40
|
# File 'lib/urbanairship_on_rails/models/apn/base.rb', line 37
def http_delete(url, data=nil, ={}, push=false)
puts "APN::Base.http_delete"
http_request(:delete, url, data, , push)
end
|
#http_get(url, data = nil, headers = {}, push = false) ⇒ Object
22
23
24
25
|
# File 'lib/urbanairship_on_rails/models/apn/base.rb', line 22
def http_get(url, data=nil, ={}, push=false)
puts "APN::Base.http_get"
http_request(:get, url, data, , push)
end
|
#http_post(url, data = nil, headers = {}, push = false) ⇒ Object
27
28
29
30
|
# File 'lib/urbanairship_on_rails/models/apn/base.rb', line 27
def http_post(url, data=nil, ={}, push=false)
puts "APN::Base.http_post"
http_request(:post, url, data, , push)
end
|
#http_put(url, data = nil, headers = {}, push = false) ⇒ Object
32
33
34
35
|
# File 'lib/urbanairship_on_rails/models/apn/base.rb', line 32
def http_put(url, data=nil, ={}, push=false)
puts "APN::Base.http_put"
http_request(:put, url, data, , push)
end
|