Subversion Repositories SmartDukaan

Rev

Rev 9057 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9047 manish.sha 1
namespace java in.shop2020.googleadwords
2
namespace py shop2020.thriftpy.googleadwords
3
 
4
include "GenericService.thrift"
5
 
6
/**
7
Exceptions
8
*/
9
 
10
exception GoogleAdwordsServiceException{
11
	1:i64 id,
12
	2:string message
13
}
14
 
15
enum NetworkSettingType{
16
	GOOGLE_SEARCH_AND_SEARCH_NETWORK = 1,
17
	DISPLAY_NETWORK = 2,
18
	GOOGLE_PARTNER_SEARCH_NETWORK = 3,
19
	SEARCH_AND_DISPLAY_NETWORK = 4,
20
	DISPLAY_AND_PARTNER_NETWORK = 5,
21
	SEARCH_AND_PARTNER_NETWORK = 6,
22
	ALL_AVALIABLE_SOURCES =7
23
}    
24
 
25
enum AdwordsCampaignStatus{
26
	ACTIVE = 1,
27
	PAUSED = 2,
28
	DELETED = 3
29
}
30
 
31
enum AdwordsAdGroupStatus{
32
	ENABLED = 1,
33
	PAUSED = 2,
34
	DELETED = 3
35
}
36
 
37
enum KeywordMatchType{
38
	EXACT = 1,
39
	PHRASE = 2,
40
	BROAD = 3
41
}
42
 
43
struct AdwordsCampaign{
44
	1:i64 id,
45
	2:i64 campaignId,
46
	3:string name,
47
	4:AdwordsCampaignStatus status,
48
	5:optional i64 startDate,
49
	6:optional i64 endDate,
50
	7:double budgetAmount,
51
	8:NetworkSettingType networkType
52
}
53
 
54
struct AdwordsAdGroup{
55
	1:i64 id,
56
	2:i64 campaignId,
57
	3:i64 adgroupId,
58
	4:i64 catalogItemId,
59
	5:string name,
60
	6:AdwordsAdGroupStatus status,
9057 manish.sha 61
	7:double bidAmount,
62
	8:i32 stockLinked
9047 manish.sha 63
}
64
 
65
struct AdwordsAdGroupAd{
66
	1:i64 id,
67
	2:i64 campaignId,
68
	3:i64 adgroupId,
69
	4:i64 adgroupadId,
70
	5:string headline,
71
	6:string description1,
72
	7:string description2,
73
	8:string url,
74
	9:string displayUrl
75
}
76
 
77
struct AdwordsAdKeyword{
78
	1:i64 id,
79
	2:i64 campaignId,
80
	3:i64 adgroupId,
81
	4:i64 criterionId,
82
	5:string text,
83
	6:double bidAmount,
84
	7:KeywordMatchType matchType
85
}
86
 
87
service GoogleAdwordsService extends GenericService.GenericService{
88
 
89
	void addAdwordsCampaign(1:AdwordsCampaign campaign) throws (1:GoogleAdwordsServiceException gasex),
90
	void addAdwordsAdGroup(1:AdwordsAdGroup adgroup) throws (1:GoogleAdwordsServiceException gasex),
91
	void addAdwordsAdGroupAd(1:AdwordsAdGroupAd adgroupad) throws (1:GoogleAdwordsServiceException gasex),
92
	void addAdwordsAdKeyword(1:AdwordsAdKeyword adkeyword) throws (1:GoogleAdwordsServiceException gasex),
93
 
94
	void updateAdwordsCampaign(1:AdwordsCampaign campaign) throws (1:GoogleAdwordsServiceException gasex),
95
	void updateAdwordsAdGroup(1:AdwordsAdGroup adgroup) throws (1:GoogleAdwordsServiceException gasex),
96
	void updateAdwordsAdKeyword(1:AdwordsAdKeyword adkeyword) throws (1:GoogleAdwordsServiceException gasex),
9233 manish.sha 97
	void updateAdwordsAdGroupAd(1:AdwordsAdGroupAd adgroupad) throws (1:GoogleAdwordsServiceException gasex),
9047 manish.sha 98
 
99
	void deleteAdwordsCampaign(1:i64 campaignId) throws (1:GoogleAdwordsServiceException gasex),
100
	void deleteAdwordsAdGroup(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
101
	void deleteAdwordsAdGroupAd(1:i64 adgroupadId) throws (1:GoogleAdwordsServiceException gasex),
102
	void deleteAdwordsAdKeyword(1:i64 criterionId) throws (1:GoogleAdwordsServiceException gasex),
103
 
104
	AdwordsCampaign getAdwordsCampaignByCampaignId(1:i64 campaignId) throws (1:GoogleAdwordsServiceException gasex),
105
	AdwordsAdGroup getAdwordsAdGroupByAdGroupId(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
106
	AdwordsAdGroupAd getAdwordsAdgroupAdByAdId(1:i64 adgroupadId) throws (1:GoogleAdwordsServiceException gasex),
9233 manish.sha 107
	AdwordsAdKeyword getAdwordsAdKeywordByCriterionIdAndAdGroupId(1:i64 criterionId, 2:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
9047 manish.sha 108
 
109
	list<AdwordsAdKeyword> getAdwordsAdKeywordsByAdgroupId(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
110
	list<AdwordsAdGroupAd> getAdwordsAdGroupAdsByAdgroupId(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
111
	list<AdwordsAdGroup> getAdwordsAdGroupsByCampaignId(1:i64 campaignId) throws (1:GoogleAdwordsServiceException gasex),
112
	list<AdwordsCampaign> getAllAdwordsCampaigns() throws (1:GoogleAdwordsServiceException gasex),
113
 
114
	list<AdwordsAdGroup> getAllAdwordsAdGroups() throws (1:GoogleAdwordsServiceException gasex),
115
	list<AdwordsAdGroupAd> getAllAdwordsAdGroupAds() throws (1:GoogleAdwordsServiceException gasex),
116
	list<AdwordsAdKeyword> getAllAdwordsAdKeywords() throws (1:GoogleAdwordsServiceException gasex)
117
}