Class: App42::ServiceAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/ServiceAPI.rb,
lib/App42_RUBY_SDK.rb

Constant Summary collapse

@@JSON_MIME_TYPE =
"application/json"
@@XML_MIME_TYPE =
"application/xml"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, secret_key) ⇒ ServiceAPI

Returns a new instance of ServiceAPI.



67
68
69
70
71
72
73
74
# File 'lib/ServiceAPI.rb', line 67

def initialize(api_key, secret_key)
  puts "Initializer Called "
  @api_key = api_key
  @secret_key = secret_key
  @base_url = "http://localhost:8082/App42_API_SERVER/cloud/"
  @content_type = "application/json"
  @accept = "application/json"
end

Instance Attribute Details

#acceptObject

Returns the value of attribute accept.



63
64
65
# File 'lib/ServiceAPI.rb', line 63

def accept
  @accept
end

#api_keyObject

Returns the value of attribute api_key.



63
64
65
# File 'lib/ServiceAPI.rb', line 63

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.



63
64
65
# File 'lib/ServiceAPI.rb', line 63

def base_url
  @base_url
end

#content_typeObject

Returns the value of attribute content_type.



63
64
65
# File 'lib/ServiceAPI.rb', line 63

def content_type
  @content_type
end

#secret_keyObject

Returns the value of attribute secret_key.



63
64
65
# File 'lib/ServiceAPI.rb', line 63

def secret_key
  @secret_key
end

Instance Method Details

#buildAlbumServiceObject



106
107
108
109
110
# File 'lib/ServiceAPI.rb', line 106

def buildAlbumService
  puts "Build Album service Called "
  album = App42::Gallery::AlbumService.new(api_key, secret_key, base_url)
  album
end

#buildBillServiceObject



202
203
204
205
206
# File 'lib/ServiceAPI.rb', line 202

def buildBillService
  puts "Build Bill service Called "
  bill = App42::AppTab::BillService.new(api_key, secret_key, base_url)
  bill
end

#buildCartServiceObject



154
155
156
157
158
# File 'lib/ServiceAPI.rb', line 154

def buildCartService
  puts "Build Cart Called "
  cart = App42::Shopping::CartService.new(api_key, secret_key, base_url)
  cart
end

#buildCatalogueServiceObject



178
179
180
181
182
# File 'lib/ServiceAPI.rb', line 178

def buildCatalogueService
  puts "Build Catalogue service Called "
  catalogue = App42::Shopping::CatalogueService.new(api_key, secret_key, base_url)
  catalogue
end

#buildDiscountServiceObject



238
239
240
241
242
# File 'lib/ServiceAPI.rb', line 238

def buildDiscountService
  puts "Build Discount service Called "
  discount = App42::AppTab::DiscountService.new(api_key, secret_key, base_url)
  discount
end

#buildEmailServiceObject



100
101
102
103
104
# File 'lib/ServiceAPI.rb', line 100

def buildEmailService
  puts "Build email service Called "
  email = App42::Email::EmailService.new(api_key, secret_key, base_url)
  email
end

#buildGameServiceObject



118
119
120
121
122
# File 'lib/ServiceAPI.rb', line 118

def buildGameService
  puts "Build Game service Called "
  game = App42::Game::GameService.new(api_key, secret_key, base_url)
  game
end

#buildGeoServiceObject



190
191
192
193
194
# File 'lib/ServiceAPI.rb', line 190

def buildGeoService
  puts "Build Geo service Called "
  geo = App42::Geo::GeoService.new(api_key, secret_key, base_url)
  geo
end

#buildImageProcessorServiceObject



172
173
174
175
176
# File 'lib/ServiceAPI.rb', line 172

def buildImageProcessorService
  puts "Build Image Processor service Called "
  image = App42::ImageProcessor::ImageProcessorService.new(api_key, secret_key, base_url)
  image
end

#buildLicenseServiceObject



208
209
210
211
212
# File 'lib/ServiceAPI.rb', line 208

def buildLicenseService
  puts "Build License service Called "
  license = App42::AppTab::LicenseService.new(api_key, secret_key, base_url)
  license
end

#buildLogServiceObject



184
185
186
187
188
# File 'lib/ServiceAPI.rb', line 184

def buildLogService
  puts "Build Log service Called "
  log = App42::Log::LogService.new(api_key, secret_key, base_url)
  log
