transparency_epias/gas/gasTraClients.py
def greencode(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.
            -Transaction date information as fifth item.
            -Contract name information as sixth 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/greencode-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 = []
        transactiondate_list = []
        c_day_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'])
            transactiondate_list.append(item['transactionDate'])
            c_day_list.append(item['contractGasDay'])

        return day_list, contract_list, amount_list, wavg_list, transactiondate_list, c_day_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.
            -Transaction date information as fifth item.
            -Contract name information as sixth 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.
Transaction date information as fifth item.
Contract name information as sixth 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 . Transaction date information as fifth item . Contract name information as sixth item . Start date in YYYY - MM - DD format . endDate : End date in YYYY - MM - DD format .
def greencode(self, startDate, endDate):
        val.date_check(startDate, endDate)
        query = "stp/greencode-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 = []
        transactiondate_list = []
        c_day_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'])
            transactiondate_list.append(item['transactionDate'])
            c_day_list.append(item['contractGasDay'])
        return day_list, contract_list, amount_list, wavg_list, transactiondate_list, c_day_list
def greencode ( self , startDate , endDate ) : val . date_check ( startDate , endDate ) query = "stp/greencode-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 = [ ] transactiondate_list = [ ] c_day_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' ] ) transactiondate_list . append ( item [ 'transactionDate' ] ) c_day_list . append ( item [ 'contractGasDay' ] ) return day_list , contract_list , amount_list , wavg_list , transactiondate_list , c_day_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.
            -Transaction date information as fifth item.
            -Contract name information as sixth item.

        Parameters:

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

        '''
self
startDate
endDate