Class: ChinoAPI
- Inherits:
-
ChinoRuby::CheckValues
- Object
- ChinoRuby::CheckValues
- ChinoAPI
- Defined in:
- lib/chino_ruby.rb
Overview
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(...)
Instance Attribute Summary collapse
-
#applications ⇒ Object
Returns the value of attribute applications.
-
#auth ⇒ Object
Returns the value of attribute auth.
-
#blobs ⇒ Object
Returns the value of attribute blobs.
-
#collections ⇒ Object
Returns the value of attribute collections.
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#repositories ⇒ Object
Returns the value of attribute repositories.
-
#schemas ⇒ Object
Returns the value of attribute schemas.
-
#search ⇒ Object
Returns the value of attribute search.
-
#user_schemas ⇒ Object
Returns the value of attribute user_schemas.
-
#users ⇒ Object
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(customer_id, customer_key, host_url) ⇒ ChinoAPI
constructor
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.
Methods inherited from ChinoRuby::CheckValues
#check_boolean, #check_int, #check_json, #check_string
Constructor Details
#initialize(customer_id, customer_key, host_url) ⇒ ChinoAPI
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
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# 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 |
Instance Attribute Details
#applications ⇒ Object
Returns the value of attribute applications.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def applications @applications end |
#auth ⇒ Object
Returns the value of attribute auth.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def auth @auth end |
#blobs ⇒ Object
Returns the value of attribute blobs.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def blobs @blobs end |
#collections ⇒ Object
Returns the value of attribute collections.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def collections @collections end |
#documents ⇒ Object
Returns the value of attribute documents.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def documents @documents end |
#groups ⇒ Object
Returns the value of attribute groups.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def groups @groups end |
#permissions ⇒ Object
Returns the value of attribute permissions.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def @permissions end |
#repositories ⇒ Object
Returns the value of attribute repositories.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def repositories @repositories end |
#schemas ⇒ Object
Returns the value of attribute schemas.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def schemas @schemas end |
#search ⇒ Object
Returns the value of attribute search.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def search @search end |
#user_schemas ⇒ Object
Returns the value of attribute user_schemas.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def user_schemas @user_schemas end |
#users ⇒ Object
Returns the value of attribute users.
41 42 43 |
# File 'lib/chino_ruby.rb', line 41 def users @users end |