<commit_before>(function (env) {
    "use strict";
    env.ddg_spice_first_robotics_teams = function(api_result) {

        // Validate the response (customize for your Spice)
        if (!api_result || api_result.error || api_result.length === 0) {
            return Spice.failed('first_robotics_teams');
        }

        // Render the response
        Spice.add({
            id: 'first_robotics_teams',

            // Customize these properties
            name: 'Reference',
            data: {
                record_data: {
                    'Full name': api_result.name,
                    'Location': api_result.location,
                    'Rookie Year': api_result.rookie_year,
                    'Motto': api_result.motto
                }
            },
            meta: {
                sourceName: 'The Blue Alliance',
                sourceUrl: 'https://www.thebluealliance.com/team/' + api_result.team_number,
            },

            templates: {
                group: 'list',
                options: {
                    title: 'FIRST Robotics Team' + api_result.team_number.,
                    subtitle: api_result.nickname,
                    content: 'record',
                    
                    moreAt: true,
                    moreText: {
                        href: api_result.website
                    }
                }
            }
        });<commit_msg>The IA displays for teams now, and some fixes for missing values are on the way<commit_after>(function (env) {
    "use strict";
    env.ddg_spice_first_robotics_teams = function(api_result) {

        if (!api_result || api_result.error || api_result.length === 0) {
            return Spice.failed('first_robotics_teams');
        }
            
        //var teamNumber = api_result.team_number;
        if (api_result.motto === null) {api_result.motto = 'none';}
        else {api_result.motto = '\"'+api_result.motto+'\"'}
        
        Spice.add({
            id: 'first_robotics_teams',
            name: 'Reference',

            data: {
                title: 'FIRST Robotics Competition Team ' + api_result.team_number,
                subtitle: api_result.nickname,
                record_data: {
                    'Full name': api_result.name,
                    'Location': api_result.location,
                    'Rookie Year': api_result.rookie_year,
                    'Motto': api_result.motto
                }
            },
            meta: {
                sourceName: 'The Blue Alliance',
                sourceUrl: 'https://www.thebluealliance.com/team/' + api_result.team_number,
            },

            templates: {
                group: 'list',
                options: {
                    content: 'record',
                    moreAt: true,
                  
                    // Refer to the team's website
                    moreText: {
                        text: 'Team website',
                        href: api_result.website
                    }
                }
            }
        });
{'fraction_non_alphanumeric': 0.09859614756774404, 'fraction_numerical': 0.000652954619653934, 'mean_word_length': 1.196415770609319, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2557091', 'n_tokens_mistral': 834, 'n_tokens_neox': 778, 'n_words': 160}