end

#buildPackageServiceObject



232
233
234
235
236
# File 'lib/ServiceAPI.rb', line 232

def buildPackageService
  puts "Build Scheme service Called "
  package = App42::AppTab::PackageService.new(api_key, secret_key, base_url)
  package
end

#buildPhotoServiceObject



112
113
114
115
116
# File 'lib/ServiceAPI.rb', line 112

def buildPhotoService
  puts "Build Photo service Called "
  photo = App42::Gallery::PhotoService.new(api_key, secret_key, base_url)
  photo
end

#buildPushNotificationServiceObject



220
221
222
223
224
# File 'lib/ServiceAPI.rb', line 220

def buildPushNotificationService
  puts "Build Push Notification service Called "
  push = App42::Push::PushNotificationService.new(api_key, secret_key, base_url)
  push
end

#buildQueueServiceObject



142
143
144
145
146
# File 'lib/ServiceAPI.rb', line 142

def buildQueueService
  puts "Build Queue service Called "
  queue = App42::Message::QueueService.new(api_key, secret_key, base_url)
  queue
end

#buildRecommendServiceObject



196
197
198
199
200
# File 'lib/ServiceAPI.rb', line 196

def buildRecommendService
  puts "Build Recommender service Called "
  recommend = App42::Recommend::RecommenderService.new(api_key, secret_key, base_url)
  recommend
end

#buildReviewServiceObject



88
89
90
91
92
# File 'lib/ServiceAPI.rb', line 88

def buildReviewService
  puts "Build Review Called "
  review = App42::Review::ReviewService.new(api_key, secret_key, base_url)
  review
end

#buildRewardServiceObject



124
125
126
127
128
# File 'lib/ServiceAPI.rb', line 124

def buildRewardService
  puts "Build Reward service Called "
  reward = App42::Game::RewardService.new(api_key, secret_key, base_url)
  reward
end

#buildSchemeServiceObject



226
227
228
229
230
# File 'lib/ServiceAPI.rb', line 226

def buildSchemeService
  puts "Build Scheme service Called "
  scheme = App42::AppTab::SchemeService.new(api_key, secret_key, base_url)
  scheme
end

#buildScoreBoardServiceObject



130
131
132
133
134
# File 'lib/ServiceAPI.rb', line 130

def buildScoreBoardService
  puts "Build Score Board service Called "
  scoreboard = App42::Game::ScoreBoardService.new(api_key, secret_key, base_url)
  scoreboard
end

#buildScoreServiceObject



136
137
138
139
140
# File 'lib/ServiceAPI.rb', line 136

def buildScoreService
  puts "Build Score service Called "
  score = App42::Game::ScoreService.new(api_key, secret_key, base_url)
  score
end

#buildSessionServiceObject



82
83
84
85
86
# File 'lib/ServiceAPI.rb', line 82

def buildSessionService
  puts "Build Session Called "
  session = App42::Session::SessionService.new(api_key, secret_key, base_url)
  session
end

#buildSocialServiceObject



94
95
96
97
98
# File 'lib/ServiceAPI.rb', line 94

def buildSocialService
  puts "Build social Called "
  social = App42::Social::SocialService.new(api_key, secret_key, base_url)
  social
end

#buildStorageServiceObject



148
149
150
151
152
# File 'lib/ServiceAPI.rb', line 148

def buildStorageService
  puts "Build Storage service Called "
  storage = App42::Storage::StorageService.new(api_key, secret_key, base_url)
  storage
end

#buildUploadServiceObject



166
167
168
169
170
# File 'lib/ServiceAPI.rb', line 166

def buildUploadService
  puts "upload Storage service Called "
  upload = App42::Upload::UploadService.new(api_key, secret_key, base_url)
  upload
end

#buildUsageServiceObject



214
215
216
217
218
# File 'lib/ServiceAPI.rb', line 214

def buildUsageService
  puts "Build Usage service Called "
  usage = App42::AppTab::UsageService.new(api_key, secret_key, base_url)
  usage
end

#buildUserServiceObject



76
77
78
79
80
# File 'lib/ServiceAPI.rb', line 76

def buildUserService
  puts "Build User Called "
  user = App42::User::UserService.new(api_key, secret_key, base_url)
  user
end