Subversion Repositories SmartDukaan

Rev

Rev 12133 | Rev 12256 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12133 Rev 12243
Line 1201... Line 1201...
1201
    pass
1201
    pass
1202
 
1202
 
1203
  def getAllFlipkartMarketplaceItem(self, ):
1203
  def getAllFlipkartMarketplaceItem(self, ):
1204
    pass
1204
    pass
1205
 
1205
 
-
 
1206
  def addCompetitorScraping(self, competitorPricingMap):
-
 
1207
    """
-
 
1208
    Parameters:
-
 
1209
     - competitorPricingMap
-
 
1210
    """
-
 
1211
    pass
-
 
1212
 
-
 
1213
  def getPreviousCompetitorScraping(self, delta):
-
 
1214
    """
-
 
1215
    Parameters:
-
 
1216
     - delta
-
 
1217
    """
-
 
1218
    pass
-
 
1219
 
1206
 
1220
 
1207
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1221
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1208
  def __init__(self, iprot, oprot=None):
1222
  def __init__(self, iprot, oprot=None):
1209
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1223
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1210
 
1224
 
Line 6370... Line 6384...
6370
    self._iprot.readMessageEnd()
6384
    self._iprot.readMessageEnd()
6371
    if result.success is not None:
6385
    if result.success is not None:
6372
      return result.success
6386
      return result.success
6373
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFlipkartMarketplaceItem failed: unknown result");
6387
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFlipkartMarketplaceItem failed: unknown result");
6374
 
6388
 
-
 
6389
  def addCompetitorScraping(self, competitorPricingMap):
-
 
6390
    """
-
 
6391
    Parameters:
-
 
6392
     - competitorPricingMap
-
 
6393
    """
-
 
6394
    self.send_addCompetitorScraping(competitorPricingMap)
-
 
6395
    self.recv_addCompetitorScraping()
-
 
6396
 
-
 
6397
  def send_addCompetitorScraping(self, competitorPricingMap):
-
 
6398
    self._oprot.writeMessageBegin('addCompetitorScraping', TMessageType.CALL, self._seqid)
-
 
6399
    args = addCompetitorScraping_args()
-
 
6400
    args.competitorPricingMap = competitorPricingMap
-
 
6401
    args.write(self._oprot)
-
 
6402
    self._oprot.writeMessageEnd()
-
 
6403
    self._oprot.trans.flush()
-
 
6404
 
-
 
6405
  def recv_addCompetitorScraping(self, ):
-
 
6406
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6407
    if mtype == TMessageType.EXCEPTION:
-
 
6408
      x = TApplicationException()
-
 
6409
      x.read(self._iprot)
-
 
6410
      self._iprot.readMessageEnd()
-
 
6411
      raise x
-
 
6412
    result = addCompetitorScraping_result()
-
 
6413
    result.read(self._iprot)
-
 
6414
    self._iprot.readMessageEnd()
-
 
6415
    return
-
 
6416
 
-
 
6417
  def getPreviousCompetitorScraping(self, delta):
-
 
6418
    """
-
 
6419
    Parameters:
-
 
6420
     - delta
-
 
6421
    """
-
 
6422
    self.send_getPreviousCompetitorScraping(delta)
-
 
6423
    return self.recv_getPreviousCompetitorScraping()
-
 
6424
 
-
 
6425
  def send_getPreviousCompetitorScraping(self, delta):
-
 
6426
    self._oprot.writeMessageBegin('getPreviousCompetitorScraping', TMessageType.CALL, self._seqid)
-
 
6427
    args = getPreviousCompetitorScraping_args()
-
 
6428
    args.delta = delta
-
 
6429
    args.write(self._oprot)
-
 
6430
    self._oprot.writeMessageEnd()
-
 
6431
    self._oprot.trans.flush()
-
 
6432
 
-
 
6433
  def recv_getPreviousCompetitorScraping(self, ):
-
 
6434
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6435
    if mtype == TMessageType.EXCEPTION:
-
 
6436
      x = TApplicationException()
-
 
6437
      x.read(self._iprot)
-
 
6438
      self._iprot.readMessageEnd()
-
 
6439
      raise x
-
 
6440
    result = getPreviousCompetitorScraping_result()
-
 
6441
    result.read(self._iprot)
-
 
6442
    self._iprot.readMessageEnd()
-
 
6443
    if result.success is not None:
-
 
6444
      return result.success
-
 
6445
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPreviousCompetitorScraping failed: unknown result");
-
 
6446
 
6375
 
6447
 
6376
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6448
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6377
  def __init__(self, handler):
6449
  def __init__(self, handler):
6378
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6450
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6379
    self._processMap["addItem"] = Processor.process_addItem
