directus_sdk 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +185 -0
  4. data/Rakefile +8 -0
  5. data/directus_sdk.gemspec +46 -0
  6. data/docs/ActivityApi.md +59 -0
  7. data/docs/BookmarksApi.md +290 -0
  8. data/docs/FilesApi.md +277 -0
  9. data/docs/GetActivity.md +9 -0
  10. data/docs/GetActivityData.md +16 -0
  11. data/docs/GetActivityMeta.md +10 -0
  12. data/docs/GetBookmark.md +9 -0
  13. data/docs/GetBookmarks.md +9 -0
  14. data/docs/GetBookmarksData.md +14 -0
  15. data/docs/GetBookmarksMeta.md +14 -0
  16. data/docs/GetFile.md +9 -0
  17. data/docs/GetFiles.md +9 -0
  18. data/docs/GetFilesData.md +24 -0
  19. data/docs/GetGroup.md +9 -0
  20. data/docs/GetGroups.md +9 -0
  21. data/docs/GetGroupsData.md +9 -0
  22. data/docs/GetGroupsDataData.md +16 -0
  23. data/docs/GetGroupsDataMeta.md +11 -0
  24. data/docs/GetMessage.md +9 -0
  25. data/docs/GetMessages.md +9 -0
  26. data/docs/GetMessagesData.md +18 -0
  27. data/docs/GetMessagesMeta.md +13 -0
  28. data/docs/GetMessagesResponses.md +8 -0
  29. data/docs/GetPreferences.md +9 -0
  30. data/docs/GetPreferencesData.md +16 -0
  31. data/docs/GetPrivileges.md +9 -0
  32. data/docs/GetPrivilegesData.md +19 -0
  33. data/docs/GetPrivilegesForTable.md +9 -0
  34. data/docs/GetSettings.md +9 -0
  35. data/docs/GetSettingsData.md +9 -0
  36. data/docs/GetSettingsDataFiles.md +13 -0
  37. data/docs/GetSettingsDataGlobal.md +13 -0
  38. data/docs/GetSettingsFor.md +9 -0
  39. data/docs/GetSettingsForMeta.md +10 -0
  40. data/docs/GetTable.md +9 -0
  41. data/docs/GetTableColumn.md +9 -0
  42. data/docs/GetTableColumnData.md +23 -0
  43. data/docs/GetTableColumns.md +9 -0
  44. data/docs/GetTableColumnsData.md +27 -0
  45. data/docs/GetTableData.md +29 -0
  46. data/docs/GetTableRow.md +9 -0
  47. data/docs/GetTableRows.md +9 -0
  48. data/docs/GetTableRowsData.md +9 -0
  49. data/docs/GetTableRowsMeta.md +14 -0
  50. data/docs/GetTables.md +9 -0
  51. data/docs/GetTablesData.md +8 -0
  52. data/docs/GetTablesMeta.md +9 -0
  53. data/docs/GroupsApi.md +455 -0
  54. data/docs/MessagesApi.md +116 -0
  55. data/docs/PreferencesApi.md +135 -0
  56. data/docs/SettingsApi.md +175 -0
  57. data/docs/TablesApi.md +873 -0
  58. data/docs/UtilsApi.md +126 -0
  59. data/git_push.sh +55 -0
  60. data/lib/directus_sdk.rb +92 -0
  61. data/lib/directus_sdk/api/activity_api.rb +70 -0
  62. data/lib/directus_sdk/api/bookmarks_api.rb +288 -0
  63. data/lib/directus_sdk/api/files_api.rb +297 -0
  64. data/lib/directus_sdk/api/groups_api.rb +469 -0
  65. data/lib/directus_sdk/api/messages_api.rb +123 -0
  66. data/lib/directus_sdk/api/preferences_api.rb +151 -0
  67. data/lib/directus_sdk/api/settings_api.rb +183 -0
  68. data/lib/directus_sdk/api/tables_api.rb +890 -0
  69. data/lib/directus_sdk/api/utils_api.rb +134 -0
  70. data/lib/directus_sdk/api_client.rb +389 -0
  71. data/lib/directus_sdk/api_error.rb +38 -0
  72. data/lib/directus_sdk/configuration.rb +209 -0
  73. data/lib/directus_sdk/models/get_activity.rb +199 -0
  74. data/lib/directus_sdk/models/get_activity_data.rb +260 -0
  75. data/lib/directus_sdk/models/get_activity_meta.rb +206 -0
  76. data/lib/directus_sdk/models/get_bookmark.rb +197 -0
  77. data/lib/directus_sdk/models/get_bookmarks.rb +199 -0
  78. data/lib/directus_sdk/models/get_bookmarks_data.rb +242 -0
  79. data/lib/directus_sdk/models/get_bookmarks_meta.rb +252 -0
  80. data/lib/directus_sdk/models/get_file.rb +197 -0
  81. data/lib/directus_sdk/models/get_files.rb +199 -0
  82. data/lib/directus_sdk/models/get_files_data.rb +332 -0
  83. data/lib/directus_sdk/models/get_group.rb +197 -0
  84. data/lib/directus_sdk/models/get_groups.rb +197 -0
  85. data/lib/directus_sdk/models/get_groups_data.rb +199 -0
  86. data/lib/directus_sdk/models/get_groups_data_data.rb +260 -0
  87. data/lib/directus_sdk/models/get_groups_data_meta.rb +215 -0
  88. data/lib/directus_sdk/models/get_message.rb +197 -0
  89. data/lib/directus_sdk/models/get_messages.rb +199 -0
  90. data/lib/directus_sdk/models/get_messages_data.rb +278 -0
  91. data/lib/directus_sdk/models/get_messages_meta.rb +233 -0
  92. data/lib/directus_sdk/models/get_messages_responses.rb +190 -0
  93. data/lib/directus_sdk/models/get_preferences.rb +197 -0
  94. data/lib/directus_sdk/models/get_preferences_data.rb +260 -0
  95. data/lib/directus_sdk/models/get_privileges.rb +199 -0
  96. data/lib/directus_sdk/models/get_privileges_data.rb +287 -0
  97. data/lib/directus_sdk/models/get_privileges_for_table.rb +197 -0
  98. data/lib/directus_sdk/models/get_settings.rb +197 -0
  99. data/lib/directus_sdk/models/get_settings_data.rb +197 -0
  100. data/lib/directus_sdk/models/get_settings_data_files.rb +233 -0
  101. data/lib/directus_sdk/models/get_settings_data_global.rb +233 -0
  102. data/lib/directus_sdk/models/get_settings_for.rb +197 -0
  103. data/lib/directus_sdk/models/get_settings_for_meta.rb +206 -0
  104. data/lib/directus_sdk/models/get_table.rb +197 -0
  105. data/lib/directus_sdk/models/get_table_column.rb +197 -0
  106. data/lib/directus_sdk/models/get_table_column_data.rb +325 -0
  107. data/lib/directus_sdk/models/get_table_columns.rb +199 -0
  108. data/lib/directus_sdk/models/get_table_columns_data.rb +363 -0
  109. data/lib/directus_sdk/models/get_table_data.rb +379 -0
  110. data/lib/directus_sdk/models/get_table_row.rb +197 -0
  111. data/lib/directus_sdk/models/get_table_rows.rb +199 -0
  112. data/lib/directus_sdk/models/get_table_rows_data.rb +197 -0
  113. data/lib/directus_sdk/models/get_table_rows_meta.rb +242 -0
  114. data/lib/directus_sdk/models/get_tables.rb +199 -0
  115. data/lib/directus_sdk/models/get_tables_data.rb +188 -0
  116. data/lib/directus_sdk/models/get_tables_meta.rb +197 -0
  117. data/lib/directus_sdk/version.rb +15 -0
  118. data/spec/api/activity_api_spec.rb +46 -0
  119. data/spec/api/bookmarks_api_spec.rb +98 -0
  120. data/spec/api/files_api_spec.rb +105 -0
  121. data/spec/api/groups_api_spec.rb +143 -0
  122. data/spec/api/messages_api_spec.rb +58 -0
  123. data/spec/api/preferences_api_spec.rb +65 -0
  124. data/spec/api/settings_api_spec.rb +71 -0
  125. data/spec/api/tables_api_spec.rb +236 -0
  126. data/spec/api/utils_api_spec.rb +61 -0
  127. data/spec/api_client_spec.rb +226 -0
  128. data/spec/configuration_spec.rb +42 -0
  129. data/spec/models/get_activity_data_spec.rb +90 -0
  130. data/spec/models/get_activity_meta_spec.rb +54 -0
  131. data/spec/models/get_activity_spec.rb +48 -0
  132. data/spec/models/get_bookmark_spec.rb +48 -0
  133. data/spec/models/get_bookmarks_data_spec.rb +78 -0
  134. data/spec/models/get_bookmarks_meta_spec.rb +78 -0
  135. data/spec/models/get_bookmarks_spec.rb +48 -0
  136. data/spec/models/get_file_spec.rb +48 -0
  137. data/spec/models/get_files_data_spec.rb +138 -0
  138. data/spec/models/get_files_spec.rb +48 -0
  139. data/spec/models/get_group_spec.rb +48 -0
  140. data/spec/models/get_groups_data_data_spec.rb +90 -0
  141. data/spec/models/get_groups_data_meta_spec.rb +60 -0
  142. data/spec/models/get_groups_data_spec.rb +48 -0
  143. data/spec/models/get_groups_spec.rb +48 -0
  144. data/spec/models/get_message_spec.rb +48 -0
  145. data/spec/models/get_messages_data_spec.rb +102 -0
  146. data/spec/models/get_messages_meta_spec.rb +72 -0
  147. data/spec/models/get_messages_responses_spec.rb +42 -0
  148. data/spec/models/get_messages_spec.rb +48 -0
  149. data/spec/models/get_preferences_data_spec.rb +90 -0
  150. data/spec/models/get_preferences_spec.rb +48 -0
  151. data/spec/models/get_privileges_data_spec.rb +108 -0
  152. data/spec/models/get_privileges_for_table_spec.rb +48 -0
  153. data/spec/models/get_privileges_spec.rb +48 -0
  154. data/spec/models/get_settings_data_files_spec.rb +72 -0
  155. data/spec/models/get_settings_data_global_spec.rb +72 -0
  156. data/spec/models/get_settings_data_spec.rb +48 -0
  157. data/spec/models/get_settings_for_meta_spec.rb +54 -0
  158. data/spec/models/get_settings_for_spec.rb +48 -0
  159. data/spec/models/get_settings_spec.rb +48 -0
  160. data/spec/models/get_table_column_data_spec.rb +132 -0
  161. data/spec/models/get_table_column_spec.rb +48 -0
  162. data/spec/models/get_table_columns_data_spec.rb +156 -0
  163. data/spec/models/get_table_columns_spec.rb +48 -0
  164. data/spec/models/get_table_data_spec.rb +168 -0
  165. data/spec/models/get_table_row_spec.rb +48 -0
  166. data/spec/models/get_table_rows_data_spec.rb +48 -0
  167. data/spec/models/get_table_rows_meta_spec.rb +78 -0
  168. data/spec/models/get_table_rows_spec.rb +48 -0
  169. data/spec/models/get_table_spec.rb +48 -0
  170. data/spec/models/get_tables_data_spec.rb +42 -0
  171. data/spec/models/get_tables_meta_spec.rb +48 -0
  172. data/spec/models/get_tables_spec.rb +48 -0
  173. data/spec/spec_helper.rb +111 -0
  174. metadata +451 -0
