transparency_epias/gas/gasTraClients.py
def fourcode(self, startDate, endDate):

        '''
        This function returns 6 lists including;
            -Gas day informatin as first item.
            -Contract name information as second item.
            -Amount values (x1000 sm3) values as third item.
            -Weigthed average values as fourth item.
            

        Parameters:

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

        '''

        val.date_check(startDate, endDate)

        query = "stp/fourcode-operation?"+"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}']

        day_list = []
        amount_list = []
        contract_list = []
        wavg_list = []

        for item in response_list:
            day_list.append(item['gasDay'])
            contract_list.append(item['contractName'])
            amount_list.append(item['amount'])
            wavg_list.append(item['weightedAverage'])

        return day_list, contract_list, amount_list, wavg_list

        This function returns 6 lists including;
            -Gas day informatin as first item.
            -Contract name information as second item.
            -Amount values (x1000 sm3) values as third item.
            -Weigthed average values as fourth item.
            

        Parameters:

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

        
This function returns 6 lists including;
Gas day informatin as first item.
Contract name information as second item.
Amount values (x1000 sm3) values as third item.
Weigthed average values as fourth item.



Start date in YYYY-MM-DD format.
endDate: End date in YYYY-MM-DD format.
This function returns 6 lists including ; Gas day informatin as first item . Contract name information as second item . Amount values ( x1000 sm3 ) values as third item . Weigthed average values as fourth item . Start date in YYYY - MM - DD format . endDate : End date in YYYY - MM - DD format .
def fourcode(self, startDate, endDate):
        val.date_check(startDate, endDate)
        query = "stp/fourcode-operation?"+"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}']
        day_list = []
        amount_list = []
        contract_list = []
        wavg_list = []
        for item in response_list:
            day_list.append(item['gasDay'])
            contract_list.append(item['contractName'])
            amount_list.append(item['amount'])
            wavg_list.append(item['weightedAverage'])
        return day_list, contract_list, amount_list, wavg_list
def fourcode ( self , startDate , endDate ) : val . date_check ( startDate , endDate ) query = "stp/fourcode-operation?" + "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}' ] day_list = [ ] amount_list = [ ] contract_list = [ ] wavg_list = [ ] for item in response_list : day_list . append ( item [ 'gasDay' ] ) contract_list . append ( item [ 'contractName' ] ) amount_list . append ( item [ 'amount' ] ) wavg_list . append ( item [ 'weightedAverage' ] ) return day_list , contract_list , amount_list , wavg_list
This function returns 6 lists including;
Gas day informatin as first item.
This function returns 6 lists including ; Gas day informatin as first item .
'''
        This function returns 6 lists including;
            -Gas day informatin as first item.
            -Contract name information as second item.
            -Amount values (x1000 sm3) values as third item.
            -Weigthed average values as fourth item.
            

        Parameters:

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

        '''
self
startDate
endDate