6451
    self._processMap["addItem"] = Processor.process_addItem
Line 6543... Line 6615...
6543
    self._processMap["getPrivateDealsCount"] = Processor.process_getPrivateDealsCount
6615
    self._processMap["getPrivateDealsCount"] = Processor.process_getPrivateDealsCount
6544
    self._processMap["getAmazonOutSyncItems"] = Processor.process_getAmazonOutSyncItems
6616
    self._processMap["getAmazonOutSyncItems"] = Processor.process_getAmazonOutSyncItems
6545
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
6617
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
6546
    self._processMap["getAllSnapdealMarketplaceItem"] = Processor.process_getAllSnapdealMarketplaceItem
6618
    self._processMap["getAllSnapdealMarketplaceItem"] = Processor.process_getAllSnapdealMarketplaceItem
6547
    self._processMap["getAllFlipkartMarketplaceItem"] = Processor.process_getAllFlipkartMarketplaceItem
6619
    self._processMap["getAllFlipkartMarketplaceItem"] = Processor.process_getAllFlipkartMarketplaceItem
-
 
6620
    self._processMap["addCompetitorScraping"] = Processor.process_addCompetitorScraping
-
 
6621
    self._processMap["getPreviousCompetitorScraping"] = Processor.process_getPreviousCompetitorScraping
6548
 
6622
 
6549
  def process(self, iprot, oprot):
6623
  def process(self, iprot, oprot):
6550
    (name, type, seqid) = iprot.readMessageBegin()
6624
    (name, type, seqid) = iprot.readMessageBegin()
6551
    if name not in self._processMap:
6625
    if name not in self._processMap:
6552
      iprot.skip(TType.STRUCT)
6626
      iprot.skip(TType.STRUCT)
Line 8550... Line 8624...
8550
    oprot.writeMessageBegin("getAllFlipkartMarketplaceItem", TMessageType.REPLY, seqid)
8624
    oprot.writeMessageBegin("getAllFlipkartMarketplaceItem", TMessageType.REPLY, seqid)
8551
    result.write(oprot)
8625
    result.write(oprot)
8552
    oprot.writeMessageEnd()
8626
    oprot.writeMessageEnd()
8553
    oprot.trans.flush()
8627
    oprot.trans.flush()
8554
 
8628
 
-
 
8629
  def process_addCompetitorScraping(self, seqid, iprot, oprot):
-
 
8630
    args = addCompetitorScraping_args()
-
 
8631
    args.read(iprot)
-
 
8632
    iprot.readMessageEnd()
-
 
8633
    result = addCompetitorScraping_result()
-
 
8634
    self._handler.addCompetitorScraping(args.competitorPricingMap)
-
 
8635
    oprot.writeMessageBegin("addCompetitorScraping", TMessageType.REPLY, seqid)
-
 
8636
    result.write(oprot)
-
 
8637
    oprot.writeMessageEnd()
-
 
8638
    oprot.trans.flush()
-
 
8639
 
-
 
8640
  def process_getPreviousCompetitorScraping(self, seqid, iprot, oprot):
-
 
8641
    args = getPreviousCompetitorScraping_args()
-
 
8642
    args.read(iprot)
-
 
8643
    iprot.readMessageEnd()
-
 
8644
    result = getPreviousCompetitorScraping_result()
-
 
8645
    result.success = self._handler.getPreviousCompetitorScraping(args.delta)
-
 
8646
    oprot.writeMessageBegin("getPreviousCompetitorScraping", TMessageType.REPLY, seqid)
-
 
8647
    result.write(oprot)
-
 
8648
    oprot.writeMessageEnd()
-
 
8649
    oprot.trans.flush()
-
 
8650
 
8555
 
8651
 
8556
# HELPER FUNCTIONS AND STRUCTURES
8652
# HELPER FUNCTIONS AND STRUCTURES
8557
 
8653
 
8558
class addItem_args:
8654
class addItem_args:
8559
  """
8655
  """
Line 30026... Line 30122...
30026
      oprot.writeListEnd()
30122
      oprot.writeListEnd()
30027
      oprot.writeFieldEnd()
30123
      oprot.writeFieldEnd()
30028
    oprot.writeFieldStop()
30124
    oprot.writeFieldStop()
30029
    oprot.writeStructEnd()
30125
    oprot.writeStructEnd()
30030
 
30126
 
-
 
30127
  def validate(self):
-
 
30128
    return
-
 
30129
 
-
 
30130
 
-
 
30131
  def __repr__(self):
-
 
30132
    L = ['%s=%r' % (key, value)
-
 
30133
      for key, value in self.__dict__.iteritems()]
-
 
30134
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30135
 
-
 
30136
  def __eq__(self, other):
