function n2GoApiInit()
{
    add_filter('rewrite_rules_array', 'n2GoApiRewrites');
    add_filter('query_vars', 'n2goAddQueryVars');
    add_action('template_redirect', 'n2goTemplateRedirect');
    add_action('template_redirect', 'n2goCallback');
    load_plugin_textdomain(NEWSLETTER2GO_TEXTDOMAIN, false, 'newsletter2go/lang/');
    require_once NEWSLETTER2GO_ROOT_PATH . "/gui/N2GoGui.php";
    N2GoGui::run();
}
    public function form($instance)
    {
        if ($instance) {
            $title = $instance['title'];
            $type = $instance['type'];
        } else {
            $title = 'Newsletter2Go';
            $type = 'subscribe';
        }
        require_once __DIR__ . '/../gui/N2GoGui.php';
        $gui = new N2GoGui();
        $forms = $gui->getForms();
        $formUniqueCode = get_option('n2go_formUniqueCode');
        if (isset($forms[$formUniqueCode])) {
            $form = $forms[$formUniqueCode];
            ?>

            <p>
                <label
                    for="<?php 
            echo $this->get_field_id('title');
            ?>
"><?php 
            esc_html_e('Title:', 'Newsletter2Go');
            ?>
</label>
                <input class="widefat" id="<?php 
            echo $this->get_field_id('title');
            ?>
"
                       name="<?php 
            echo $this->get_field_name('title');
            ?>
" type="text"
                       value="<?php 
            echo esc_attr($title);
            ?>
"/>
                <br/>
                <br/>
                <label
                    for="<?php 
            echo $this->get_field_id('type');
            ?>
"><?php 
            echo __("Formtype", NEWSLETTER2GO_TEXTDOMAIN);
            ?>
                    :</label>
                <select class="widefat" id="<?php 
            echo $this->get_field_id('type');
            ?>
"
                        name="<?php 
            echo $this->get_field_name('type');
            ?>
"
                >

                    <?php 
            if ($form['type_subscribe'] == 1) {
                ?>
                        <option
                            value="subscribe" <?php 
                echo $type == 'subscribe' ? 'selected="selected"' : '';
                ?>
><?php 
                echo __("Subscription-Form", NEWSLETTER2GO_TEXTDOMAIN);
                ?>
</option>
                        <?php 
            }
            if ($form['type_unsubscribe'] == 1) {
                ?>
                    <option
                        value="unsubscribe" <?php 
                echo $type == 'unsubscribe' ? 'selected="selected"' : '';
                ?>
><?php 
                echo __("Unsubscription-Form", NEWSLETTER2GO_TEXTDOMAIN);
                ?>
</option>
                        <?php 
            }
            ?>
                </select>

            </p>
        <?php 
        } else {
            ?>
            <p>
            <h3>kein gültiges Formular konfiguriert</h3>

            </p>
            <?php 
        }
    }