activity_thrift_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8abd4bd1cfa8764ad9c91a6b53747662b841a19f
4
+ data.tar.gz: 856b04501961d122de1b0d465f2216a33998020a
5
+ SHA512:
6
+ metadata.gz: 2d0275f35f4a24fffa8ab59bacedb888cf2effae816eca3dd7eb35e33974f903373737e8cd5c57f51e965350b9ae464288a3cb78702ba9ce59e8dd1ea618b111
7
+ data.tar.gz: e3437d1798985d4ed4983e48c47cc324b28b68c4d95077c700215619655297620fbd74e0f5b4c9393537e981840e0848bb98b3b76f48dd4e506487490b66ad37
@@ -0,0 +1,137 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'thrift_activity_service_types'
9
+
10
+ module Activity
11
+ module Thrift
12
+ module ThriftActivityService
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def getActivityInfo()
17
+ send_getActivityInfo()
18
+ return recv_getActivityInfo()
19
+ end
20
+
21
+ def send_getActivityInfo()
22
+ send_message('getActivityInfo', GetActivityInfo_args)
23
+ end
24
+
25
+ def recv_getActivityInfo()
26
+ result = receive_message(GetActivityInfo_result)
27
+ return result.success unless result.success.nil?
28
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getActivityInfo failed: unknown result')
29
+ end
30
+
31
+ def getTemplate(activityId, templateType)
32
+ send_getTemplate(activityId, templateType)
33
+ return recv_getTemplate()
34
+ end
35
+
36
+ def send_getTemplate(activityId, templateType)
37
+ send_message('getTemplate', GetTemplate_args, :activityId => activityId, :templateType => templateType)
38
+ end
39
+
40
+ def recv_getTemplate()
41
+ result = receive_message(GetTemplate_result)
42
+ return result.success unless result.success.nil?
43
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTemplate failed: unknown result')
44
+ end
45
+
46
+ end
47
+
48
+ class Processor
49
+ include ::Thrift::Processor
50
+
51
+ def process_getActivityInfo(seqid, iprot, oprot)
52
+ args = read_args(iprot, GetActivityInfo_args)
53
+ result = GetActivityInfo_result.new()
54
+ result.success = @handler.getActivityInfo()
55
+ write_result(result, oprot, 'getActivityInfo', seqid)
56
+ end
57
+
58
+ def process_getTemplate(seqid, iprot, oprot)
59
+ args = read_args(iprot, GetTemplate_args)
60
+ result = GetTemplate_result.new()
61
+ result.success = @handler.getTemplate(args.activityId, args.templateType)
62
+ write_result(result, oprot, 'getTemplate', seqid)
63
+ end
64
+
65
+ end
66
+
67
+ # HELPER FUNCTIONS AND STRUCTURES
68
+
69
+ class GetActivityInfo_args
70
+ include ::Thrift::Struct, ::Thrift::Struct_Union
71
+
72
+ FIELDS = {
73
+
74
+ }
75
+
76
+ def struct_fields; FIELDS; end
77
+
78
+ def validate
79
+ end
80
+
81
+ ::Thrift::Struct.generate_accessors self
82
+ end
83
+
84
+ class GetActivityInfo_result
85
+ include ::Thrift::Struct, ::Thrift::Struct_Union
86
+ SUCCESS = 0
87
+
88
+ FIELDS = {
89
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Activity::Thrift::ActivityInfo}}
90
+ }
91
+
92
+ def struct_fields; FIELDS; end
93
+
94
+ def validate
95
+ end
96
+
97
+ ::Thrift::Struct.generate_accessors self
98
+ end
99
+
100
+ class GetTemplate_args
101
+ include ::Thrift::Struct, ::Thrift::Struct_Union
102
+ ACTIVITYID = 1
103
+ TEMPLATETYPE = 2
104
+
105
+ FIELDS = {
106
+ ACTIVITYID => {:type => ::Thrift::Types::I64, :name => 'activityId'},
107
+ TEMPLATETYPE => {:type => ::Thrift::Types::I16, :name => 'templateType'}
108
+ }
109
+
110
+ def struct_fields; FIELDS; end
111
+
112
+ def validate
113
+ end
114
+
115
+ ::Thrift::Struct.generate_accessors self
116
+ end
117
+
118
+ class GetTemplate_result
119
+ include ::Thrift::Struct, ::Thrift::Struct_Union
120
+ SUCCESS = 0
121
+
122
+ FIELDS = {
123
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
124
+ }
125
+
126
+ def struct_fields; FIELDS; end
127
+
128
+ def validate
129
+ end
130
+
131
+ ::Thrift::Struct.generate_accessors self
132
+ end
133
+
134
+ end
135
+
136
+ end
137
+ end
@@ -0,0 +1,13 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'thrift_activity_service_types'
9
+
10
+ module Activity
11
+ module Thrift
12
+ end
13
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module Activity
10
+ module Thrift
11
+ class ActivityInfo
12
+ include ::Thrift::Struct, ::Thrift::Struct_Union
13
+ ACTIVITY_ID = 1
14
+ ACTIVITY_NAME = 2
15
+
16
+ FIELDS = {
17
+ ACTIVITY_ID => {:type => ::Thrift::Types::I64, :name => 'activity_id'},
18
+ ACTIVITY_NAME => {:type => ::Thrift::Types::STRING, :name => 'activity_name'}
19
+ }
20
+
21
+ def struct_fields; FIELDS; end
22
+
23
+ def validate
24
+ end
25
+
26
+ ::Thrift::Struct.generate_accessors self
27
+ end
28
+
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activity_thrift_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - rick
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-22 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/thrift_activity_service.rb
20
+ - lib/thrift_activity_service_constants.rb
21
+ - lib/thrift_activity_service_types.rb
22
+ homepage:
23
+ licenses: []
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.0.3
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: activity_thrift_client is a thrift client of activity-configuration-service
45
+ test_files: []