Ejemplo n.º 1
0
    public function action_getkeywords()
    {
        // Get the graph - for the past 7 days
        $trendingkeywords_params = array("RequestType" => "ContentByChannelOverTime", "Parameters" => array("TimeLimit" => 7));
        $json_encoded_params = json_encode($trendingkeywords_params);
        $trendingkeywords_json = Analytics::analytics_api()->get_analysis($json_encoded_params);
        
        $trendingkeywords = View::factory("parts/trendingkeywordswidget")->set('json', $trendingkeywords_json);

        // Render the graph
        $this->request->response = $trendingkeywords;
    }
Ejemplo n.º 2
0
    public function action_getsources()
    {
        // Get the graph - for the past 7 days
        $activesources_params = array("RequestType" => "SourcesByChannelOverTime", "Parameters" => array("TimeLimit" => 7));
        $json_encoded_params = json_encode($activesources_params);
        $activesources_json = Analytics::analytics_api()->get_analysis($json_encoded_params);
        
        $activesources = View::factory("parts/activesourceswidget")->set('json', $activesources_json);

        // Render the graph
        $this->request->response = $activesources;
    }