5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/epom/site.rb', line 5
def self.extended_methods
{
:delete_site => {
:url => '/rest-api/sites/SITE_ID/delete.do',
:url_parameters => [:siteId],
:body_parameters => [:hash, :timestamp, :username],
:method => :post
},
:delete_site_cpm_threshold => {
:url => '/rest-api/sites/SITE_ID/cpm-thresholds/delete.do',
:url_parameters => [:siteId],
:body_parameters => [:hash, :timestamp, :username],
:method => :post
},
:get_site_cpm_threshold_summary => {
:url => '/rest-api/sites/SITE_ID/cpm-thresholds.do',
:url_parameters => [:siteId],
:body_parameters => [:hash, :timestamp, :username],
:method => :get
},
:get_site_pricing => {
:url => '/rest-api/sites/SITE_ID/pricing.do',
:url_parameters => [:siteId],
:body_parameters => [:hash, :timestamp, :username],
:method => :get
},
:get_sites => {
:url => '/rest-api/sites.do',
:body_parameters => [:publishingCategories, :hash, :timestamp, :username],
:method => :get
},
:get_sites_tree => {
:url => '/rest-api/sites-tree.do',
:body_parameters => [:publishingCategories, :hash, :timestamp, :username],
:method => :get
},
:get_sites_zones => {
:url => '/rest-api/sites/SITE_ID/zones.do',
:url_parameters => [:siteId],
:body_parameters => [:hash, :timestamp, :username],
:method => :get
},
:set_site_cpm_thresholds => {
:url => '/rest-api/sites/SITE_ID/cpm-thresholds.do',
:url_parameters => [:siteId],
:body_parameters => [:cpmThreshold, :siteCountryCPMThresholds, :hash, :timestamp, :username],
:method => :post
},
:set_site_pricing => {
:url => '/rest-api/sites/SITE_ID/pricing.do?username=USERNAME×tamp=TIMESTAMP&hash=HASH',
:url_parameters => [:siteId, :hash, :timestamp, :username],
:body_parameters => [],
:method => :post,
:headers => {'Content-type' => 'application/json'}
},
:update_country_pricing => {
:url => '/rest-api/sites/SITE_ID/pricing/COUNTRY_CODE.do',
:url_parameters => [:siteId, :countryCode],
:body_parameters => [:price, :actionId, :hash, :timestamp, :username ],
:method => :post
},
:update_site => {
:url => '/rest-api/sites/update.do',
:body_parameters => [:id, :createDefaultZone, :name, :url, :description, :email, :allowPlacementBannersLinkingChange, :categoryId, :revenueShare, :impressionsByMonth, :visitorsByMonth, :hash, :timestamp, :username ],
:method => :post
},
:create_site => {
:url => '/rest-api/sites/update.do',
:body_parameters => [:createDefaultZone, :name, :url, :description, :email, :allowPlacementBannersLinkingChange, :categoryId, :revenueShare, :impressionsByMonth, :visitorsByMonth, :hash, :timestamp, :username ],
:method => :post
},
}
end
|