SDKs
Ruby SDK
Official Ruby client for the MUDBASE API.
Installation
bash
gem install mudbasegem install mudbaseSource: mudbase-sdk-ruby on GitHub
Quick Start
Configure Mudbase plus the API classes you need - there is no unified client wrapper:
ruby
require 'mudbase'
Mudbase.configure do |config|
config.scheme = 'https'
config.host = 'cloud.mudbase.dev'
config.api_key['ApiKeyAuth'] = ENV['MUDBASE_API_KEY']
end
auth = Mudbase::AuthenticationApi.new
data = Mudbase::DataApi.new
# Log in an end-user of your project
login_request = Mudbase::LoginRequest.new({email: 'morgan.chen@northwind.dev', password: 'hunter2'})
session = auth.login_user(login_request)
# List documents in a collection
items = data.list_data(project_id, collection_id)require 'mudbase'
Mudbase.configure do |config|
config.scheme = 'https'
config.host = 'cloud.mudbase.dev'
config.api_key['ApiKeyAuth'] = ENV['MUDBASE_API_KEY']
end
auth = Mudbase::AuthenticationApi.new
data = Mudbase::DataApi.new
# Log in an end-user of your project
login_request = Mudbase::LoginRequest.new({email: 'morgan.chen@northwind.dev', password: 'hunter2'})
session = auth.login_user(login_request)
# List documents in a collection
items = data.list_data(project_id, collection_id)More
For installation in other languages, error handling, and pagination, see the SDKs Overview.