@@ -0,0 +1,123 @@
1
+ =begin
2
+ #directus.io
3
+
4
+ #API for directus.io
5
+
6
+ OpenAPI spec version: 1.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module DirectusSDK
16
+ class MessagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Returns specific message
24
+ #
25
+ # @param message_id ID of message to return
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [GetMessage]
28
+ def get_message(message_id, opts = {})
29
+ data, _status_code, _headers = get_message_with_http_info(message_id, opts)
30
+ return data
31
+ end
32
+
33
+ # Returns specific message
34
+ #
35
+ # @param message_id ID of message to return
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(GetMessage, Fixnum, Hash)>] GetMessage data, response status code and response headers
38
+ def get_message_with_http_info(message_id, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_message ..."
41
+ end
42
+ # verify the required parameter 'message_id' is set
43
+ if @api_client.config.client_side_validation && message_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MessagesApi.get_message"
45
+ end
46
+ # resource path
47
+ local_var_path = "/messages/{messageId}".sub('{' + 'messageId' + '}', message_id.to_s)
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+
57
+ # form parameters
58
+ form_params = {}
59
+
60
+ # http body (model)
61
+ post_body = nil
62
+ auth_names = ['api_key']
63
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => 'GetMessage')
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: MessagesApi#get_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+
76
+ # Returns messages
77
+ #
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [GetMessages]
80
+ def get_messages(opts = {})
81
+ data, _status_code, _headers = get_messages_with_http_info(opts)
82
+ return data
83
+ end
84
+
85
+ # Returns messages
86
+ #
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [Array<(GetMessages, Fixnum, Hash)>] GetMessages data, response status code and response headers
89
+ def get_messages_with_http_info(opts = {})
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_messages ..."
92
+ end
93
+ # resource path
94
+ local_var_path = "/messages/self"
95
+
96
+ # query parameters
97
+ query_params = {}
98
+
99
+ # header parameters
100
+ header_params = {}
101
+ # HTTP header 'Accept' (if needed)
102
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
103
+
104
+ # form parameters
105
+ form_params = {}
106
+
107
+ # http body (model)
108
+ post_body = nil
109
+ auth_names = ['api_key']
110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => 'GetMessages')
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug "API called: MessagesApi#get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
119
+ end
120
+ return data, status_code, headers
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,151 @@
1
+ =begin
2
+ #directus.io
3
+
4
+ #API for directus.io
5
+
6
+ OpenAPI spec version: 1.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module DirectusSDK
16
+ class PreferencesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Returns table preferences
24
+ #
25
+ # @param table_id ID of table to return rows from
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [GetPreferences]
28
+ def get_preferences(table_id, opts = {})
29
+ data, _status_code, _headers = get_preferences_with_http_info(table_id, opts)
30
+ return data
31
+ end
32
+
33
+ # Returns table preferences
34
+ #
35
+ # @param table_id ID of table to return rows from
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(GetPreferences, Fixnum, Hash)>] GetPreferences data, response status code and response headers
38
+ def get_preferences_with_http_info(table_id, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: PreferencesApi.get_preferences ..."
41
+ end
42
+ # verify the required parameter 'table_id' is set
43
+ if @api_client.config.client_side_validation && table_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'table_id' when calling PreferencesApi.get_preferences"
45
+ end
46
+ # resource path
47
+ local_var_path = "/tables/{tableId}/preferences".sub('{' + 'tableId' + '}', table_id.to_s)
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+
57
+ # form parameters
58
+ form_params = {}
59
+
60
+ # http body (model)
61
+ post_body = nil
62
+ auth_names = ['api_key']
63
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => 'GetPreferences')
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: PreferencesApi#get_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+
76
+ # Update table preferences
77
+ #
78
+ # @param table_id ID of table to return rows from
79
+ # @param [Hash] opts the optional parameters
80
+ # @option opts [String] :id Preference&#39;s Unique Identification number
81
+ # @option opts [String] :table_name Name of table to add
82
+ # @option opts [String] :columns_visible List of visible columns, separated by commas
83
+ # @option opts [Integer] :sort The sort order of the column used to override the column order in the schema
84
+ # @option opts [String] :sort_order Sort Order (ASC&#x3D;Ascending or DESC&#x3D;Descending)
85
+ # @option opts [String] :status List of status values. separated by comma
86
+ # @return [nil]
87
+ def update_preferences(table_id, opts = {})
88
+ update_preferences_with_http_info(table_id, opts)
89
+ return nil
90
+ end
91
+
92
+ # Update table preferences
93
+ #
94
+ # @param table_id ID of table to return rows from
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [String] :id Preference&#39;s Unique Identification number
97
+ # @option opts [String] :table_name Name of table to add
98
+ # @option opts [String] :columns_visible List of visible columns, separated by commas
99
+ # @option opts [Integer] :sort The sort order of the column used to override the column order in the schema
100
+ # @option opts [String] :sort_order Sort Order (ASC&#x3D;Ascending or DESC&#x3D;Descending)
101
+ # @option opts [String] :status List of status values. separated by comma
102
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
103
+ def update_preferences_with_http_info(table_id, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug "Calling API: PreferencesApi.update_preferences ..."
106
+ end
107
+ # verify the required parameter 'table_id' is set
108
+ if @api_client.config.client_side_validation && table_id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'table_id' when calling PreferencesApi.update_preferences"
110
+ end
111
+ if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
112
+ fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
113
+ end
114
+ # resource path
115
+ local_var_path = "/tables/{tableId}/preferences".sub('{' + 'tableId' + '}', table_id.to_s)
116
+
117
+ # query parameters
118
+ query_params = {}
119
+
120
+ # header parameters
121
+ header_params = {}
122
+ # HTTP header 'Accept' (if needed)
123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
124
+ # HTTP header 'Content-Type'
125
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
126
+
127
+ # form parameters
128
+ form_params = {}
129
+ form_params["id"] = opts[:'id'] if !opts[:'id'].nil?
130
+ form_params["table_name"] = opts[:'table_name'] if !opts[:'table_name'].nil?
131
+ form_params["columns_visible"] = opts[:'columns_visible'] if !opts[:'columns_visible'].nil?
132
+ form_params["sort"] = opts[:'sort'] if !opts[:'sort'].nil?
133
+ form_params["sort_order"] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
134
+ form_params["status"] = opts[:'status'] if !opts[:'status'].nil?
135
+
136
+ # http body (model)
137
+ post_body = nil
138
+ auth_names = ['api_key']
139
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names)
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: PreferencesApi#update_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,183 @@
1
+ =begin
2
+ #directus.io
3
+
4
+ #API for directus.io
5
+
6
+ OpenAPI spec version: 1.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module DirectusSDK
16
+ class SettingsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Returns settings
24
+ #
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [GetSettings]
27
+ def get_settings(opts = {})
28
+ data, _status_code, _headers = get_settings_with_http_info(opts)
29
+ return data
30
+ end
31
+
32
+ # Returns settings
33
+ #
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(GetSettings, Fixnum, Hash)>] GetSettings data, response status code and response headers
36
+ def get_settings_with_http_info(opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug "Calling API: SettingsApi.get_settings ..."
39
+ end
40
+ # resource path
41
+ local_var_path = "/settings"
42
+
43
+ # query parameters
44
+ query_params = {}
45
+
46
+ # header parameters
47
+ header_params = {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = {}
53
+
54
+ # http body (model)
55
+ post_body = nil
56
+ auth_names = ['api_key']
57
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
58
+ :header_params => header_params,
59
+ :query_params => query_params,
60
+ :form_params => form_params,
61
+ :body => post_body,
62
+ :auth_names => auth_names,
63
+ :return_type => 'GetSettings')
64
+ if @api_client.config.debugging
65
+ @api_client.config.logger.debug "API called: SettingsApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
66
+ end
67
+ return data, status_code, headers
68
+ end
69
+
70
+ # Returns settings for collection
71
+ #
72
+ # @param collection_name Name of collection to return settings for
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [GetSettingsFor]
75
+ def get_settings_for(collection_name, opts = {})
76
+ data, _status_code, _headers = get_settings_for_with_http_info(collection_name, opts)
77
+ return data
78
+ end
79
+
80
+ # Returns settings for collection
81
+ #
82
+ # @param collection_name Name of collection to return settings for
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [Array<(GetSettingsFor, Fixnum, Hash)>] GetSettingsFor data, response status code and response headers
85
+ def get_settings_for_with_http_info(collection_name, opts = {})
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "Calling API: SettingsApi.get_settings_for ..."
88
+ end
89
+ # verify the required parameter 'collection_name' is set
90
+ if @api_client.config.client_side_validation && collection_name.nil?
91
+ fail ArgumentError, "Missing the required parameter 'collection_name' when calling SettingsApi.get_settings_for"
92
+ end
93
+ # resource path
94
+ local_var_path = "/settings/{collectionName}".sub('{' + 'collectionName' + '}', collection_name.to_s)
95
+
96
+ # query parameters
97
+ query_params = {}
98
+
99
+ # header parameters
100
+ header_params = {}
101
+ # HTTP header 'Accept' (if needed)
102
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
103
+
104
+ # form parameters
105
+ form_params = {}
106
+
107
+ # http body (model)
108
+ post_body = nil
109
+ auth_names = ['api_key']
110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => 'GetSettingsFor')
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug "API called: SettingsApi#get_settings_for\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
119
+ end
120
+ return data, status_code, headers
121
+ end
122
+
123
+ # Update settings
124
+ #
125
+ # @param collection_name Name of collection to return settings for
126
+ # @param custom_data Data based on your specific schema eg: active&#x3D;1&amp;title&#x3D;LoremIpsum
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [nil]
129
+ def update_settings(collection_name, custom_data, opts = {})
130
+ update_settings_with_http_info(collection_name, custom_data, opts)
131
+ return nil
132
+ end
133
+
134
+ # Update settings
135
+ #
136
+ # @param collection_name Name of collection to return settings for
137
+ # @param custom_data Data based on your specific schema eg: active&#x3D;1&amp;title&#x3D;LoremIpsum
138
+ # @param [Hash] opts the optional parameters
139
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
140
+ def update_settings_with_http_info(collection_name, custom_data, opts = {})
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "Calling API: SettingsApi.update_settings ..."
143
+ end
144
+ # verify the required parameter 'collection_name' is set
145
+ if @api_client.config.client_side_validation && collection_name.nil?
146
+ fail ArgumentError, "Missing the required parameter 'collection_name' when calling SettingsApi.update_settings"
147
+ end
148
+ # verify the required parameter 'custom_data' is set
149
+ if @api_client.config.client_side_validation && custom_data.nil?
150
+ fail ArgumentError, "Missing the required parameter 'custom_data' when calling SettingsApi.update_settings"
151
+ end
152
+ # resource path
153
+ local_var_path = "/settings/{collectionName}".sub('{' + 'collectionName' + '}', collection_name.to_s)
154
+
155
+ # query parameters
156
+ query_params = {}
157
+
158
+ # header parameters
159
+ header_params = {}
160
+ # HTTP header 'Accept' (if needed)
161
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
162
+ # HTTP header 'Content-Type'
163
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
164
+
165
+ # form parameters
166
+ form_params = {}
167
+
168
+ # http body (model)
169
+ post_body = @api_client.object_to_http_body(custom_data)
170
+ auth_names = ['api_key']
171
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
172
+ :header_params => header_params,
173
+ :query_params => query_params,
174
+ :form_params => form_params,
175
+ :body => post_body,
176
+ :auth_names => auth_names)
177
+ if @api_client.config.debugging
178
+ @api_client.config.logger.debug "API called: SettingsApi#update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ end
180
+ return data, status_code, headers
181
+ end
182
+ end
183
+ end