Class: Sfeed::Feed

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/sfeed_types.rb

Constant Summary collapse

ALBUMID =
1
TRACKID =
2
UID =
3
ALBUMTITLE =
4
ALBUMCOVER =
5
LASTUPTRACKAT =
6
TYPE =
7
PLAYPATH32 =
8
PLAYPATH64 =
9
TRACKTYPE =
10
COUNT =
11
TIMELINE =
12
TRACKTITLE =
13
FIELDS =
{
  ALBUMID => {:type => ::Thrift::Types::I64, :name => 'albumId', :optional => true},
  TRACKID => {:type => ::Thrift::Types::I64, :name => 'trackId', :optional => true},
  UID => {:type => ::Thrift::Types::I64, :name => 'uid', :optional => true},
  ALBUMTITLE => {:type => ::Thrift::Types::STRING, :name => 'albumTitle', :optional => true},
  ALBUMCOVER => {:type => ::Thrift::Types::STRING, :name => 'albumCover', :optional => true},
  LASTUPTRACKAT => {:type => ::Thrift::Types::I64, :name => 'lastUptrackAt', :optional => true},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type'},
  PLAYPATH32 => {:type => ::Thrift::Types::STRING, :name => 'playPath32', :optional => true},
  PLAYPATH64 => {:type => ::Thrift::Types::STRING, :name => 'playPath64', :optional => true},
  TRACKTYPE => {:type => ::Thrift::Types::I32, :name => 'trackType', :optional => true},
  COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :optional => true},
  TIMELINE => {:type => ::Thrift::Types::DOUBLE, :name => 'timeline'},
  TRACKTITLE => {:type => ::Thrift::Types::STRING, :name => 'trackTitle', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



49
# File 'lib/sfeed_types.rb', line 49

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


51
52
53
54
# File 'lib/sfeed_types.rb', line 51

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timeline is unset!') unless @timeline
end