-
 
30137
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30138
 
-
 
30139
  def __ne__(self, other):
-
 
30140
    return not (self == other)
-
 
30141
 
-
 
30142
class addCompetitorScraping_args:
-
 
30143
  """
-
 
30144
  Attributes:
-
 
30145
   - competitorPricingMap
-
 
30146
  """
-
 
30147
 
-
 
30148
  thrift_spec = (
-
 
30149
    None, # 0
-
 
30150
    (1, TType.MAP, 'competitorPricingMap', (TType.I64,None,TType.STRUCT,(CompetitorPricing, CompetitorPricing.thrift_spec)), None, ), # 1
-
 
30151
  )
-
 
30152
 
-
 
30153
  def __init__(self, competitorPricingMap=None,):
-
 
30154
    self.competitorPricingMap = competitorPricingMap
-
 
30155
 
-
 
30156
  def read(self, iprot):
-
 
30157
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30158
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30159
      return
-
 
30160
    iprot.readStructBegin()
-
 
30161
    while True:
-
 
30162
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30163
      if ftype == TType.STOP:
-
 
30164
        break
-
 
30165
      if fid == 1:
-
 
30166
        if ftype == TType.MAP:
-
 
30167
          self.competitorPricingMap = {}
-
 
30168
          (_ktype700, _vtype701, _size699 ) = iprot.readMapBegin() 
-
 
30169
          for _i703 in xrange(_size699):
-
 
30170
            _key704 = iprot.readI64();
-
 
30171
            _val705 = CompetitorPricing()
-
 
30172
            _val705.read(iprot)
-
 
30173
            self.competitorPricingMap[_key704] = _val705
-
 
30174
          iprot.readMapEnd()
-
 
30175
        else:
-
 
30176
          iprot.skip(ftype)
-
 
30177
      else:
-
 
30178
        iprot.skip(ftype)
-
 
30179
      iprot.readFieldEnd()
-
 
30180
    iprot.readStructEnd()
-
 
30181
 
-
 
30182
  def write(self, oprot):
-
 
30183
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30184
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30185
      return
-
 
30186
    oprot.writeStructBegin('addCompetitorScraping_args')
-
 
30187
    if self.competitorPricingMap is not None:
-
 
30188
      oprot.writeFieldBegin('competitorPricingMap', TType.MAP, 1)
-
 
30189
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.competitorPricingMap))
-
 
30190
      for kiter706,viter707 in self.competitorPricingMap.items():
-
 
30191
        oprot.writeI64(kiter706)
-
 
30192
        viter707.write(oprot)
-
 
30193
      oprot.writeMapEnd()
-
 
30194
      oprot.writeFieldEnd()
-
 
30195
    oprot.writeFieldStop()
-
 
30196
    oprot.writeStructEnd()
-
 
30197
 
-
 
30198
  def validate(self):
-
 
30199
    return
-
 
30200
 
-
 
30201
 
-
 
30202
  def __repr__(self):
-
 
30203
    L = ['%s=%r' % (key, value)
-
 
30204
      for key, value in self.__dict__.iteritems()]
-
 
30205
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30206
 
-
 
30207
  def __eq__(self, other):
-
 
30208
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30209
 
-
 
30210
  def __ne__(self, other):
-
 
30211
    return not (self == other)
-
 
30212
 
-
 
30213
class addCompetitorScraping_result:
-
 
30214
 
-
 
30215
  thrift_spec = (
-
 
30216
  )
-
 
30217
 
-
 
30218
  def read(self, iprot):
-
 
30219
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30220
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30221
      return
-
 
30222
    iprot.readStructBegin()
-
 
30223
    while True:
-
 
30224
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30225
      if ftype == TType.STOP:
-
 
30226
        break
-
 
30227
      else:
-
 
30228
        iprot.skip(ftype)
-
 
30229
      iprot.readFieldEnd()
-
 
30230
    iprot.readStructEnd()
-
 
30231
 
-
 
30232
  def write(self, oprot):
-
 
30233
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30234
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30235
      return
-
 
30236
    oprot.writeStructBegin('addCompetitorScraping_result')
-
 
30237
    oprot.writeFieldStop()
-
 
30238
    oprot.writeStructEnd()
-
 
30239
 
-
 
30240
  def validate(self):
-
 
30241
    return
-
 
30242
 
-
 
30243
 
-
 
30244
  def __repr__(self):
-
 
30245
    L = ['%s=%r' % (key, value)
-
 
30246
      for key, value in self.__dict__.iteritems()]
-
 
30247
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30248
 
-
 
30249
  def __eq__(self, other):
-
 
30250
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30251
 
-
 
30252
  def __ne__(self, other):
-
 
