UNPKG

projectmanager-sdk

Version:

Software development kit for the ProjectManager.com API. for TypeScript

88 lines 3.21 kB
/** * ProjectManager API for TypeScript * * (c) ProjectManager.com, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @author ProjectManager.com <support@projectmanager.com> * @copyright ProjectManager.com, Inc. * @link https://github.com/projectmgr/projectmanager-sdk-typescript */ export class HolidayClient { client; /** * Internal constructor for this client library */ constructor(client) { this.client = client; } /** * Retrieve a list of resource holidays that match an [OData formatted query](https://www.odata.org/). * * @param top The number of records to return * @param skip Skips the given number of records and then returns $top records * @param filter Filter the expression according to oData queries * @param orderby Order collection by this field. * @param expand Include related data in the response */ queryresourceholidays(top, skip, filter, orderby, expand) { const url = `/api/data/holidays/resource`; const options = { params: { '$top': top, '$skip': skip, '$filter': filter, '$orderby': orderby, '$expand': expand, }, }; return this.client.request("get", url, options, null); } /** * Retrieve a list of country holidays that match an [OData formatted query](https://www.odata.org/). * * @param top The number of records to return * @param skip Skips the given number of records and then returns $top records * @param filter Filter the expression according to oData queries * @param orderby Order collection by this field. * @param expand Include related data in the response */ querycountryholidays(top, skip, filter, orderby, expand) { const url = `/api/data/holidays/country`; const options = { params: { '$top': top, '$skip': skip, '$filter': filter, '$orderby': orderby, '$expand': expand, }, }; return this.client.request("get", url, options, null); } /** * Retrieve a list of global holidays that match an [OData formatted query](https://www.odata.org/). * * @param top The number of records to return * @param skip Skips the given number of records and then returns $top records * @param filter Filter the expression according to oData queries * @param orderby Order collection by this field. * @param expand Include related data in the response */ queryglobalholidays(top, skip, filter, orderby, expand) { const url = `/api/data/holidays/global`; const options = { params: { '$top': top, '$skip': skip, '$filter': filter, '$orderby': orderby, '$expand': expand, }, }; return this.client.request("get", url, options, null); } } //# sourceMappingURL=HolidayClient.js.map