📜  Zoho API 调用获取所有记录 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:07.661000             🧑  作者: Mango

代码示例1
//gets ALL the records in the report. Note a maximum of 200 records can be downloaded per api call and the default is 100 records
function get_all_recs() {
    console.log('Getting all records');
    ZOHO.CREATOR.init().then(function (data) {
        let config = {
            reportName: 'All_Visitors'
        };
        console.log(config);
        ZOHO.CREATOR.API
            .getAllRecords(config)
            .then(function (response) {
                if (response.code == 3000) {
                    console.log('All records fetched, see table');

                    let counter = 0;
                    OBJECT_GLOBAL = response.data;
                    CreateTableFromJSON();//building the table
                    return OBJECT_GLOBAL;
                }
            })
            .catch(function (data) {
                alert(data.responseText);
                console.log('Boss, we have a little problem');
                console.log(data.responseText);
            });
    });
}