Class: OryClient::WriteApi
- Inherits:
-
Object
- Object
- OryClient::WriteApi
- Defined in:
- lib/ory-client/api/write_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_relation_tuple(opts = {}) ⇒ RelationQuery
Create a Relation Tuple Use this endpoint to create a relation tuple.
-
#create_relation_tuple_with_http_info(opts = {}) ⇒ Array<(RelationQuery, Integer, Hash)>
Create a Relation Tuple Use this endpoint to create a relation tuple.
-
#delete_relation_tuples(opts = {}) ⇒ nil
Delete Relation Tuples Use this endpoint to delete relation tuples.
-
#delete_relation_tuples_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Relation Tuples Use this endpoint to delete relation tuples.
-
#initialize(api_client = ApiClient.default) ⇒ WriteApi
constructor
A new instance of WriteApi.
-
#patch_relation_tuples(opts = {}) ⇒ nil
Patch Multiple Relation Tuples Use this endpoint to patch one or more relation tuples.
-
#patch_relation_tuples_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Patch Multiple Relation Tuples Use this endpoint to patch one or more relation tuples.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ory-client/api/write_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_relation_tuple(opts = {}) ⇒ RelationQuery
Create a Relation Tuple Use this endpoint to create a relation tuple.
27 28 29 30 |
# File 'lib/ory-client/api/write_api.rb', line 27 def create_relation_tuple(opts = {}) data, _status_code, _headers = create_relation_tuple_with_http_info(opts) data end |
#create_relation_tuple_with_http_info(opts = {}) ⇒ Array<(RelationQuery, Integer, Hash)>
Create a Relation Tuple Use this endpoint to create a relation tuple.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/ory-client/api/write_api.rb', line 37 def create_relation_tuple_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WriteApi.create_relation_tuple ...' end # resource path local_var_path = '/admin/relation-tuples' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'relation_query']) # return_type return_type = opts[:debug_return_type] || 'RelationQuery' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"WriteApi.create_relation_tuple", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WriteApi#create_relation_tuple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_relation_tuples(opts = {}) ⇒ nil
Delete Relation Tuples Use this endpoint to delete relation tuples
97 98 99 100 |
# File 'lib/ory-client/api/write_api.rb', line 97 def delete_relation_tuples(opts = {}) delete_relation_tuples_with_http_info(opts) nil end |
#delete_relation_tuples_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Relation Tuples Use this endpoint to delete relation tuples
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/ory-client/api/write_api.rb', line 113 def delete_relation_tuples_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WriteApi.delete_relation_tuples ...' end # resource path local_var_path = '/admin/relation-tuples' # query parameters query_params = opts[:query_params] || {} query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil? query_params[:'object'] = opts[:'object'] if !opts[:'object'].nil? query_params[:'relation'] = opts[:'relation'] if !opts[:'relation'].nil? query_params[:'subject_id'] = opts[:'subject_id'] if !opts[:'subject_id'].nil? query_params[:'subject_set.namespace'] = opts[:'subject_set_namespace'] if !opts[:'subject_set_namespace'].nil? query_params[:'subject_set.object'] = opts[:'subject_set_object'] if !opts[:'subject_set_object'].nil? query_params[:'subject_set.relation'] = opts[:'subject_set_relation'] if !opts[:'subject_set_relation'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"WriteApi.delete_relation_tuples", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WriteApi#delete_relation_tuples\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_relation_tuples(opts = {}) ⇒ nil
Patch Multiple Relation Tuples Use this endpoint to patch one or more relation tuples.
169 170 171 172 |
# File 'lib/ory-client/api/write_api.rb', line 169 def patch_relation_tuples(opts = {}) patch_relation_tuples_with_http_info(opts) nil end |
#patch_relation_tuples_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Patch Multiple Relation Tuples Use this endpoint to patch one or more relation tuples.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/ory-client/api/write_api.rb', line 179 def patch_relation_tuples_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WriteApi.patch_relation_tuples ...' end # resource path local_var_path = '/admin/relation-tuples' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_delta']) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"WriteApi.patch_relation_tuples", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WriteApi#patch_relation_tuples\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |