Class: App42::ServiceAPI
- Inherits:
-
Object
- Object
- App42::ServiceAPI
- 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
-
#accept ⇒ Object
Returns the value of attribute accept.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
Instance Method Summary collapse
- #buildAlbumService ⇒ Object
- #buildBillService ⇒ Object
- #buildCartService ⇒ Object
- #buildCatalogueService ⇒ Object
- #buildDiscountService ⇒ Object
- #buildEmailService ⇒ Object
- #buildGameService ⇒ Object
- #buildGeoService ⇒ Object
- #buildImageProcessorService ⇒ Object
- #buildLicenseService ⇒ Object
- #buildLogService ⇒ Object
- #buildPackageService ⇒ Object
- #buildPhotoService ⇒ Object
- #buildPushNotificationService ⇒ Object
- #buildQueueService ⇒ Object
- #buildRecommendService ⇒ Object
- #buildReviewService ⇒ Object
- #buildRewardService ⇒ Object
- #buildSchemeService ⇒ Object
- #buildScoreBoardService ⇒ Object
- #buildScoreService ⇒ Object
- #buildSessionService ⇒ Object
- #buildSocialService ⇒ Object
- #buildStorageService ⇒ Object
- #buildUploadService ⇒ Object
- #buildUsageService ⇒ Object
- #buildUserService ⇒ Object
-
#initialize(api_key, secret_key) ⇒ ServiceAPI
constructor
A new instance of ServiceAPI.
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
#accept ⇒ Object
Returns the value of attribute accept.
63 64 65 |
# File 'lib/ServiceAPI.rb', line 63 def accept @accept end |
#api_key ⇒ Object
Returns the value of attribute api_key.
63 64 65 |
# File 'lib/ServiceAPI.rb', line 63 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
63 64 65 |
# File 'lib/ServiceAPI.rb', line 63 def base_url @base_url end |
#content_type ⇒ Object
Returns the value of attribute content_type.
63 64 65 |
# File 'lib/ServiceAPI.rb', line 63 def content_type @content_type end |
#secret_key ⇒ Object
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
#buildAlbumService ⇒ Object
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 |
#buildBillService ⇒ Object
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 |
#buildCartService ⇒ Object
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 |
#buildCatalogueService ⇒ Object
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 |
#buildDiscountService ⇒ Object
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 |
#buildEmailService ⇒ Object
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 |
#buildGameService ⇒ Object
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 |
#buildGeoService ⇒ Object
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 |
#buildImageProcessorService ⇒ Object
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 |
#buildLicenseService ⇒ Object
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 |
#buildLogService ⇒ Object
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 |
#buildPackageService ⇒ Object
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 |
#buildPhotoService ⇒ Object
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 |
#buildPushNotificationService ⇒ Object
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 |
#buildQueueService ⇒ Object
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 |
#buildRecommendService ⇒ Object
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 |
#buildReviewService ⇒ Object
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 |
#buildRewardService ⇒ Object
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 |
#buildSchemeService ⇒ Object
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 |
#buildScoreBoardService ⇒ Object
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 |
#buildScoreService ⇒ Object
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 |
#buildSessionService ⇒ Object
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 |
#buildSocialService ⇒ Object
94 95 96 97 98 |
# File 'lib/ServiceAPI.rb', line 94 def buildSocialService puts "Build social Called " = App42::Social::SocialService.new(api_key, secret_key, base_url) end |
#buildStorageService ⇒ Object
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 |
#buildUploadService ⇒ Object
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 |
#buildUsageService ⇒ Object
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 |
#buildUserService ⇒ Object
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 |