<?php
if (!defined('ABSPATH'))
    exit;

class Dori_Chatbot_Gollum_Client
{
    public static function trigger_crawl($user_id)
    {
        $url = Dori_Chatbot_API_Constants::get_crawler_base_url() . "/trigger_crawl/{$user_id}";

        $response = Dori_Chatbot_API_Client::call_api_post_fast(
            $url,
            null,
            array(),
            Dori_Chatbot_API_Client::get_timeout_long()
        );

        return Dori_Chatbot_API_Client::handle_api_response($response, 'Gollum: Trigger Crawl failed');
    }
}