30253
    return not (self == other)
-
 
30254
 
-
 
30255
class getPreviousCompetitorScraping_args:
-
 
30256
  """
-
 
30257
  Attributes:
-
 
30258
   - delta
-
 
30259
  """
-
 
30260
 
-
 
30261
  thrift_spec = (
-
 
30262
    None, # 0
-
 
30263
    (1, TType.I64, 'delta', None, None, ), # 1
-
 
30264
  )
-
 
30265
 
-
 
30266
  def __init__(self, delta=None,):
-
 
30267
    self.delta = delta
-
 
30268
 
-
 
30269
  def read(self, iprot):
-
 
30270
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30271
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30272
      return
-
 
30273
    iprot.readStructBegin()
-
 
30274
    while True:
-
 
30275
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30276
      if ftype == TType.STOP:
-
 
30277
        break
-
 
30278
      if fid == 1:
-
 
30279
        if ftype == TType.I64:
-
 
30280
          self.delta = iprot.readI64();
-
 
30281
        else:
-
 
30282
          iprot.skip(ftype)
-
 
30283
      else:
-
 
30284
        iprot.skip(ftype)
-
 
30285
      iprot.readFieldEnd()
-
 
30286
    iprot.readStructEnd()
-
 
30287
 
-
 
30288
  def write(self, oprot):
-
 
30289
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30290
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30291
      return
-
 
30292
    oprot.writeStructBegin('getPreviousCompetitorScraping_args')
-
 
30293
    if self.delta is not None:
-
 
30294
      oprot.writeFieldBegin('delta', TType.I64, 1)
-
 
30295
      oprot.writeI64(self.delta)
-
 
30296
      oprot.writeFieldEnd()
-
 
30297
    oprot.writeFieldStop()
-
 
30298
    oprot.writeStructEnd()
-
 
30299
 
-
 
30300
  def validate(self):
-
 
30301
    return
-
 
30302
 
-
 
30303
 
-
 
30304
  def __repr__(self):
-
 
30305
    L = ['%s=%r' % (key, value)
-
 
30306
      for key, value in self.__dict__.iteritems()]
-
 
30307
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30308
 
-
 
30309
  def __eq__(self, other):
-
 
30310
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30311
 
-
 
30312
  def __ne__(self, other):
-
 
30313
    return not (self == other)
-
 
30314
 
-
 
30315
class getPreviousCompetitorScraping_result:
-
 
30316
  """
-
 
30317
  Attributes:
-
 
30318
   - success
-
 
30319
  """
-
 
30320
 
-
 
30321
  thrift_spec = (
-
 
30322
    (0, TType.LIST, 'success', (TType.STRUCT,(CompetitorPricing, CompetitorPricing.thrift_spec)), None, ), # 0
-
 
30323
  )
-
 
30324
 
-
 
30325
  def __init__(self, success=None,):
-
 
30326
    self.success = success
-
 
30327
 
-
 
30328
  def read(self, iprot):
-
 
30329
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30330
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30331
      return
-
 
30332
    iprot.readStructBegin()
-
 
30333
    while True:
-
 
30334
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30335
      if ftype == TType.STOP:
-
 
30336
        break
-
 
30337
      if fid == 0:
-
 
30338
        if ftype == TType.LIST:
-
 
30339
          self.success = []
-
 
30340
          (_etype711, _size708) = iprot.readListBegin()
-
 
30341
          for _i712 in xrange(_size708):
-
 
30342
            _elem713 = CompetitorPricing()
-
 
30343
            _elem713.read(iprot)
-
 
30344
            self.success.append(_elem713)
-
 
30345
          iprot.readListEnd()
-
 
30346
        else:
-
 
30347
          iprot.skip(ftype)
-
 
30348
      else:
-
 
30349
        iprot.skip(ftype)
-
 
30350
      iprot.readFieldEnd()
-
 
30351
    iprot.readStructEnd()
-
 
30352
 
-
 
30353
  def write(self, oprot):
-
 
30354
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30355
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30356
      return
-
 
30357
    oprot.writeStructBegin('getPreviousCompetitorScraping_result')
-
 
30358
    if self.success is not None:
-
 
30359
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
30360
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
30361
      for iter714 in self.success:
-
 
30362
        iter714.write(oprot)
-
 
30363
      oprot.writeListEnd()
-
 
30364
      oprot.writeFieldEnd()
-
 
30365
    oprot.writeFieldStop()
-
 
30366
    oprot.writeStructEnd()
-
 
30367
 
30031
  def validate(self):
30368
  def validate(self):
30032
    return
30369
    return
30033
 
30370
 
30034
 
30371
 
30035
  def __repr__(self):
30372
  def __repr__(self):