Class: EjabberdHttpClient::RosterApi
- Inherits:
-
Object
- Object
- EjabberdHttpClient::RosterApi
- Defined in:
- lib/ejabberd_http_client/api/roster_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_roster_item(add_roster_item_request, opts = {}) ⇒ nil
Add an item to a user’s roster (supports ODBC).
-
#add_roster_item_with_http_info(add_roster_item_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add an item to a user's roster (supports ODBC).
-
#get_roster(get_offline_count_request, opts = {}) ⇒ Array<GetRoster200ResponseInner>
Get list of contacts in a local user roster.
-
#get_roster_with_http_info(get_offline_count_request, opts = {}) ⇒ Array<(Array<GetRoster200ResponseInner>, Integer, Hash)>
Get list of contacts in a local user roster.
-
#initialize(api_client = ApiClient.default) ⇒ RosterApi
constructor
A new instance of RosterApi.
-
#process_roster_items(opts = {}) ⇒ Array<ProcessRosterItems200ResponseInner>
List/delete rosteritems that match filter.
-
#process_roster_items_with_http_info(opts = {}) ⇒ Array<(Array<ProcessRosterItems200ResponseInner>, Integer, Hash)>
List/delete rosteritems that match filter.
-
#push_all_to_all(opts = {}) ⇒ Integer
Add all the users to all the users of Host in Group.
-
#push_all_to_all_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Add all the users to all the users of Host in Group.
-
#push_roster(opts = {}) ⇒ Integer
Push template roster from file to a user.
-
#push_roster_all(opts = {}) ⇒ Integer
Push template roster from file to all those users.
-
#push_roster_all_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Push template roster from file to all those users.
-
#push_roster_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Push template roster from file to a user.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_roster_item(add_roster_item_request, opts = {}) ⇒ nil
Add an item to a user’s roster (supports ODBC). Groups can be multiple, separated by ; (e.g., g1;g2;g3).
26 27 28 29 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 26 def add_roster_item(add_roster_item_request, opts = {}) add_roster_item_with_http_info(add_roster_item_request, opts) nil end |
#add_roster_item_with_http_info(add_roster_item_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add an item to a user's roster (supports ODBC). Groups can be multiple, separated by ; (e.g., g1;g2;g3).
35 36 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/ejabberd_http_client/api/roster_api.rb', line 35 def add_roster_item_with_http_info(add_roster_item_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RosterApi.add_roster_item ...' end # verify the required parameter 'add_roster_item_request' is set if @api_client.config.client_side_validation && add_roster_item_request.nil? fail ArgumentError, "Missing the required parameter 'add_roster_item_request' when calling RosterApi.add_roster_item" end # resource path local_var_path = '/api/add_rosteritem' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # 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(add_roster_item_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RosterApi.add_roster_item", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RosterApi#add_roster_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_roster(get_offline_count_request, opts = {}) ⇒ Array<GetRoster200ResponseInner>
Get list of contacts in a local user roster.
90 91 92 93 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 90 def get_roster(get_offline_count_request, opts = {}) data, _status_code, _headers = get_roster_with_http_info(get_offline_count_request, opts) data end |
#get_roster_with_http_info(get_offline_count_request, opts = {}) ⇒ Array<(Array<GetRoster200ResponseInner>, Integer, Hash)>
Get list of contacts in a local user roster.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 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 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 99 def get_roster_with_http_info(get_offline_count_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RosterApi.get_roster ...' end # verify the required parameter 'get_offline_count_request' is set if @api_client.config.client_side_validation && get_offline_count_request.nil? fail ArgumentError, "Missing the required parameter 'get_offline_count_request' when calling RosterApi.get_roster" end # resource path local_var_path = '/api/get_roster' # 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(get_offline_count_request) # return_type return_type = opts[:debug_return_type] || 'Array<GetRoster200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RosterApi.get_roster", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RosterApi#get_roster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#process_roster_items(opts = {}) ⇒ Array<ProcessRosterItems200ResponseInner>
List/delete rosteritems that match filter.
156 157 158 159 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 156 def process_roster_items(opts = {}) data, _status_code, _headers = process_roster_items_with_http_info(opts) data end |
#process_roster_items_with_http_info(opts = {}) ⇒ Array<(Array<ProcessRosterItems200ResponseInner>, Integer, Hash)>
List/delete rosteritems that match filter.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 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 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 165 def process_roster_items_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RosterApi.process_roster_items ...' end # resource path local_var_path = '/api/process_rosteritems' # 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[:'process_roster_items_request']) # return_type return_type = opts[:debug_return_type] || 'Array<ProcessRosterItems200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RosterApi.process_roster_items", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RosterApi#process_roster_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#push_all_to_all(opts = {}) ⇒ Integer
Add all the users to all the users of Host in Group.
218 219 220 221 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 218 def push_all_to_all(opts = {}) data, _status_code, _headers = push_all_to_all_with_http_info(opts) data end |
#push_all_to_all_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Add all the users to all the users of Host in Group.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 227 def push_all_to_all_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RosterApi.push_all_to_all ...' end # resource path local_var_path = '/api/push_alltoall' # 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[:'push_all_to_all_request']) # return_type return_type = opts[:debug_return_type] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RosterApi.push_all_to_all", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RosterApi#push_all_to_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#push_roster(opts = {}) ⇒ Integer
Push template roster from file to a user.
280 281 282 283 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 280 def push_roster(opts = {}) data, _status_code, _headers = push_roster_with_http_info(opts) data end |
#push_roster_all(opts = {}) ⇒ Integer
Push template roster from file to all those users.
342 343 344 345 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 342 def push_roster_all(opts = {}) data, _status_code, _headers = push_roster_all_with_http_info(opts) data end |
#push_roster_all_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Push template roster from file to all those users.
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 351 def push_roster_all_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RosterApi.push_roster_all ...' end # resource path local_var_path = '/api/push_roster_all' # 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[:'push_roster_all_request']) # return_type return_type = opts[:debug_return_type] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RosterApi.push_roster_all", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RosterApi#push_roster_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#push_roster_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Push template roster from file to a user.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/ejabberd_http_client/api/roster_api.rb', line 289 def push_roster_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RosterApi.push_roster ...' end # resource path local_var_path = '/api/push_roster' # 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[:'push_roster_request']) # return_type return_type = opts[:debug_return_type] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"RosterApi.push_roster", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RosterApi#push_roster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |