Subversion Repositories SmartDukaan

Rev

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

Rev 7977 Rev 8139
Line 780... Line 780...
780
    Parameters:
780
    Parameters:
781
     - cartEvents
781
     - cartEvents
782
    """
782
    """
783
    pass
783
    pass
784
 
784
 
-
 
785
  def getAmazonListedItems(self, offset, limit):
-
 
786
    """
-
 
787
    Parameters:
-
 
788
     - offset
-
 
789
     - limit
-
 
790
    """
-
 
791
    pass
-
 
792
 
785
 
793
 
786
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
794
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
787
  def __init__(self, iprot, oprot=None):
795
  def __init__(self, iprot, oprot=None):
788
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
796
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
789
 
797
 
Line 3992... Line 4000...
3992
    result = addCartEvent_result()
4000
    result = addCartEvent_result()
3993
    result.read(self._iprot)
4001
    result.read(self._iprot)
3994
    self._iprot.readMessageEnd()
4002
    self._iprot.readMessageEnd()
3995
    return
4003
    return
3996
 
4004
 
-
 
4005
  def getAmazonListedItems(self, offset, limit):
-
 
4006
    """
-
 
4007
    Parameters:
-
 
4008
     - offset
-
 
4009
     - limit
-
 
4010
    """
-
 
4011
    self.send_getAmazonListedItems(offset, limit)
-
 
4012
    return self.recv_getAmazonListedItems()
-
 
4013
 
-
 
4014
  def send_getAmazonListedItems(self, offset, limit):
-
 
4015
    self._oprot.writeMessageBegin('getAmazonListedItems', TMessageType.CALL, self._seqid)
-
 
4016
    args = getAmazonListedItems_args()
-
 
4017
    args.offset = offset
-
 
4018
    args.limit = limit
-
 
4019
    args.write(self._oprot)
-
 
4020
    self._oprot.writeMessageEnd()
-
 
4021
    self._oprot.trans.flush()
-
 
4022
 
-
 
4023
  def recv_getAmazonListedItems(self, ):
-
 
4024
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
4025
    if mtype == TMessageType.EXCEPTION:
-
 
4026
      x = TApplicationException()
-
 
4027
      x.read(self._iprot)
-
 
4028
      self._iprot.readMessageEnd()
-
 
4029
      raise x
-
 
4030
    result = getAmazonListedItems_result()
-
 
4031
    result.read(self._iprot)
-
 
4032
    self._iprot.readMessageEnd()
-
 
4033
    if result.success is not None:
-
 
4034
      return result.success
-
 
4035
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAmazonListedItems failed: unknown result");
-
 
4036
 
3997
 
4037
 
3998
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
4038
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3999
  def __init__(self, handler):
4039
  def __init__(self, handler):
4000
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
4040
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
4001
    self._processMap["addItem"] = Processor.process_addItem
4041
    self._processMap["addItem"] = Processor.process_addItem
Line 4098... Line 4138...
4098
    self._processMap["updateItemInventory"] = Processor.process_updateItemInventory
4138
    self._processMap["updateItemInventory"] = Processor.process_updateItemInventory
4099
    self._processMap["updateTimestampForAmazonFeeds"] = Processor.process_updateTimestampForAmazonFeeds
4139
    self._processMap["updateTimestampForAmazonFeeds"] = Processor.process_updateTimestampForAmazonFeeds
4100
    self._processMap["getAllParentCategories"] = Processor.process_getAllParentCategories
4140
    self._processMap["getAllParentCategories"] = Processor.process_getAllParentCategories
4101
    self._processMap["addPageViewEvent"] = Processor.process_addPageViewEvent
4141
    self._processMap["addPageViewEvent"] = Processor.process_addPageViewEvent
4102
    self._processMap["addCartEvent"] = Processor.process_addCartEvent
4142
    self._processMap["addCartEvent"] = Processor.process_addCartEvent
-
 
4143
    self._processMap["getAmazonListedItems"] = Processor.process_getAmazonListedItems
4103
 
4144
 
