directus_sdk 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +185 -0
- data/Rakefile +8 -0
- data/directus_sdk.gemspec +46 -0
- data/docs/ActivityApi.md +59 -0
- data/docs/BookmarksApi.md +290 -0
- data/docs/FilesApi.md +277 -0
- data/docs/GetActivity.md +9 -0
- data/docs/GetActivityData.md +16 -0
- data/docs/GetActivityMeta.md +10 -0
- data/docs/GetBookmark.md +9 -0
- data/docs/GetBookmarks.md +9 -0
- data/docs/GetBookmarksData.md +14 -0
- data/docs/GetBookmarksMeta.md +14 -0
- data/docs/GetFile.md +9 -0
- data/docs/GetFiles.md +9 -0
- data/docs/GetFilesData.md +24 -0
- data/docs/GetGroup.md +9 -0
- data/docs/GetGroups.md +9 -0
- data/docs/GetGroupsData.md +9 -0
- data/docs/GetGroupsDataData.md +16 -0
- data/docs/GetGroupsDataMeta.md +11 -0
- data/docs/GetMessage.md +9 -0
- data/docs/GetMessages.md +9 -0
- data/docs/GetMessagesData.md +18 -0
- data/docs/GetMessagesMeta.md +13 -0
- data/docs/GetMessagesResponses.md +8 -0
- data/docs/GetPreferences.md +9 -0
- data/docs/GetPreferencesData.md +16 -0
- data/docs/GetPrivileges.md +9 -0
- data/docs/GetPrivilegesData.md +19 -0
- data/docs/GetPrivilegesForTable.md +9 -0
- data/docs/GetSettings.md +9 -0
- data/docs/GetSettingsData.md +9 -0
- data/docs/GetSettingsDataFiles.md +13 -0
- data/docs/GetSettingsDataGlobal.md +13 -0
- data/docs/GetSettingsFor.md +9 -0
- data/docs/GetSettingsForMeta.md +10 -0
- data/docs/GetTable.md +9 -0
- data/docs/GetTableColumn.md +9 -0
- data/docs/GetTableColumnData.md +23 -0
- data/docs/GetTableColumns.md +9 -0
- data/docs/GetTableColumnsData.md +27 -0
- data/docs/GetTableData.md +29 -0
- data/docs/GetTableRow.md +9 -0
- data/docs/GetTableRows.md +9 -0
- data/docs/GetTableRowsData.md +9 -0
- data/docs/GetTableRowsMeta.md +14 -0
- data/docs/GetTables.md +9 -0
- data/docs/GetTablesData.md +8 -0
- data/docs/GetTablesMeta.md +9 -0
- data/docs/GroupsApi.md +455 -0
- data/docs/MessagesApi.md +116 -0
- data/docs/PreferencesApi.md +135 -0
- data/docs/SettingsApi.md +175 -0
- data/docs/TablesApi.md +873 -0
- data/docs/UtilsApi.md +126 -0
- data/git_push.sh +55 -0
- data/lib/directus_sdk.rb +92 -0
- data/lib/directus_sdk/api/activity_api.rb +70 -0
- data/lib/directus_sdk/api/bookmarks_api.rb +288 -0
- data/lib/directus_sdk/api/files_api.rb +297 -0
- data/lib/directus_sdk/api/groups_api.rb +469 -0
- data/lib/directus_sdk/api/messages_api.rb +123 -0
- data/lib/directus_sdk/api/preferences_api.rb +151 -0
- data/lib/directus_sdk/api/settings_api.rb +183 -0
- data/lib/directus_sdk/api/tables_api.rb +890 -0
- data/lib/directus_sdk/api/utils_api.rb +134 -0
- data/lib/directus_sdk/api_client.rb +389 -0
- data/lib/directus_sdk/api_error.rb +38 -0
- data/lib/directus_sdk/configuration.rb +209 -0
- data/lib/directus_sdk/models/get_activity.rb +199 -0
- data/lib/directus_sdk/models/get_activity_data.rb +260 -0
- data/lib/directus_sdk/models/get_activity_meta.rb +206 -0
- data/lib/directus_sdk/models/get_bookmark.rb +197 -0
- data/lib/directus_sdk/models/get_bookmarks.rb +199 -0
- data/lib/directus_sdk/models/get_bookmarks_data.rb +242 -0
- data/lib/directus_sdk/models/get_bookmarks_meta.rb +252 -0
- data/lib/directus_sdk/models/get_file.rb +197 -0
- data/lib/directus_sdk/models/get_files.rb +199 -0
- data/lib/directus_sdk/models/get_files_data.rb +332 -0
- data/lib/directus_sdk/models/get_group.rb +197 -0
- data/lib/directus_sdk/models/get_groups.rb +197 -0
- data/lib/directus_sdk/models/get_groups_data.rb +199 -0
- data/lib/directus_sdk/models/get_groups_data_data.rb +260 -0
- data/lib/directus_sdk/models/get_groups_data_meta.rb +215 -0
- data/lib/directus_sdk/models/get_message.rb +197 -0
- data/lib/directus_sdk/models/get_messages.rb +199 -0
- data/lib/directus_sdk/models/get_messages_data.rb +278 -0
- data/lib/directus_sdk/models/get_messages_meta.rb +233 -0
- data/lib/directus_sdk/models/get_messages_responses.rb +190 -0
- data/lib/directus_sdk/models/get_preferences.rb +197 -0
- data/lib/directus_sdk/models/get_preferences_data.rb +260 -0
- data/lib/directus_sdk/models/get_privileges.rb +199 -0
- data/lib/directus_sdk/models/get_privileges_data.rb +287 -0
- data/lib/directus_sdk/models/get_privileges_for_table.rb +197 -0
- data/lib/directus_sdk/models/get_settings.rb +197 -0
- data/lib/directus_sdk/models/get_settings_data.rb +197 -0
- data/lib/directus_sdk/models/get_settings_data_files.rb +233 -0
- data/lib/directus_sdk/models/get_settings_data_global.rb +233 -0
- data/lib/directus_sdk/models/get_settings_for.rb +197 -0
- data/lib/directus_sdk/models/get_settings_for_meta.rb +206 -0
- data/lib/directus_sdk/models/get_table.rb +197 -0
- data/lib/directus_sdk/models/get_table_column.rb +197 -0
- data/lib/directus_sdk/models/get_table_column_data.rb +325 -0
- data/lib/directus_sdk/models/get_table_columns.rb +199 -0
- data/lib/directus_sdk/models/get_table_columns_data.rb +363 -0
- data/lib/directus_sdk/models/get_table_data.rb +379 -0
- data/lib/directus_sdk/models/get_table_row.rb +197 -0
- data/lib/directus_sdk/models/get_table_rows.rb +199 -0
- data/lib/directus_sdk/models/get_table_rows_data.rb +197 -0
- data/lib/directus_sdk/models/get_table_rows_meta.rb +242 -0
- data/lib/directus_sdk/models/get_tables.rb +199 -0
- data/lib/directus_sdk/models/get_tables_data.rb +188 -0
- data/lib/directus_sdk/models/get_tables_meta.rb +197 -0
- data/lib/directus_sdk/version.rb +15 -0
- data/spec/api/activity_api_spec.rb +46 -0
- data/spec/api/bookmarks_api_spec.rb +98 -0
- data/spec/api/files_api_spec.rb +105 -0
- data/spec/api/groups_api_spec.rb +143 -0
- data/spec/api/messages_api_spec.rb +58 -0
- data/spec/api/preferences_api_spec.rb +65 -0
- data/spec/api/settings_api_spec.rb +71 -0
- data/spec/api/tables_api_spec.rb +236 -0
- data/spec/api/utils_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/get_activity_data_spec.rb +90 -0
- data/spec/models/get_activity_meta_spec.rb +54 -0
- data/spec/models/get_activity_spec.rb +48 -0
- data/spec/models/get_bookmark_spec.rb +48 -0
- data/spec/models/get_bookmarks_data_spec.rb +78 -0
- data/spec/models/get_bookmarks_meta_spec.rb +78 -0
- data/spec/models/get_bookmarks_spec.rb +48 -0
- data/spec/models/get_file_spec.rb +48 -0
- data/spec/models/get_files_data_spec.rb +138 -0
- data/spec/models/get_files_spec.rb +48 -0
- data/spec/models/get_group_spec.rb +48 -0
- data/spec/models/get_groups_data_data_spec.rb +90 -0
- data/spec/models/get_groups_data_meta_spec.rb +60 -0
- data/spec/models/get_groups_data_spec.rb +48 -0
- data/spec/models/get_groups_spec.rb +48 -0
- data/spec/models/get_message_spec.rb +48 -0
- data/spec/models/get_messages_data_spec.rb +102 -0
- data/spec/models/get_messages_meta_spec.rb +72 -0
- data/spec/models/get_messages_responses_spec.rb +42 -0
- data/spec/models/get_messages_spec.rb +48 -0
- data/spec/models/get_preferences_data_spec.rb +90 -0
- data/spec/models/get_preferences_spec.rb +48 -0
- data/spec/models/get_privileges_data_spec.rb +108 -0
- data/spec/models/get_privileges_for_table_spec.rb +48 -0
- data/spec/models/get_privileges_spec.rb +48 -0
- data/spec/models/get_settings_data_files_spec.rb +72 -0
- data/spec/models/get_settings_data_global_spec.rb +72 -0
- data/spec/models/get_settings_data_spec.rb +48 -0
- data/spec/models/get_settings_for_meta_spec.rb +54 -0
- data/spec/models/get_settings_for_spec.rb +48 -0
- data/spec/models/get_settings_spec.rb +48 -0
- data/spec/models/get_table_column_data_spec.rb +132 -0
- data/spec/models/get_table_column_spec.rb +48 -0
- data/spec/models/get_table_columns_data_spec.rb +156 -0
- data/spec/models/get_table_columns_spec.rb +48 -0
- data/spec/models/get_table_data_spec.rb +168 -0
- data/spec/models/get_table_row_spec.rb +48 -0
- data/spec/models/get_table_rows_data_spec.rb +48 -0
- data/spec/models/get_table_rows_meta_spec.rb +78 -0
- data/spec/models/get_table_rows_spec.rb +48 -0
- data/spec/models/get_table_spec.rb +48 -0
- data/spec/models/get_tables_data_spec.rb +42 -0
- data/spec/models/get_tables_meta_spec.rb +48 -0
- data/spec/models/get_tables_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +451 -0
|
@@ -0,0 +1,890 @@
|
|
|
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 TablesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Create a column in a given table
|
|
24
|
+
#
|
|
25
|
+
# @param table_id ID of table to return rows from
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :table_name Name of table to add
|
|
28
|
+
# @option opts [String] :column_name The unique name of the column to create
|
|
29
|
+
# @option opts [String] :type The datatype of the column, eg: INT
|
|
30
|
+
# @option opts [String] :ui The Directus Interface to use for this column
|
|
31
|
+
# @option opts [BOOLEAN] :hidden_input Whether the column will be hidden (globally) on the Edit Item page
|
|
32
|
+
# @option opts [BOOLEAN] :hidden_list Whether the column will be hidden (globally) on the Item Listing page
|
|
33
|
+
# @option opts [BOOLEAN] :required Whether the column is required. If required, the interface's validation function will be triggered
|
|
34
|
+
# @option opts [Integer] :sort The sort order of the column used to override the column order in the schema
|
|
35
|
+
# @option opts [String] :comment A helpful note to users for this column
|
|
36
|
+
# @option opts [String] :relationship_type The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE
|
|
37
|
+
# @option opts [String] :related_table The table name this column is related to (only used when storing relational data)
|
|
38
|
+
# @option opts [String] :junction_table The pivot/junction table that joins the column's table with the related table (only used when storing relational data)
|
|
39
|
+
# @option opts [String] :junction_key_left The column name in junction that is related to the column's table (only used when storing relational data)
|
|
40
|
+
# @option opts [String] :junction_key_right The column name in junction that is related to the related table (only used when storing relational data)
|
|
41
|
+
# @return [nil]
|
|
42
|
+
def add_column(table_id, opts = {})
|
|
43
|
+
add_column_with_http_info(table_id, opts)
|
|
44
|
+
return nil
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Create a column in a given table
|
|
48
|
+
#
|
|
49
|
+
# @param table_id ID of table to return rows from
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @option opts [String] :table_name Name of table to add
|
|
52
|
+
# @option opts [String] :column_name The unique name of the column to create
|
|
53
|
+
# @option opts [String] :type The datatype of the column, eg: INT
|
|
54
|
+
# @option opts [String] :ui The Directus Interface to use for this column
|
|
55
|
+
# @option opts [BOOLEAN] :hidden_input Whether the column will be hidden (globally) on the Edit Item page
|
|
56
|
+
# @option opts [BOOLEAN] :hidden_list Whether the column will be hidden (globally) on the Item Listing page
|
|
57
|
+
# @option opts [BOOLEAN] :required Whether the column is required. If required, the interface's validation function will be triggered
|
|
58
|
+
# @option opts [Integer] :sort The sort order of the column used to override the column order in the schema
|
|
59
|
+
# @option opts [String] :comment A helpful note to users for this column
|
|
60
|
+
# @option opts [String] :relationship_type The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE
|
|
61
|
+
# @option opts [String] :related_table The table name this column is related to (only used when storing relational data)
|
|
62
|
+
# @option opts [String] :junction_table The pivot/junction table that joins the column's table with the related table (only used when storing relational data)
|
|
63
|
+
# @option opts [String] :junction_key_left The column name in junction that is related to the column's table (only used when storing relational data)
|
|
64
|
+
# @option opts [String] :junction_key_right The column name in junction that is related to the related table (only used when storing relational data)
|
|
65
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
66
|
+
def add_column_with_http_info(table_id, opts = {})
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "Calling API: TablesApi.add_column ..."
|
|
69
|
+
end
|
|
70
|
+
# verify the required parameter 'table_id' is set
|
|
71
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
72
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.add_column"
|
|
73
|
+
end
|
|
74
|
+
# resource path
|
|
75
|
+
local_var_path = "/tables/{tableId}/columns".sub('{' + 'tableId' + '}', table_id.to_s)
|
|
76
|
+
|
|
77
|
+
# query parameters
|
|
78
|
+
query_params = {}
|
|
79
|
+
|
|
80
|
+
# header parameters
|
|
81
|
+
header_params = {}
|
|
82
|
+
# HTTP header 'Accept' (if needed)
|
|
83
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
|
|
84
|
+
# HTTP header 'Content-Type'
|
|
85
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
86
|
+
|
|
87
|
+
# form parameters
|
|
88
|
+
form_params = {}
|
|
89
|
+
form_params["table_name"] = opts[:'table_name'] if !opts[:'table_name'].nil?
|
|
90
|
+
form_params["column_name"] = opts[:'column_name'] if !opts[:'column_name'].nil?
|
|
91
|
+
form_params["type"] = opts[:'type'] if !opts[:'type'].nil?
|
|
92
|
+
form_params["ui"] = opts[:'ui'] if !opts[:'ui'].nil?
|
|
93
|
+
form_params["hidden_input"] = opts[:'hidden_input'] if !opts[:'hidden_input'].nil?
|
|
94
|
+
form_params["hidden_list"] = opts[:'hidden_list'] if !opts[:'hidden_list'].nil?
|
|
95
|
+
form_params["required"] = opts[:'required'] if !opts[:'required'].nil?
|
|
96
|
+
form_params["sort"] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
97
|
+
form_params["comment"] = opts[:'comment'] if !opts[:'comment'].nil?
|
|
98
|
+
form_params["relationship_type"] = opts[:'relationship_type'] if !opts[:'relationship_type'].nil?
|
|
99
|
+
form_params["related_table"] = opts[:'related_table'] if !opts[:'related_table'].nil?
|
|
100
|
+
form_params["junction_table"] = opts[:'junction_table'] if !opts[:'junction_table'].nil?
|
|
101
|
+
form_params["junction_key_left"] = opts[:'junction_key_left'] if !opts[:'junction_key_left'].nil?
|
|
102
|
+
form_params["junction_key_right"] = opts[:'junction_key_right'] if !opts[:'junction_key_right'].nil?
|
|
103
|
+
|
|
104
|
+
# http body (model)
|
|
105
|
+
post_body = nil
|
|
106
|
+
auth_names = ['api_key']
|
|
107
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
108
|
+
:header_params => header_params,
|
|
109
|
+
:query_params => query_params,
|
|
110
|
+
:form_params => form_params,
|
|
111
|
+
:body => post_body,
|
|
112
|
+
:auth_names => auth_names)
|
|
113
|
+
if @api_client.config.debugging
|
|
114
|
+
@api_client.config.logger.debug "API called: TablesApi#add_column\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
115
|
+
end
|
|
116
|
+
return data, status_code, headers
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Add a new row
|
|
120
|
+
#
|
|
121
|
+
# @param table_id ID of table to return rows from
|
|
122
|
+
# @param custom_data Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
123
|
+
# @param [Hash] opts the optional parameters
|
|
124
|
+
# @return [nil]
|
|
125
|
+
def add_row(table_id, custom_data, opts = {})
|
|
126
|
+
add_row_with_http_info(table_id, custom_data, opts)
|
|
127
|
+
return nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Add a new row
|
|
131
|
+
#
|
|
132
|
+
# @param table_id ID of table to return rows from
|
|
133
|
+
# @param custom_data Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
136
|
+
def add_row_with_http_info(table_id, custom_data, opts = {})
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug "Calling API: TablesApi.add_row ..."
|
|
139
|
+
end
|
|
140
|
+
# verify the required parameter 'table_id' is set
|
|
141
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
142
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.add_row"
|
|
143
|
+
end
|
|
144
|
+
# verify the required parameter 'custom_data' is set
|
|
145
|
+
if @api_client.config.client_side_validation && custom_data.nil?
|
|
146
|
+
fail ArgumentError, "Missing the required parameter 'custom_data' when calling TablesApi.add_row"
|
|
147
|
+
end
|
|
148
|
+
# resource path
|
|
149
|
+
local_var_path = "/tables/{tableId}/rows".sub('{' + 'tableId' + '}', table_id.to_s)
|
|
150
|
+
|
|
151
|
+
# query parameters
|
|
152
|
+
query_params = {}
|
|
153
|
+
|
|
154
|
+
# header parameters
|
|
155
|
+
header_params = {}
|
|
156
|
+
# HTTP header 'Accept' (if needed)
|
|
157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
158
|
+
# HTTP header 'Content-Type'
|
|
159
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
160
|
+
|
|
161
|
+
# form parameters
|
|
162
|
+
form_params = {}
|
|
163
|
+
|
|
164
|
+
# http body (model)
|
|
165
|
+
post_body = @api_client.object_to_http_body(custom_data)
|
|
166
|
+
auth_names = ['api_key']
|
|
167
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
168
|
+
:header_params => header_params,
|
|
169
|
+
:query_params => query_params,
|
|
170
|
+
:form_params => form_params,
|
|
171
|
+
:body => post_body,
|
|
172
|
+
:auth_names => auth_names)
|
|
173
|
+
if @api_client.config.debugging
|
|
174
|
+
@api_client.config.logger.debug "API called: TablesApi#add_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
175
|
+
end
|
|
176
|
+
return data, status_code, headers
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Add a new table
|
|
180
|
+
#
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @option opts [String] :name Name of table to add
|
|
183
|
+
# @return [nil]
|
|
184
|
+
def add_table(opts = {})
|
|
185
|
+
add_table_with_http_info(opts)
|
|
186
|
+
return nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Add a new table
|
|
190
|
+
#
|
|
191
|
+
# @param [Hash] opts the optional parameters
|
|
192
|
+
# @option opts [String] :name Name of table to add
|
|
193
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
194
|
+
def add_table_with_http_info(opts = {})
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug "Calling API: TablesApi.add_table ..."
|
|
197
|
+
end
|
|
198
|
+
# resource path
|
|
199
|
+
local_var_path = "/tables"
|
|
200
|
+
|
|
201
|
+
# query parameters
|
|
202
|
+
query_params = {}
|
|
203
|
+
|
|
204
|
+
# header parameters
|
|
205
|
+
header_params = {}
|
|
206
|
+
# HTTP header 'Accept' (if needed)
|
|
207
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
|
|
208
|
+
# HTTP header 'Content-Type'
|
|
209
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
210
|
+
|
|
211
|
+
# form parameters
|
|
212
|
+
form_params = {}
|
|
213
|
+
form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
|
|
214
|
+
|
|
215
|
+
# http body (model)
|
|
216
|
+
post_body = nil
|
|
217
|
+
auth_names = ['api_key']
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
219
|
+
:header_params => header_params,
|
|
220
|
+
:query_params => query_params,
|
|
221
|
+
:form_params => form_params,
|
|
222
|
+
:body => post_body,
|
|
223
|
+
:auth_names => auth_names)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: TablesApi#add_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Delete row
|
|
231
|
+
#
|
|
232
|
+
# @param table_id ID of table to return rows from
|
|
233
|
+
# @param column_name Name of column to return
|
|
234
|
+
# @param [Hash] opts the optional parameters
|
|
235
|
+
# @return [nil]
|
|
236
|
+
def delete_column(table_id, column_name, opts = {})
|
|
237
|
+
delete_column_with_http_info(table_id, column_name, opts)
|
|
238
|
+
return nil
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Delete row
|
|
242
|
+
#
|
|
243
|
+
# @param table_id ID of table to return rows from
|
|
244
|
+
# @param column_name Name of column to return
|
|
245
|
+
# @param [Hash] opts the optional parameters
|
|
246
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
247
|
+
def delete_column_with_http_info(table_id, column_name, opts = {})
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug "Calling API: TablesApi.delete_column ..."
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'table_id' is set
|
|
252
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.delete_column"
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'column_name' is set
|
|
256
|
+
if @api_client.config.client_side_validation && column_name.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'column_name' when calling TablesApi.delete_column"
|
|
258
|
+
end
|
|
259
|
+
# resource path
|
|
260
|
+
local_var_path = "/tables/{tableId}/columns/{columnName}".sub('{' + 'tableId' + '}', table_id.to_s).sub('{' + 'columnName' + '}', column_name.to_s)
|
|
261
|
+
|
|
262
|
+
# query parameters
|
|
263
|
+
query_params = {}
|
|
264
|
+
|
|
265
|
+
# header parameters
|
|
266
|
+
header_params = {}
|
|
267
|
+
# HTTP header 'Accept' (if needed)
|
|
268
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
269
|
+
# HTTP header 'Content-Type'
|
|
270
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = nil
|
|
277
|
+
auth_names = ['api_key']
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
279
|
+
:header_params => header_params,
|
|
280
|
+
:query_params => query_params,
|
|
281
|
+
:form_params => form_params,
|
|
282
|
+
:body => post_body,
|
|
283
|
+
:auth_names => auth_names)
|
|
284
|
+
if @api_client.config.debugging
|
|
285
|
+
@api_client.config.logger.debug "API called: TablesApi#delete_column\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
286
|
+
end
|
|
287
|
+
return data, status_code, headers
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Delete row
|
|
291
|
+
#
|
|
292
|
+
# @param table_id ID of table to return rows from
|
|
293
|
+
# @param row_id ID of row to return from rows
|
|
294
|
+
# @param [Hash] opts the optional parameters
|
|
295
|
+
# @return [nil]
|
|
296
|
+
def delete_row(table_id, row_id, opts = {})
|
|
297
|
+
delete_row_with_http_info(table_id, row_id, opts)
|
|
298
|
+
return nil
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Delete row
|
|
302
|
+
#
|
|
303
|
+
# @param table_id ID of table to return rows from
|
|
304
|
+
# @param row_id ID of row to return from rows
|
|
305
|
+
# @param [Hash] opts the optional parameters
|
|
306
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
307
|
+
def delete_row_with_http_info(table_id, row_id, opts = {})
|
|
308
|
+
if @api_client.config.debugging
|
|
309
|
+
@api_client.config.logger.debug "Calling API: TablesApi.delete_row ..."
|
|
310
|
+
end
|
|
311
|
+
# verify the required parameter 'table_id' is set
|
|
312
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
313
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.delete_row"
|
|
314
|
+
end
|
|
315
|
+
# verify the required parameter 'row_id' is set
|
|
316
|
+
if @api_client.config.client_side_validation && row_id.nil?
|
|
317
|
+
fail ArgumentError, "Missing the required parameter 'row_id' when calling TablesApi.delete_row"
|
|
318
|
+
end
|
|
319
|
+
# resource path
|
|
320
|
+
local_var_path = "/tables/{tableId}/rows/{rowId}".sub('{' + 'tableId' + '}', table_id.to_s).sub('{' + 'rowId' + '}', row_id.to_s)
|
|
321
|
+
|
|
322
|
+
# query parameters
|
|
323
|
+
query_params = {}
|
|
324
|
+
|
|
325
|
+
# header parameters
|
|
326
|
+
header_params = {}
|
|
327
|
+
# HTTP header 'Accept' (if needed)
|
|
328
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
329
|
+
# HTTP header 'Content-Type'
|
|
330
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
331
|
+
|
|
332
|
+
# form parameters
|
|
333
|
+
form_params = {}
|
|
334
|
+
|
|
335
|
+
# http body (model)
|
|
336
|
+
post_body = nil
|
|
337
|
+
auth_names = ['api_key']
|
|
338
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
339
|
+
:header_params => header_params,
|
|
340
|
+
:query_params => query_params,
|
|
341
|
+
:form_params => form_params,
|
|
342
|
+
:body => post_body,
|
|
343
|
+
:auth_names => auth_names)
|
|
344
|
+
if @api_client.config.debugging
|
|
345
|
+
@api_client.config.logger.debug "API called: TablesApi#delete_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
+
end
|
|
347
|
+
return data, status_code, headers
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Delete Table
|
|
351
|
+
#
|
|
352
|
+
# @param table_id ID of table to return rows from
|
|
353
|
+
# @param [Hash] opts the optional parameters
|
|
354
|
+
# @return [nil]
|
|
355
|
+
def delete_table(table_id, opts = {})
|
|
356
|
+
delete_table_with_http_info(table_id, opts)
|
|
357
|
+
return nil
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Delete Table
|
|
361
|
+
#
|
|
362
|
+
# @param table_id ID of table to return rows from
|
|
363
|
+
# @param [Hash] opts the optional parameters
|
|
364
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
365
|
+
def delete_table_with_http_info(table_id, opts = {})
|
|
366
|
+
if @api_client.config.debugging
|
|
367
|
+
@api_client.config.logger.debug "Calling API: TablesApi.delete_table ..."
|
|
368
|
+
end
|
|
369
|
+
# verify the required parameter 'table_id' is set
|
|
370
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
371
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.delete_table"
|
|
372
|
+
end
|
|
373
|
+
# resource path
|
|
374
|
+
local_var_path = "/tables/{tableId}".sub('{' + 'tableId' + '}', table_id.to_s)
|
|
375
|
+
|
|
376
|
+
# query parameters
|
|
377
|
+
query_params = {}
|
|
378
|
+
|
|
379
|
+
# header parameters
|
|
380
|
+
header_params = {}
|
|
381
|
+
# HTTP header 'Accept' (if needed)
|
|
382
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
383
|
+
# HTTP header 'Content-Type'
|
|
384
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
385
|
+
|
|
386
|
+
# form parameters
|
|
387
|
+
form_params = {}
|
|
388
|
+
|
|
389
|
+
# http body (model)
|
|
390
|
+
post_body = nil
|
|
391
|
+
auth_names = ['api_key']
|
|
392
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
393
|
+
:header_params => header_params,
|
|
394
|
+
:query_params => query_params,
|
|
395
|
+
:form_params => form_params,
|
|
396
|
+
:body => post_body,
|
|
397
|
+
:auth_names => auth_names)
|
|
398
|
+
if @api_client.config.debugging
|
|
399
|
+
@api_client.config.logger.debug "API called: TablesApi#delete_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
400
|
+
end
|
|
401
|
+
return data, status_code, headers
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Returns specific table
|
|
405
|
+
#
|
|
406
|
+
# @param table_id ID of table to return rows from
|
|
407
|
+
# @param [Hash] opts the optional parameters
|
|
408
|
+
# @return [GetTable]
|
|
409
|
+
def get_table(table_id, opts = {})
|
|
410
|
+
data, _status_code, _headers = get_table_with_http_info(table_id, opts)
|
|
411
|
+
return data
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Returns specific table
|
|
415
|
+
#
|
|
416
|
+
# @param table_id ID of table to return rows from
|
|
417
|
+
# @param [Hash] opts the optional parameters
|
|
418
|
+
# @return [Array<(GetTable, Fixnum, Hash)>] GetTable data, response status code and response headers
|
|
419
|
+
def get_table_with_http_info(table_id, opts = {})
|
|
420
|
+
if @api_client.config.debugging
|
|
421
|
+
@api_client.config.logger.debug "Calling API: TablesApi.get_table ..."
|
|
422
|
+
end
|
|
423
|
+
# verify the required parameter 'table_id' is set
|
|
424
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
425
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.get_table"
|
|
426
|
+
end
|
|
427
|
+
# resource path
|
|
428
|
+
local_var_path = "/tables/{tableId}".sub('{' + 'tableId' + '}', table_id.to_s)
|
|
429
|
+
|
|
430
|
+
# query parameters
|
|
431
|
+
query_params = {}
|
|
432
|
+
|
|
433
|
+
# header parameters
|
|
434
|
+
header_params = {}
|
|
435
|
+
# HTTP header 'Accept' (if needed)
|
|
436
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
437
|
+
|
|
438
|
+
# form parameters
|
|
439
|
+
form_params = {}
|
|
440
|
+
|
|
441
|
+
# http body (model)
|
|
442
|
+
post_body = nil
|
|
443
|
+
auth_names = ['api_key']
|
|
444
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
445
|
+
:header_params => header_params,
|
|
446
|
+
:query_params => query_params,
|
|
447
|
+
:form_params => form_params,
|
|
448
|
+
:body => post_body,
|
|
449
|
+
:auth_names => auth_names,
|
|
450
|
+
:return_type => 'GetTable')
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug "API called: TablesApi#get_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
453
|
+
end
|
|
454
|
+
return data, status_code, headers
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Returns specific table column
|
|
458
|
+
#
|
|
459
|
+
# @param table_id ID of table to return rows from
|
|
460
|
+
# @param column_name Name of column to return
|
|
461
|
+
# @param [Hash] opts the optional parameters
|
|
462
|
+
# @return [GetTableColumn]
|
|
463
|
+
def get_table_column(table_id, column_name, opts = {})
|
|
464
|
+
data, _status_code, _headers = get_table_column_with_http_info(table_id, column_name, opts)
|
|
465
|
+
return data
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Returns specific table column
|
|
469
|
+
#
|
|
470
|
+
# @param table_id ID of table to return rows from
|
|
471
|
+
# @param column_name Name of column to return
|
|
472
|
+
# @param [Hash] opts the optional parameters
|
|
473
|
+
# @return [Array<(GetTableColumn, Fixnum, Hash)>] GetTableColumn data, response status code and response headers
|
|
474
|
+
def get_table_column_with_http_info(table_id, column_name, opts = {})
|
|
475
|
+
if @api_client.config.debugging
|
|
476
|
+
@api_client.config.logger.debug "Calling API: TablesApi.get_table_column ..."
|
|
477
|
+
end
|
|
478
|
+
# verify the required parameter 'table_id' is set
|
|
479
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
480
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.get_table_column"
|
|
481
|
+
end
|
|
482
|
+
# verify the required parameter 'column_name' is set
|
|
483
|
+
if @api_client.config.client_side_validation && column_name.nil?
|
|
484
|
+
fail ArgumentError, "Missing the required parameter 'column_name' when calling TablesApi.get_table_column"
|
|
485
|
+
end
|
|
486
|
+
# resource path
|
|
487
|
+
local_var_path = "/tables/{tableId}/columns/{columnName}".sub('{' + 'tableId' + '}', table_id.to_s).sub('{' + 'columnName' + '}', column_name.to_s)
|
|
488
|
+
|
|
489
|
+
# query parameters
|
|
490
|
+
query_params = {}
|
|
491
|
+
|
|
492
|
+
# header parameters
|
|
493
|
+
header_params = {}
|
|
494
|
+
# HTTP header 'Accept' (if needed)
|
|
495
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
496
|
+
|
|
497
|
+
# form parameters
|
|
498
|
+
form_params = {}
|
|
499
|
+
|
|
500
|
+
# http body (model)
|
|
501
|
+
post_body = nil
|
|
502
|
+
auth_names = ['api_key']
|
|
503
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
504
|
+
:header_params => header_params,
|
|
505
|
+
:query_params => query_params,
|
|
506
|
+
:form_params => form_params,
|
|
507
|
+
:body => post_body,
|
|
508
|
+
:auth_names => auth_names,
|
|
509
|
+
:return_type => 'GetTableColumn')
|
|
510
|
+
if @api_client.config.debugging
|
|
511
|
+
@api_client.config.logger.debug "API called: TablesApi#get_table_column\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
512
|
+
end
|
|
513
|
+
return data, status_code, headers
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Returns table columns
|
|
517
|
+
#
|
|
518
|
+
# @param table_id ID of table to return rows from
|
|
519
|
+
# @param [Hash] opts the optional parameters
|
|
520
|
+
# @return [GetTableColumns]
|
|
521
|
+
def get_table_columns(table_id, opts = {})
|
|
522
|
+
data, _status_code, _headers = get_table_columns_with_http_info(table_id, opts)
|
|
523
|
+
return data
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
# Returns table columns
|
|
527
|
+
#
|
|
528
|
+
# @param table_id ID of table to return rows from
|
|
529
|
+
# @param [Hash] opts the optional parameters
|
|
530
|
+
# @return [Array<(GetTableColumns, Fixnum, Hash)>] GetTableColumns data, response status code and response headers
|
|
531
|
+
def get_table_columns_with_http_info(table_id, opts = {})
|
|
532
|
+
if @api_client.config.debugging
|
|
533
|
+
@api_client.config.logger.debug "Calling API: TablesApi.get_table_columns ..."
|
|
534
|
+
end
|
|
535
|
+
# verify the required parameter 'table_id' is set
|
|
536
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
537
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.get_table_columns"
|
|
538
|
+
end
|
|
539
|
+
# resource path
|
|
540
|
+
local_var_path = "/tables/{tableId}/columns".sub('{' + 'tableId' + '}', table_id.to_s)
|
|
541
|
+
|
|
542
|
+
# query parameters
|
|
543
|
+
query_params = {}
|
|
544
|
+
|
|
545
|
+
# header parameters
|
|
546
|
+
header_params = {}
|
|
547
|
+
# HTTP header 'Accept' (if needed)
|
|
548
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
549
|
+
|
|
550
|
+
# form parameters
|
|
551
|
+
form_params = {}
|
|
552
|
+
|
|
553
|
+
# http body (model)
|
|
554
|
+
post_body = nil
|
|
555
|
+
auth_names = ['api_key']
|
|
556
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
557
|
+
:header_params => header_params,
|
|
558
|
+
:query_params => query_params,
|
|
559
|
+
:form_params => form_params,
|
|
560
|
+
:body => post_body,
|
|
561
|
+
:auth_names => auth_names,
|
|
562
|
+
:return_type => 'GetTableColumns')
|
|
563
|
+
if @api_client.config.debugging
|
|
564
|
+
@api_client.config.logger.debug "API called: TablesApi#get_table_columns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
565
|
+
end
|
|
566
|
+
return data, status_code, headers
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
# Returns specific table row
|
|
570
|
+
#
|
|
571
|
+
# @param table_id ID of table to return rows from
|
|
572
|
+
# @param row_id ID of row to return from rows
|
|
573
|
+
# @param [Hash] opts the optional parameters
|
|
574
|
+
# @return [GetTableRow]
|
|
575
|
+
def get_table_row(table_id, row_id, opts = {})
|
|
576
|
+
data, _status_code, _headers = get_table_row_with_http_info(table_id, row_id, opts)
|
|
577
|
+
return data
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
# Returns specific table row
|
|
581
|
+
#
|
|
582
|
+
# @param table_id ID of table to return rows from
|
|
583
|
+
# @param row_id ID of row to return from rows
|
|
584
|
+
# @param [Hash] opts the optional parameters
|
|
585
|
+
# @return [Array<(GetTableRow, Fixnum, Hash)>] GetTableRow data, response status code and response headers
|
|
586
|
+
def get_table_row_with_http_info(table_id, row_id, opts = {})
|
|
587
|
+
if @api_client.config.debugging
|
|
588
|
+
@api_client.config.logger.debug "Calling API: TablesApi.get_table_row ..."
|
|
589
|
+
end
|
|
590
|
+
# verify the required parameter 'table_id' is set
|
|
591
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
592
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.get_table_row"
|
|
593
|
+
end
|
|
594
|
+
# verify the required parameter 'row_id' is set
|
|
595
|
+
if @api_client.config.client_side_validation && row_id.nil?
|
|
596
|
+
fail ArgumentError, "Missing the required parameter 'row_id' when calling TablesApi.get_table_row"
|
|
597
|
+
end
|
|
598
|
+
# resource path
|
|
599
|
+
local_var_path = "/tables/{tableId}/rows/{rowId}".sub('{' + 'tableId' + '}', table_id.to_s).sub('{' + 'rowId' + '}', row_id.to_s)
|
|
600
|
+
|
|
601
|
+
# query parameters
|
|
602
|
+
query_params = {}
|
|
603
|
+
|
|
604
|
+
# header parameters
|
|
605
|
+
header_params = {}
|
|
606
|
+
# HTTP header 'Accept' (if needed)
|
|
607
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
608
|
+
|
|
609
|
+
# form parameters
|
|
610
|
+
form_params = {}
|
|
611
|
+
|
|
612
|
+
# http body (model)
|
|
613
|
+
post_body = nil
|
|
614
|
+
auth_names = ['api_key']
|
|
615
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
616
|
+
:header_params => header_params,
|
|
617
|
+
:query_params => query_params,
|
|
618
|
+
:form_params => form_params,
|
|
619
|
+
:body => post_body,
|
|
620
|
+
:auth_names => auth_names,
|
|
621
|
+
:return_type => 'GetTableRow')
|
|
622
|
+
if @api_client.config.debugging
|
|
623
|
+
@api_client.config.logger.debug "API called: TablesApi#get_table_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
624
|
+
end
|
|
625
|
+
return data, status_code, headers
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
# Returns table rows
|
|
629
|
+
#
|
|
630
|
+
# @param table_id ID of table to return rows from
|
|
631
|
+
# @param [Hash] opts the optional parameters
|
|
632
|
+
# @return [GetTableRows]
|
|
633
|
+
def get_table_rows(table_id, opts = {})
|
|
634
|
+
data, _status_code, _headers = get_table_rows_with_http_info(table_id, opts)
|
|
635
|
+
return data
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# Returns table rows
|
|
639
|
+
#
|
|
640
|
+
# @param table_id ID of table to return rows from
|
|
641
|
+
# @param [Hash] opts the optional parameters
|
|
642
|
+
# @return [Array<(GetTableRows, Fixnum, Hash)>] GetTableRows data, response status code and response headers
|
|
643
|
+
def get_table_rows_with_http_info(table_id, opts = {})
|
|
644
|
+
if @api_client.config.debugging
|
|
645
|
+
@api_client.config.logger.debug "Calling API: TablesApi.get_table_rows ..."
|
|
646
|
+
end
|
|
647
|
+
# verify the required parameter 'table_id' is set
|
|
648
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
649
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.get_table_rows"
|
|
650
|
+
end
|
|
651
|
+
# resource path
|
|
652
|
+
local_var_path = "/tables/{tableId}/rows".sub('{' + 'tableId' + '}', table_id.to_s)
|
|
653
|
+
|
|
654
|
+
# query parameters
|
|
655
|
+
query_params = {}
|
|
656
|
+
|
|
657
|
+
# header parameters
|
|
658
|
+
header_params = {}
|
|
659
|
+
# HTTP header 'Accept' (if needed)
|
|
660
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
661
|
+
|
|
662
|
+
# form parameters
|
|
663
|
+
form_params = {}
|
|
664
|
+
|
|
665
|
+
# http body (model)
|
|
666
|
+
post_body = nil
|
|
667
|
+
auth_names = ['api_key']
|
|
668
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
669
|
+
:header_params => header_params,
|
|
670
|
+
:query_params => query_params,
|
|
671
|
+
:form_params => form_params,
|
|
672
|
+
:body => post_body,
|
|
673
|
+
:auth_names => auth_names,
|
|
674
|
+
:return_type => 'GetTableRows')
|
|
675
|
+
if @api_client.config.debugging
|
|
676
|
+
@api_client.config.logger.debug "API called: TablesApi#get_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
677
|
+
end
|
|
678
|
+
return data, status_code, headers
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
# Returns tables
|
|
682
|
+
#
|
|
683
|
+
# @param [Hash] opts the optional parameters
|
|
684
|
+
# @return [GetTables]
|
|
685
|
+
def get_tables(opts = {})
|
|
686
|
+
data, _status_code, _headers = get_tables_with_http_info(opts)
|
|
687
|
+
return data
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
# Returns tables
|
|
691
|
+
#
|
|
692
|
+
# @param [Hash] opts the optional parameters
|
|
693
|
+
# @return [Array<(GetTables, Fixnum, Hash)>] GetTables data, response status code and response headers
|
|
694
|
+
def get_tables_with_http_info(opts = {})
|
|
695
|
+
if @api_client.config.debugging
|
|
696
|
+
@api_client.config.logger.debug "Calling API: TablesApi.get_tables ..."
|
|
697
|
+
end
|
|
698
|
+
# resource path
|
|
699
|
+
local_var_path = "/tables"
|
|
700
|
+
|
|
701
|
+
# query parameters
|
|
702
|
+
query_params = {}
|
|
703
|
+
|
|
704
|
+
# header parameters
|
|
705
|
+
header_params = {}
|
|
706
|
+
# HTTP header 'Accept' (if needed)
|
|
707
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
708
|
+
|
|
709
|
+
# form parameters
|
|
710
|
+
form_params = {}
|
|
711
|
+
|
|
712
|
+
# http body (model)
|
|
713
|
+
post_body = nil
|
|
714
|
+
auth_names = ['api_key']
|
|
715
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
716
|
+
:header_params => header_params,
|
|
717
|
+
:query_params => query_params,
|
|
718
|
+
:form_params => form_params,
|
|
719
|
+
:body => post_body,
|
|
720
|
+
:auth_names => auth_names,
|
|
721
|
+
:return_type => 'GetTables')
|
|
722
|
+
if @api_client.config.debugging
|
|
723
|
+
@api_client.config.logger.debug "API called: TablesApi#get_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
724
|
+
end
|
|
725
|
+
return data, status_code, headers
|
|
726
|
+
end
|
|
727
|
+
|
|
728
|
+
# Update column
|
|
729
|
+
#
|
|
730
|
+
# @param table_id ID of table to return rows from
|
|
731
|
+
# @param column_name Name of column to return
|
|
732
|
+
# @param [Hash] opts the optional parameters
|
|
733
|
+
# @option opts [String] :data_type The datatype of the column, eg: INT
|
|
734
|
+
# @option opts [String] :ui The Directus Interface to use for this column
|
|
735
|
+
# @option opts [BOOLEAN] :hidden_input Whether the column will be hidden (globally) on the Edit Item page
|
|
736
|
+
# @option opts [BOOLEAN] :hidden_list Whether the column will be hidden (globally) on the Item Listing page
|
|
737
|
+
# @option opts [BOOLEAN] :required Whether the column is required. If required, the interface's validation function will be triggered
|
|
738
|
+
# @option opts [Integer] :sort The sort order of the column used to override the column order in the schema
|
|
739
|
+
# @option opts [String] :comment A helpful note to users for this column
|
|
740
|
+
# @option opts [String] :relationship_type The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE
|
|
741
|
+
# @option opts [String] :related_table The table name this column is related to (only used when storing relational data)
|
|
742
|
+
# @option opts [String] :junction_table The pivot/junction table that joins the column's table with the related table (only used when storing relational data)
|
|
743
|
+
# @option opts [String] :junction_key_left The column name in junction that is related to the column's table (only used when storing relational data)
|
|
744
|
+
# @option opts [String] :junction_key_right The column name in junction that is related to the related table (only used when storing relational data)
|
|
745
|
+
# @return [nil]
|
|
746
|
+
def update_column(table_id, column_name, opts = {})
|
|
747
|
+
update_column_with_http_info(table_id, column_name, opts)
|
|
748
|
+
return nil
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# Update column
|
|
752
|
+
#
|
|
753
|
+
# @param table_id ID of table to return rows from
|
|
754
|
+
# @param column_name Name of column to return
|
|
755
|
+
# @param [Hash] opts the optional parameters
|
|
756
|
+
# @option opts [String] :data_type The datatype of the column, eg: INT
|
|
757
|
+
# @option opts [String] :ui The Directus Interface to use for this column
|
|
758
|
+
# @option opts [BOOLEAN] :hidden_input Whether the column will be hidden (globally) on the Edit Item page
|
|
759
|
+
# @option opts [BOOLEAN] :hidden_list Whether the column will be hidden (globally) on the Item Listing page
|
|
760
|
+
# @option opts [BOOLEAN] :required Whether the column is required. If required, the interface's validation function will be triggered
|
|
761
|
+
# @option opts [Integer] :sort The sort order of the column used to override the column order in the schema
|
|
762
|
+
# @option opts [String] :comment A helpful note to users for this column
|
|
763
|
+
# @option opts [String] :relationship_type The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE
|
|
764
|
+
# @option opts [String] :related_table The table name this column is related to (only used when storing relational data)
|
|
765
|
+
# @option opts [String] :junction_table The pivot/junction table that joins the column's table with the related table (only used when storing relational data)
|
|
766
|
+
# @option opts [String] :junction_key_left The column name in junction that is related to the column's table (only used when storing relational data)
|
|
767
|
+
# @option opts [String] :junction_key_right The column name in junction that is related to the related table (only used when storing relational data)
|
|
768
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
769
|
+
def update_column_with_http_info(table_id, column_name, opts = {})
|
|
770
|
+
if @api_client.config.debugging
|
|
771
|
+
@api_client.config.logger.debug "Calling API: TablesApi.update_column ..."
|
|
772
|
+
end
|
|
773
|
+
# verify the required parameter 'table_id' is set
|
|
774
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
775
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.update_column"
|
|
776
|
+
end
|
|
777
|
+
# verify the required parameter 'column_name' is set
|
|
778
|
+
if @api_client.config.client_side_validation && column_name.nil?
|
|
779
|
+
fail ArgumentError, "Missing the required parameter 'column_name' when calling TablesApi.update_column"
|
|
780
|
+
end
|
|
781
|
+
# resource path
|
|
782
|
+
local_var_path = "/tables/{tableId}/columns/{columnName}".sub('{' + 'tableId' + '}', table_id.to_s).sub('{' + 'columnName' + '}', column_name.to_s)
|
|
783
|
+
|
|
784
|
+
# query parameters
|
|
785
|
+
query_params = {}
|
|
786
|
+
|
|
787
|
+
# header parameters
|
|
788
|
+
header_params = {}
|
|
789
|
+
# HTTP header 'Accept' (if needed)
|
|
790
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
791
|
+
# HTTP header 'Content-Type'
|
|
792
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
793
|
+
|
|
794
|
+
# form parameters
|
|
795
|
+
form_params = {}
|
|
796
|
+
form_params["data_type"] = opts[:'data_type'] if !opts[:'data_type'].nil?
|
|
797
|
+
form_params["ui"] = opts[:'ui'] if !opts[:'ui'].nil?
|
|
798
|
+
form_params["hidden_input"] = opts[:'hidden_input'] if !opts[:'hidden_input'].nil?
|
|
799
|
+
form_params["hidden_list"] = opts[:'hidden_list'] if !opts[:'hidden_list'].nil?
|
|
800
|
+
form_params["required"] = opts[:'required'] if !opts[:'required'].nil?
|
|
801
|
+
form_params["sort"] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
802
|
+
form_params["comment"] = opts[:'comment'] if !opts[:'comment'].nil?
|
|
803
|
+
form_params["relationship_type"] = opts[:'relationship_type'] if !opts[:'relationship_type'].nil?
|
|
804
|
+
form_params["related_table"] = opts[:'related_table'] if !opts[:'related_table'].nil?
|
|
805
|
+
form_params["junction_table"] = opts[:'junction_table'] if !opts[:'junction_table'].nil?
|
|
806
|
+
form_params["junction_key_left"] = opts[:'junction_key_left'] if !opts[:'junction_key_left'].nil?
|
|
807
|
+
form_params["junction_key_right"] = opts[:'junction_key_right'] if !opts[:'junction_key_right'].nil?
|
|
808
|
+
|
|
809
|
+
# http body (model)
|
|
810
|
+
post_body = nil
|
|
811
|
+
auth_names = ['api_key']
|
|
812
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
813
|
+
:header_params => header_params,
|
|
814
|
+
:query_params => query_params,
|
|
815
|
+
:form_params => form_params,
|
|
816
|
+
:body => post_body,
|
|
817
|
+
:auth_names => auth_names)
|
|
818
|
+
if @api_client.config.debugging
|
|
819
|
+
@api_client.config.logger.debug "API called: TablesApi#update_column\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
820
|
+
end
|
|
821
|
+
return data, status_code, headers
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
# Update row
|
|
825
|
+
#
|
|
826
|
+
# @param table_id ID of table to return rows from
|
|
827
|
+
# @param row_id ID of row to return from rows
|
|
828
|
+
# @param custom_data Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
829
|
+
# @param [Hash] opts the optional parameters
|
|
830
|
+
# @return [nil]
|
|
831
|
+
def update_row(table_id, row_id, custom_data, opts = {})
|
|
832
|
+
update_row_with_http_info(table_id, row_id, custom_data, opts)
|
|
833
|
+
return nil
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
# Update row
|
|
837
|
+
#
|
|
838
|
+
# @param table_id ID of table to return rows from
|
|
839
|
+
# @param row_id ID of row to return from rows
|
|
840
|
+
# @param custom_data Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
841
|
+
# @param [Hash] opts the optional parameters
|
|
842
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
843
|
+
def update_row_with_http_info(table_id, row_id, custom_data, opts = {})
|
|
844
|
+
if @api_client.config.debugging
|
|
845
|
+
@api_client.config.logger.debug "Calling API: TablesApi.update_row ..."
|
|
846
|
+
end
|
|
847
|
+
# verify the required parameter 'table_id' is set
|
|
848
|
+
if @api_client.config.client_side_validation && table_id.nil?
|
|
849
|
+
fail ArgumentError, "Missing the required parameter 'table_id' when calling TablesApi.update_row"
|
|
850
|
+
end
|
|
851
|
+
# verify the required parameter 'row_id' is set
|
|
852
|
+
if @api_client.config.client_side_validation && row_id.nil?
|
|
853
|
+
fail ArgumentError, "Missing the required parameter 'row_id' when calling TablesApi.update_row"
|
|
854
|
+
end
|
|
855
|
+
# verify the required parameter 'custom_data' is set
|
|
856
|
+
if @api_client.config.client_side_validation && custom_data.nil?
|
|
857
|
+
fail ArgumentError, "Missing the required parameter 'custom_data' when calling TablesApi.update_row"
|
|
858
|
+
end
|
|
859
|
+
# resource path
|
|
860
|
+
local_var_path = "/tables/{tableId}/rows/{rowId}".sub('{' + 'tableId' + '}', table_id.to_s).sub('{' + 'rowId' + '}', row_id.to_s)
|
|
861
|
+
|
|
862
|
+
# query parameters
|
|
863
|
+
query_params = {}
|
|
864
|
+
|
|
865
|
+
# header parameters
|
|
866
|
+
header_params = {}
|
|
867
|
+
# HTTP header 'Accept' (if needed)
|
|
868
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
869
|
+
# HTTP header 'Content-Type'
|
|
870
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
871
|
+
|
|
872
|
+
# form parameters
|
|
873
|
+
form_params = {}
|
|
874
|
+
|
|
875
|
+
# http body (model)
|
|
876
|
+
post_body = @api_client.object_to_http_body(custom_data)
|
|
877
|
+
auth_names = ['api_key']
|
|
878
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
879
|
+
:header_params => header_params,
|
|
880
|
+
:query_params => query_params,
|
|
881
|
+
:form_params => form_params,
|
|
882
|
+
:body => post_body,
|
|
883
|
+
:auth_names => auth_names)
|
|
884
|
+
if @api_client.config.debugging
|
|
885
|
+
@api_client.config.logger.debug "API called: TablesApi#update_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
886
|
+
end
|
|
887
|
+
return data, status_code, headers
|
|
888
|
+
end
|
|
889
|
+
end
|
|
890
|
+
end
|