Method: Weblate::UsersApi#users_partial_update_with_http_info
- Defined in:
- lib/weblate/api/users_api.rb
#users_partial_update_with_http_info(username, opts = {}) ⇒ Array<(BasicUser, Integer, Hash)>
Users API.
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
# File 'lib/weblate/api/users_api.rb', line 837 def users_partial_update_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_partial_update ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_partial_update" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && username !~ pattern fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_partial_update, must conform to the pattern #{pattern}." end # resource path local_var_path = '/users/{username}/'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # 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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) 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[:'patched_basic_user']) # return_type return_type = opts[:debug_return_type] || 'BasicUser' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"UsersApi.users_partial_update", :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: UsersApi#users_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |