class ChinoAPI

Class which contains every Chino.io resource as objects. In this way if you create a 'client' variable of this class, it will contain every function for the creation, update, retrieval… of every resource. Every function is easily accessible as follow:

name_of_the_client_variable.name_of_the_resource.name_of_the_function()

Example of the creation of a Repository

@client = ChinoAPI.new(...)
@client.repositories.create_repository(...)

Attributes

applications[RW]
auth[RW]
blobs[RW]
collections[RW]
documents[RW]
groups[RW]
permissions[RW]
repositories[RW]
schemas[RW]
user_schemas[RW]
users[RW]

Public Class Methods

new(customer_id, customer_key, host_url) click to toggle source

Use this function to initialize your client variable

  • customer_id: your customer id value

  • customer_key: your customer key value

  • host_url: the url of the server, use 'api.test.chino.io/v1' for development and 'api.chino.io/v1' for the production

# File lib/chino_ruby.rb, line 47
def initialize(customer_id, customer_key, host_url)
    check_string(customer_id)
    check_string(customer_key)
    check_string(host_url)
    @customer_id = customer_id
    @customer_key = customer_key
    @host_url = host_url
    @applications = ChinoRuby::Applications.new(@customer_id, @customer_key, @host_url)
    @auth = ChinoRuby::Auth.new(@customer_id, @customer_key, @host_url)
    @repositories = ChinoRuby::Repositories.new(@customer_id, @customer_key, @host_url)
    @schemas = ChinoRuby::Schemas.new(@customer_id, @customer_key, @host_url)
    @documents = ChinoRuby::Documents.new(@customer_id, @customer_key, @host_url)
    @user_schemas = ChinoRuby::UserSchemas.new(@customer_id, @customer_key, @host_url)
    @users = ChinoRuby::Users.new(@customer_id, @customer_key, @host_url)
    @groups = ChinoRuby::Groups.new(@customer_id, @customer_key, @host_url)
    @collections = ChinoRuby::Collections.new(@customer_id, @customer_key, @host_url)
    @permissions = ChinoRuby::Permissions.new(@customer_id, @customer_key, @host_url)
    @search = ChinoRuby::Search.new(@customer_id, @customer_key, @host_url)
    @blobs = ChinoRuby::Blobs.new(@customer_id, @customer_key, @host_url)
end