def create_account(username, password, language = 'en', reason = nil)
      params = {
        name: username,
        password: password,
        language: language,
        token: get_token('createaccount')
      }
      params[:reason] = reason unless reason.nil?

      result = post(params)
      unless result['error'].nil?
        raise MediaWiki::Butt::AuthenticationError.new(result['error']['code'])
      end

      result['createaccount']['result'] == 'Success'
    end
def create_account(username, password, language = 'en', reason = nil)
      params = {
        name: username,
        password: password,
        language: language,
        token: get_token('createaccount')
      }
      params[:reason] = reason unless reason.nil?

      result = post(params)
      unless result['error'].nil?
        raise MediaWiki::Butt::AuthenticationError.new(result['error']['code'])
      end

      result['createaccount']['result'] == 'Success'
    end
Creates an account using the standard procedure.
 @param username [String] The desired username.
 @param password [String] The desired password.
 @param language [String] The language code to be set as default for the account. Defaults to 'en', or English.
 Use the language code, not the name.
 @param reason [String] The reason for creating the account, as shown in the account creation log. Optional.
 @see #check_create
 @see https://www.mediawiki.org/wiki/API:Account_creation MediaWiki Account Creation Docs
 @since 0.1.0
 @return [Boolean] True if successful, false if not.