Class: Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/configuration.rb

Overview

This class maintains properties about api configuration.

Author:

  • Eleazar Gomez

Since:

  • 8/23/15

Version:

  • 1.0.0

Constant Summary collapse

PROPERTIES =

Since:

  • 8/23/15

Configuration.new

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Load the current properties in config.yml.

Since:

  • 8/23/15



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/configuration.rb', line 14

def initialize
  @config = {
      :url => 'https://api.dynamicloud.org',
      # this url must be executed using post method
      :url_get_records => '/api_models/{csk}/{aci}/get_records/{mid}/{count}/{offset}/',
      # this url must be executed using post method
      :url_get_specific_fields => '/api_models/{csk}/{aci}/get_records_by_projection/{mid}/{count}/{offset}/',
      # this url must be executed using post method
      :url_get_record_info => '/api_records/{csk}/{aci}/get_record_info/{mid}/{rid}',
      # this url must be executed using post method
      :url_update_record => '/api_records/{csk}/{aci}/update_record/{mid}/{rid}',
      # this url must be executed using post method
      :url_save_record => '/api_records/{csk}/{aci}/create_record/{mid}',
      # this url must be executed using delete method
      :url_delete_record => '/api_records/{csk}/{aci}/delete_record/{mid}/{rid}',
      # this url must be executed using get method
      :url_get_model_info => '/api_models/{csk}/{aci}/get_model_info/{mid}',
      # this url must be executed using get method
      :url_get_models => '/api_models/{csk}/{aci}/get_models',
      # this url must be executed using get method
      :url_get_fields => '/api_models/{csk}/{aci}/get_fields/{mid}',
      # this url must be executed using post method
      :url_upload_file => '/api_records/{csk}/{aci}/upload_file_record/{mid}/{rid}',
      # this url must be executed using get method
      :url_download_file => '/api_records/{csk}/{aci}/download_file_record/{mid}/{rid}/{identifier}',
      # this url must be executed using get method
      :url_share_file => '/api_records/{csk}/{aci}/share_file_record/{mid}/{rid}/{identifier}',
      # this url must be executed using post method
      :url_update_selection => '/api_records/{csk}/{aci}/update_using_selection/{mid}',
      # this url must be executed using post method
      :url_delete_selection => '/api_records/{csk}/{aci}/delete_using_selection/{mid}',
      :version => '1.0.4'
  }
end

Instance Method Details

#get_property(property) ⇒ Object

Since:

  • 8/23/15



9
10
11
# File 'lib/configuration.rb', line 9

def get_property(property)
  @config[property]
end