4104
  def process(self, iprot, oprot):
4145
  def process(self, iprot, oprot):
4105
    (name, type, seqid) = iprot.readMessageBegin()
4146
    (name, type, seqid) = iprot.readMessageBegin()
4106
    if name not in self._processMap:
4147
    if name not in self._processMap:
4107
      iprot.skip(TType.STRUCT)
4148
      iprot.skip(TType.STRUCT)
Line 5350... Line 5391...
5350
    oprot.writeMessageBegin("addCartEvent", TMessageType.REPLY, seqid)
5391
    oprot.writeMessageBegin("addCartEvent", TMessageType.REPLY, seqid)
5351
    result.write(oprot)
5392
    result.write(oprot)
5352
    oprot.writeMessageEnd()
5393
    oprot.writeMessageEnd()
5353
    oprot.trans.flush()
5394
    oprot.trans.flush()
5354
 
5395
 
-
 
5396
  def process_getAmazonListedItems(self, seqid, iprot, oprot):
-
 
5397
    args = getAmazonListedItems_args()
-
 
5398
    args.read(iprot)
-
 
5399
    iprot.readMessageEnd()
-
 
5400
    result = getAmazonListedItems_result()
-
 
5401
    result.success = self._handler.getAmazonListedItems(args.offset, args.limit)
-
 
5402
    oprot.writeMessageBegin("getAmazonListedItems", TMessageType.REPLY, seqid)
-
 
5403
    result.write(oprot)
-
 
5404
    oprot.writeMessageEnd()
-
 
5405
    oprot.trans.flush()
-
 
5406
 
5355
 
5407
 
5356
# HELPER FUNCTIONS AND STRUCTURES
5408
# HELPER FUNCTIONS AND STRUCTURES
5357
 
5409
 
5358
class addItem_args:
5410
class addItem_args:
5359
  """
5411
  """
Line 18639... Line 18691...
18639
    oprot.writeFieldStop()
18691
    oprot.writeFieldStop()
18640
    oprot.writeStructEnd()
18692
    oprot.writeStructEnd()
18641
 
18693
 
18642
  def validate(self):
18694
  def validate(self):
18643
    return
18695
    return
-
 
18696
 
-
 
18697
 
-
 
18698
  def __repr__(self):
-
 
18699
    L = ['%s=%r' % (key, value)
-
 
18700
      for key, value in self.__dict__.iteritems()]
-
 
18701
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18702
 
-
 
18703
  def __eq__(self, other):
-
 
18704
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18705
 
-
 
18706
  def __ne__(self, other):
-
 
18707
    return not (self == other)
-
 
18708
 
-
 
18709
class getAmazonListedItems_args:
-
 
18710
  """
-
 
18711
  Attributes:
-
 
18712
   - offset
-
 
18713
   - limit
-
 
18714
  """
-
 
18715
 
-
 
18716
  thrift_spec = (
-
 
18717
    None, # 0
-
 
18718
    (1, TType.I64, 'offset', None, None, ), # 1
-
 
18719
    (2, TType.I64, 'limit', None, None, ), # 2
-
 
18720
  )
-
 
18721
 
-
 
18722
  def __init__(self, offset=None, limit=None,):
-
 
18723
    self.offset = offset
-
 
18724
    self.limit = limit
-
 
18725
 
-
 
18726
  def read(self, iprot):
-
 
18727
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18728
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18729
      return
-
 
18730
    iprot.readStructBegin()
-
 
18731
    while True:
-
 
18732
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18733
      if ftype == TType.STOP:
-
 
18734
        break
-
 
18735
      if fid == 1:
-
 
18736
        if ftype == TType.I64:
-
 
18737
          self.offset = iprot.readI64();
-
 
18738
        else:
-
 
18739
          iprot.skip(ftype)
-
 
18740
      elif fid == 2:
-
 
18741
        if ftype == TType.I64:
-
 
18742
          self.limit = iprot.readI64();
-
 
18743
        else:
-
 
18744
          iprot.skip(ftype)
-
 
18745
      else:
-
 
18746
        iprot.skip(ftype)
-
 
18747
      iprot.readFieldEnd()
-
 
18748
    iprot.readStructEnd()
-
 
18749
 
-
 
18750
  def write(self, oprot):
-
 
18751
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18752
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18753
      return
-
 
18754
    oprot.writeStructBegin('getAmazonListedItems_args')
-
 
18755
    if self.offset is not None:
-
 
18756
      oprot.writeFieldBegin('offset', TType.I64, 1)
-
 
18757
      oprot.writeI64(self.offset)
-
 
18758
      oprot.writeFieldEnd()
-
 
18759
    if self.limit is not None:
-
 
18760
      oprot.writeFieldBegin('limit', TType.I64, 2)
-
 
18761
      oprot.writeI64(self.limit)
-
 
18762
      oprot.writeFieldEnd()
-
 
18763
    oprot.writeFieldStop()
-
 
18764
    oprot.writeStructEnd()
-
 
18765
 
-
 
18766
  def validate(self):
-
 
18767
    return
-
 
18768
 
-
 
18769
 
-
 
18770
  def __repr__(self):
-
 
18771
    L = ['%s=%r' % (key, value)
-
 
18772
      for key, value in self.__dict__.iteritems()]
-
 
18773
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18774
 
-
 
18775
  def __eq__(self, other):
-
 
18776
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18777
 
-
 
18778
  def __ne__(self, other):
-
 
18779
    return not (self == other)
-
 
18780
 
-
 
18781
class getAmazonListedItems_result:
-
 
18782
  """
-
 
18783
  Attributes:
-
 
18784
   - success
-
 
18785
  """
-
 
18786
 
-
 
18787
  thrift_spec = (
-
 
18788
    (0, TType.LIST, 'success', (TType.STRUCT,(Amazonlisted, Amazonlisted.thrift_spec)), None, ), # 0
-
 
18789
  )
-
 
18790
 
-
 
18791
  def __init__(self, success=None,):
-
 
18792
    self.success = success
-
 
18793
 
-
 
18794
  def read(self, iprot):
-
 
18795
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18796
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18797
      return
-
 
18798
    iprot.readStructBegin()
-
 
18799
    while True:
-
 
18800
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18801
      if ftype == TType.STOP:
-
 
18802
        break
-
 
18803
      if fid == 0:
-
 
18804
        if ftype == TType.LIST:
-
 
18805
          self.success = []
-
 
18806
          (_etype382, _size379) = iprot.readListBegin()
-
 
18807
          for _i383 in xrange(_size379):
-
 
18808
            _elem384 = Amazonlisted()
-
 
18809
            _elem384.read(iprot)
-
 
18810
            self.success.append(_elem384)
-
 
18811
          iprot.readListEnd()
-
 
18812
        else:
-
 
18813
          iprot.skip(ftype)
-
 
18814
      else:
-
 
18815
        iprot.skip(ftype)
-
 
18816
      iprot.readFieldEnd()
-
 
18817
    iprot.readStructEnd()
-
 
18818
 
-
 
18819
  def write(self, oprot):
-
 
18820
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18821
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18822
      return
-
 
18823
    oprot.writeStructBegin('getAmazonListedItems_result')
-
 
18824
    if self.success is not None:
-
 
18825
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
18826
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
18827
      for iter385 in self.success:
-
 
18828
        iter385.write(oprot)
-
 
18829
      oprot.writeListEnd()
-
 
18830
      oprot.writeFieldEnd()
-
 
18831
    oprot.writeFieldStop()
-
 
18832
    oprot.writeStructEnd()
-
 
18833
 
-
 
18834
  def validate(self):
-
 
18835
    return
18644
 
18836
 
18645
 
18837
 
18646
  def __repr__(self):
18838
  def __repr__(self):
18647
    L = ['%s=%r' % (key, value)
18839
    L = ['%s=%r' % (key, value)
18648
      for key, value in self.__dict__.iteritems()]
18840
      for key, value in self.__dict__.iteritems()]