Class: App42RubyAPI::ServiceAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/App42_Ruby_API.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, secret_key) ⇒ ServiceAPI

Returns a new instance of ServiceAPI.


49
50
51
52
53
54
55
56
# File 'lib/App42_Ruby_API.rb', line 49

def initialize(api_key, secret_key)
  puts "Initializer Called "
  @api_key = api_key
  @secret_key = secret_key
  @base_url = "https://api.shephertz.com/cloud/"
  @content_type = JSON_MIME_TYPE
  @accept = JSON_MIME_TYPE
end

Instance Attribute Details

#acceptObject

Returns the value of attribute accept.


47
48
49
# File 'lib/App42_Ruby_API.rb', line 47

def accept
  @accept
end

#api_keyObject

Returns the value of attribute api_key.


47
48
49
# File 'lib/App42_Ruby_API.rb', line 47

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.


47
48
49
# File 'lib/App42_Ruby_API.rb', line 47

def base_url
  @base_url
end

#content_typeObject

Returns the value of attribute content_type.


47
48
49
# File 'lib/App42_Ruby_API.rb', line 47

def content_type
  @content_type
end

#secret_keyObject

Returns the value of attribute secret_key.


47
48
49
# File 'lib/App42_Ruby_API.rb', line 47

def secret_key
  @secret_key
end

Instance Method Details

#build_user_serviceObject


58
59
60
61
62
# File 'lib/App42_Ruby_API.rb', line 58

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

#buildAlbumServiceObject


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

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

#buildBillServiceObject


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

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

#buildCartServiceObject


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

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

#buildCatalogueServiceObject


160
161
162
163
164
# File 'lib/App42_Ruby_API.rb', line 160

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

#buildDiscountServiceObject


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

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

#buildEmailServiceObject


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

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

#buildGameServiceObject


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

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

#buildGeoServiceObject


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

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

#buildImageProcessorServiceObject


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

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

#buildLicenseServiceObject


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

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

#buildLogServiceObject


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

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

#buildPackageServiceObject


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

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

#buildPhotoServiceObject


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

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

#buildPushNotificationServiceObject


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

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

#buildQueueServiceObject


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

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

#buildRecommendServiceObject


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

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

#buildReviewServiceObject


70
71
72
73
74
# File 'lib/App42_Ruby_API.rb', line 70

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

#buildRewardServiceObject


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

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

#buildSchemeServiceObject


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

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

#buildScoreBoardServiceObject


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

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

#buildScoreServiceObject


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

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

#buildSessionServiceObject


64
65
66
67
68
# File 'lib/App42_Ruby_API.rb', line 64

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

#buildSocialServiceObject


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

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

#buildStorageServiceObject


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

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

#buildUploadServiceObject


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

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

#buildUsageServiceObject


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

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