transparency_epias/production/productionClient.py
def unit_cost_fit(self, startDate, endDate):

        '''
        This function returns 3 lists including;
            -Unit Cost values as first item.
            -Version date information as second item.
            -Period date information as third item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.

        '''
        val.date_check(startDate, endDate)

        query = "production/renewable-sm-unit-cost?startDate="+f'{startDate}'+"&endDate="+f'{endDate}'

        json_result = self.get_request_result(query)

        key_list = list(json_result['body'].keys())

        key_name = key_list[0]

        response_list = json_result['body'][f'{key_name}']

        unit_cost_list = []
        version_list = []
        period_list = []

        for x in range(len(response_list)):
            unit_cost_list.append(response_list[x]['unitCost'])
            version_list.append(response_list[x]['id']['donem'])
            period_list.append(response_list[x]['id']['versiyon'])
        
        return unit_cost_list, version_list, period_list

        This function returns 3 lists including;
            -Unit Cost values as first item.
            -Version date information as second item.
            -Period date information as third item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.

        
This function returns 3 lists including;
Unit Cost values as first item.
Version date information as second item.
Period date information as third item.



Start date in YYYY-MM-DD format.
endDate: End date in YYYY-MM-DD format.
This function returns 3 lists including ; Unit Cost values as first item . Version date information as second item . Period date information as third item . Start date in YYYY - MM - DD format . endDate : End date in YYYY - MM - DD format .
def unit_cost_fit(self, startDate, endDate):
        val.date_check(startDate, endDate)
        query = "production/renewable-sm-unit-cost?startDate="+f'{startDate}'+"&endDate="+f'{endDate}'
        json_result = self.get_request_result(query)
        key_list = list(json_result['body'].keys())
        key_name = key_list[0]
        response_list = json_result['body'][f'{key_name}']
        unit_cost_list = []
        version_list = []
        period_list = []
        for x in range(len(response_list)):
            unit_cost_list.append(response_list[x]['unitCost'])
            version_list.append(response_list[x]['id']['donem'])
            period_list.append(response_list[x]['id']['versiyon'])
        return unit_cost_list, version_list, period_list
def unit_cost_fit ( self , startDate , endDate ) : val . date_check ( startDate , endDate ) query = "production/renewable-sm-unit-cost?startDate=" + f'{startDate}' + "&endDate=" + f'{endDate}' json_result = self . get_request_result ( query ) key_list = list ( json_result [ 'body' ] . keys ( ) ) key_name = key_list [ 0 ] response_list = json_result [ 'body' ] [ f'{key_name}' ] unit_cost_list = [ ] version_list = [ ] period_list = [ ] for x in range ( len ( response_list ) ) : unit_cost_list . append ( response_list [ x ] [ 'unitCost' ] ) version_list . append ( response_list [ x ] [ 'id' ] [ 'donem' ] ) period_list . append ( response_list [ x ] [ 'id' ] [ 'versiyon' ] ) return unit_cost_list , version_list , period_list
This function returns 3 lists including;
Unit Cost values as first item.
This function returns 3 lists including ; Unit Cost values as first item .
'''
        This function returns 3 lists including;
            -Unit Cost values as first item.
            -Version date information as second item.
            -Period date information as third item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.

        '''
self
startDate
endDate