mobile_version_thrift_client 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29bd3a40b152c9590639c69bfefbec046c5cc6cb
4
- data.tar.gz: 652f47a9aee2062a8f65d59b6be4fc4e2776c6e3
3
+ metadata.gz: 4fe2d5e635606172f110cda43287b1faf9da5339
4
+ data.tar.gz: 7cf6aeef7bfc62dc7b0deea89bcb15cbeaa35445
5
5
  SHA512:
6
- metadata.gz: 72ba6e052262af60b873bd6c230239e9c50e1aef9cc09bbbb1c1f00b38990f020a3229f26751abd9f4260fe060c8308243d93168515d1e8aa73ee02ba59f4375
7
- data.tar.gz: 8c169b484bdf8c37384e5582fc5195b5103d833ab995d3b3432b1b943205a07e01b89db6382f541b479c23dac005a7a1877341465d8d31fea965ad3d624ce7be
6
+ metadata.gz: 00a5db61597ad14aaff1ef429402184eabfba4032a3541bbc30a2b1766fb9f9cfe419aaf564adc35ec627f88673c82072fec0337ae093ba4e031791134e7a71b
7
+ data.tar.gz: adc2f7c57b0a6093fd11bcfd330ada0d5eb25559a4e8787dc76528218caa520f6c5a2fc724754c98e4401542a0acec7828efb5fc7997a641a28d8820c002789c
@@ -74,6 +74,11 @@ module Mobile
74
74
  app_definition_struct = Mobile::Version::Thrift::AppDefinition.new(app_definition)
75
75
  return @thrift_client.addAppHistory(app_definition_struct, version, apiVersion, downloadUrl)
76
76
  end
77
+
78
+ def queryDeterminedAppProduct(app_definition={})
79
+ app_definition_struct = Mobile::Version::Thrift::AppDefinition.new(app_definition)
80
+ return @thrift_client.queryDeterminedAppProduct(app_definition_struct)
81
+ end
77
82
 
78
83
  end
79
84
 
@@ -14,13 +14,13 @@ module Mobile
14
14
  class Client
15
15
  include ::Thrift::Client
16
16
 
17
- def checkForUpgrade(app, version)
18
- send_checkForUpgrade(app, version)
17
+ def checkForUpgrade(app, version, deviceId)
18
+ send_checkForUpgrade(app, version, deviceId)
19
19
  return recv_checkForUpgrade()
20
20
  end
21
21
 
22
- def send_checkForUpgrade(app, version)
23
- send_message('checkForUpgrade', CheckForUpgrade_args, :app => app, :version => version)
22
+ def send_checkForUpgrade(app, version, deviceId)
23
+ send_message('checkForUpgrade', CheckForUpgrade_args, :app => app, :version => version, :deviceId => deviceId)
24
24
  end
25
25
 
26
26
  def recv_checkForUpgrade()
@@ -74,6 +74,21 @@ module Mobile
74
74
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'addAppHistory failed: unknown result')
75
75
  end
76
76
 
77
+ def queryDeterminedAppProduct(app)
78
+ send_queryDeterminedAppProduct(app)
79
+ return recv_queryDeterminedAppProduct()
80
+ end
81
+
82
+ def send_queryDeterminedAppProduct(app)
83
+ send_message('queryDeterminedAppProduct', QueryDeterminedAppProduct_args, :app => app)
84
+ end
85
+
86
+ def recv_queryDeterminedAppProduct()
87
+ result = receive_message(QueryDeterminedAppProduct_result)
88
+ return result.success unless result.success.nil?
89
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'queryDeterminedAppProduct failed: unknown result')
90
+ end
91
+
77
92
  end
78
93
 
79
94
  class Processor
@@ -82,7 +97,7 @@ module Mobile
82
97
  def process_checkForUpgrade(seqid, iprot, oprot)
83
98
  args = read_args(iprot, CheckForUpgrade_args)
84
99
  result = CheckForUpgrade_result.new()
85
- result.success = @handler.checkForUpgrade(args.app, args.version)
100
+ result.success = @handler.checkForUpgrade(args.app, args.version, args.deviceId)
86
101
  write_result(result, oprot, 'checkForUpgrade', seqid)
87
102
  end
88
103
 
@@ -107,6 +122,13 @@ module Mobile
107
122
  write_result(result, oprot, 'addAppHistory', seqid)
108
123
  end
109
124
 
125
+ def process_queryDeterminedAppProduct(seqid, iprot, oprot)
126
+ args = read_args(iprot, QueryDeterminedAppProduct_args)
127
+ result = QueryDeterminedAppProduct_result.new()
128
+ result.success = @handler.queryDeterminedAppProduct(args.app)
129
+ write_result(result, oprot, 'queryDeterminedAppProduct', seqid)
130
+ end
131
+
110
132
  end
111
133
 
112
134
  # HELPER FUNCTIONS AND STRUCTURES
@@ -115,10 +137,12 @@ module Mobile
115
137
  include ::Thrift::Struct, ::Thrift::Struct_Union
116
138
  APP = 1
117
139
  VERSION = 2
140
+ DEVICEID = 3
118
141
 
119
142
  FIELDS = {
120
143
  APP => {:type => ::Thrift::Types::STRUCT, :name => 'app', :class => ::Mobile::Version::Thrift::AppDefinition},
121
- VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}
144
+ VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'},
145
+ DEVICEID => {:type => ::Thrift::Types::STRING, :name => 'deviceId'}
122
146
  }
123
147
 
124
148
  def struct_fields; FIELDS; end
@@ -249,6 +273,38 @@ module Mobile
249
273
  ::Thrift::Struct.generate_accessors self
250
274
  end
251
275
 
276
+ class QueryDeterminedAppProduct_args
277
+ include ::Thrift::Struct, ::Thrift::Struct_Union
278
+ APP = 1
279
+
280
+ FIELDS = {
281
+ APP => {:type => ::Thrift::Types::STRUCT, :name => 'app', :class => ::Mobile::Version::Thrift::AppDefinition}
282
+ }
283
+
284
+ def struct_fields; FIELDS; end
285
+
286
+ def validate
287
+ end
288
+
289
+ ::Thrift::Struct.generate_accessors self
290
+ end
291
+
292
+ class QueryDeterminedAppProduct_result
293
+ include ::Thrift::Struct, ::Thrift::Struct_Union
294
+ SUCCESS = 0
295
+
296
+ FIELDS = {
297
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Mobile::Version::Thrift::TransferData}
298
+ }
299
+
300
+ def struct_fields; FIELDS; end
301
+
302
+ def validate
303
+ end
304
+
305
+ ::Thrift::Struct.generate_accessors self
306
+ end
307
+
252
308
  end
253
309
 
254
310
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobile_version_thrift_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rick