2015-07-22 07:39:48 +00:00
|
|
|
# Common files
|
|
|
|
require 'petstore/api_client'
|
|
|
|
require 'petstore/api_error'
|
|
|
|
require 'petstore/version'
|
2015-08-14 08:19:43 +00:00
|
|
|
require 'petstore/configuration'
|
2015-06-26 09:15:14 +00:00
|
|
|
|
|
|
|
# Models
|
|
|
|
require 'petstore/models/base_object'
|
|
|
|
require 'petstore/models/user'
|
|
|
|
require 'petstore/models/category'
|
|
|
|
require 'petstore/models/pet'
|
|
|
|
require 'petstore/models/tag'
|
|
|
|
require 'petstore/models/order'
|
|
|
|
|
|
|
|
# APIs
|
|
|
|
require 'petstore/api/user_api'
|
2015-10-20 17:31:42 +00:00
|
|
|
require 'petstore/api/store_api'
|
2015-11-05 12:02:09 +00:00
|
|
|
require 'petstore/api/pet_api'
|
2015-06-26 09:15:14 +00:00
|
|
|
|
|
|
|
module Petstore
|
2015-08-14 08:19:43 +00:00
|
|
|
class << self
|
|
|
|
# Configure sdk using block.
|
|
|
|
# Petstore.configure do |config|
|
|
|
|
# config.username = "xxx"
|
|
|
|
# config.password = "xxx"
|
|
|
|
# end
|
|
|
|
# If no block given, return the configuration singleton instance.
|
|
|
|
def configure
|
|
|
|
if block_given?
|
|
|
|
yield Configuration.instance
|
|
|
|
else
|
|
|
|
Configuration.instance
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-06-26 09:15:14 +00:00
|
|
|
end
|