facebook-nodejs-business-sdk
Version:
SDK for the Facebook Ads API in Javascript and Node.js
75 lines (68 loc) • 1.68 kB
JavaScript
/**
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
* @flow
*/
import {AbstractCrudObject} from './../abstract-crud-object';
import AbstractObject from './../abstract-object';
import AdsInsights from './ads-insights';
/**
* AdReportRun
* @extends AbstractCrudObject
* @see {@link https://developers.facebook.com/docs/marketing-api/}
*/
export default class AdReportRun extends AbstractCrudObject {
static get Fields () {
return Object.freeze({
account_id: 'account_id',
async_percent_completion: 'async_percent_completion',
async_status: 'async_status',
date_start: 'date_start',
date_stop: 'date_stop',
emails: 'emails',
friendly_name: 'friendly_name',
id: 'id',
is_bookmarked: 'is_bookmarked',
is_running: 'is_running',
schedule_id: 'schedule_id',
time_completed: 'time_completed',
time_ref: 'time_ref'
});
}
getInsights (fields, params, fetchFirstPage = true): AdsInsights {
return this.getEdge(
AdsInsights,
fields,
params,
fetchFirstPage,
'/insights'
);
}
createRetry (fields, params): AdReportRun {
return this.createEdge(
'/retry',
fields,
params,
AdReportRun
);
}
delete (fields, params): AbstractObject {
return super.delete(
params
);
}
get (fields, params): AdReportRun {
return this.read(
fields,
params
);
}
update (fields, params): AdReportRun {
return super.update(
params
);
}
}