cityssm / node-green-button-subscriber

Unnecessary return await function found JS-0111
Performance
Major
15 occurrences in this check
Redundant use of await on a return value
134        return await this.getGreenButtonEndpoint('/ReadServiceStatus');
135    }
136    async getApplicationInformation(appId) {
137        return await this.getGreenButtonEndpoint(`/ApplicationInformation/${appId}`);138    }
139}
140export { helpers } from '@cityssm/green-button-parser';
Redundant use of await on a return value
131        return await this.getGreenButtonEndpoint(`/Batch/Subscription/${authorizationId}/UsagePoint/${meterId}`, formatDateTimeFiltersParameters(dateTimeFilters));
132    }
133    async getServiceStatus() {
134        return await this.getGreenButtonEndpoint('/ReadServiceStatus');135    }
136    async getApplicationInformation(appId) {
137        return await this.getGreenButtonEndpoint(`/ApplicationInformation/${appId}`);
Redundant use of await on a return value
128        return await this.getGreenButtonEndpoint(`/Batch/Subscription/${authorizationId}`, formatDateTimeFiltersParameters(dateTimeFilters));
129    }
130    async getBatchSubscriptionsByMeter(authorizationId, meterId, dateTimeFilters) {
131        return await this.getGreenButtonEndpoint(`/Batch/Subscription/${authorizationId}/UsagePoint/${meterId}`, formatDateTimeFiltersParameters(dateTimeFilters));132    }
133    async getServiceStatus() {
134        return await this.getGreenButtonEndpoint('/ReadServiceStatus');
Redundant use of await on a return value
125        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer/${customerId}/CustomerAccount/${customerAccountId}/CustomerAgreement`);
126    }
127    async getBatchSubscriptionsByAuthorization(authorizationId, dateTimeFilters) {
128        return await this.getGreenButtonEndpoint(`/Batch/Subscription/${authorizationId}`, formatDateTimeFiltersParameters(dateTimeFilters));129    }
130    async getBatchSubscriptionsByMeter(authorizationId, meterId, dateTimeFilters) {
131        return await this.getGreenButtonEndpoint(`/Batch/Subscription/${authorizationId}/UsagePoint/${meterId}`, formatDateTimeFiltersParameters(dateTimeFilters));
Redundant use of await on a return value
122        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer/${customerId}/CustomerAccount`);
123    }
124    async getCustomerAgreements(authorizationId, customerId, customerAccountId) {
125        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer/${customerId}/CustomerAccount/${customerAccountId}/CustomerAgreement`);126    }
127    async getBatchSubscriptionsByAuthorization(authorizationId, dateTimeFilters) {
128        return await this.getGreenButtonEndpoint(`/Batch/Subscription/${authorizationId}`, formatDateTimeFiltersParameters(dateTimeFilters));
Redundant use of await on a return value
119        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer`);
120    }
121    async getCustomerAccounts(authorizationId, customerId) {
122        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer/${customerId}/CustomerAccount`);123    }
124    async getCustomerAgreements(authorizationId, customerId, customerAccountId) {
125        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer/${customerId}/CustomerAccount/${customerAccountId}/CustomerAgreement`);
Redundant use of await on a return value
116        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/ElectricPowerQualitySummary`);
117    }
118    async getCustomers(authorizationId) {
119        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer`);120    }
121    async getCustomerAccounts(authorizationId, customerId) {
122        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer/${customerId}/CustomerAccount`);
Redundant use of await on a return value
113        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/UsageSummary`);
114    }
115    async getElectricPowerQualitySummaries(authorizationId, meterId) {
116        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/ElectricPowerQualitySummary`);117    }
118    async getCustomers(authorizationId) {
119        return await this.getGreenButtonEndpoint(`/RetailCustomer/${authorizationId}/Customer`);
Redundant use of await on a return value
110        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/MeterReading/${readingId}/IntervalBlock`);
111    }
112    async getUsageSummaries(authorizationId, meterId) {
113        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/UsageSummary`);114    }
115    async getElectricPowerQualitySummaries(authorizationId, meterId) {
116        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/ElectricPowerQualitySummary`);
Redundant use of await on a return value
107        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/MeterReading`);
108    }
109    async getIntervalBlocks(authorizationId, meterId, readingId) {
110        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/MeterReading/${readingId}/IntervalBlock`);111    }
112    async getUsageSummaries(authorizationId, meterId) {
113        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/UsageSummary`);
Redundant use of await on a return value
104        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint`);
105    }
106    async getMeterReadings(authorizationId, meterId) {
107        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/MeterReading`);108    }
109    async getIntervalBlocks(authorizationId, meterId, readingId) {
110        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/MeterReading/${readingId}/IntervalBlock`);
Redundant use of await on a return value
101        return await this.getGreenButtonEndpoint(`/Authorization/${authorizationId}`);
102    }
103    async getUsagePoints(authorizationId) {
104        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint`);105    }
106    async getMeterReadings(authorizationId, meterId) {
107        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint/${meterId}/MeterReading`);
Redundant use of await on a return value
 98        return await this.getGreenButtonEndpoint('/Authorization');
 99    }
100    async getAuthorization(authorizationId) {
101        return await this.getGreenButtonEndpoint(`/Authorization/${authorizationId}`);102    }
103    async getUsagePoints(authorizationId) {
104        return await this.getGreenButtonEndpoint(`/Subscription/${authorizationId}/UsagePoint`);
Redundant use of await on a return value
 95        return await this.getGreenButtonHttpsLink(`${this.#configuration.baseUrl}espi/1_1/resource${greenButtonEndpoint}`, getParameters);
 96    }
 97    async getAuthorizations() {
 98        return await this.getGreenButtonEndpoint('/Authorization'); 99    }
100    async getAuthorization(authorizationId) {
101        return await this.getGreenButtonEndpoint(`/Authorization/${authorizationId}`);
Redundant use of await on a return value
 92        };
 93    }
 94    async getGreenButtonEndpoint(greenButtonEndpoint, getParameters) {
 95        return await this.getGreenButtonHttpsLink(`${this.#configuration.baseUrl}espi/1_1/resource${greenButtonEndpoint}`, getParameters); 96    }
 97    async getAuthorizations() {
 98        return await this.getGreenButtonEndpoint('/Authorization');