transparency_epias/gas/gasTraClients.py
def price_stp(self, startDate, endDate, price_type=None):

        '''
        This function returns 4 lists including;
            -Gas day information as first item.
            -Price values as second item.
            -Price type information as third item.
            -State information as fourht 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/price?"+"startDate="+f'{startDate}'+"&endDate="+f'{endDate}'+"&priceType="+f'{price_type}'

        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}']

        g_day_list = []
        price_list = []
        priceType_list = []
        state_list = []

        for item in response_list:
            g_day_list.append(item['gasDay'])
            price_list.append(item['price'])
            priceType_list.append(item['priceType'])
            state_list.append(item['state'])

        return g_day_list, price_list, priceType_list, state_list

        This function returns 4 lists including;
            -Gas day information as first item.
            -Price values as second item.
            -Price type information as third item.
            -State information as fourht item.

        Parameters:

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

        
This function returns 4 lists including;
Gas day information as first item.
Price values as second item.
Price type information as third item.
State information as fourht item.



Start date in YYYY-MM-DD format.
endDate: End date in YYYY-MM-DD format.
This function returns 4 lists including ; Gas day information as first item . Price values as second item . Price type information as third item . State information as fourht item . Start date in YYYY - MM - DD format . endDate : End date in YYYY - MM - DD format .
def price_stp(self, startDate, endDate, price_type=None):
        val.date_check(startDate, endDate)
        query = "stp/price?"+"startDate="+f'{startDate}'+"&endDate="+f'{endDate}'+"&priceType="+f'{price_type}'
        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}']
        g_day_list = []
        price_list = []
        priceType_list = []
        state_list = []
        for item in response_list:
            g_day_list.append(item['gasDay'])
            price_list.append(item['price'])
            priceType_list.append(item['priceType'])
            state_list.append(item['state'])
        return g_day_list, price_list, priceType_list, state_list
def price_stp ( self , startDate , endDate , price_type = None ) : val . date_check ( startDate , endDate ) query = "stp/price?" + "startDate=" + f'{startDate}' + "&endDate=" + f'{endDate}' + "&priceType=" + f'{price_type}' 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}' ] g_day_list = [ ] price_list = [ ] priceType_list = [ ] state_list = [ ] for item in response_list : g_day_list . append ( item [ 'gasDay' ] ) price_list . append ( item [ 'price' ] ) priceType_list . append ( item [ 'priceType' ] ) state_list . append ( item [ 'state' ] ) return g_day_list , price_list , priceType_list , state_list
This function returns 4 lists including;
Gas day information as first item.
This function returns 4 lists including ; Gas day information as first item .
'''
        This function returns 4 lists including;
            -Gas day information as first item.
            -Price values as second item.
            -Price type information as third item.
            -State information as fourht item.

        Parameters:

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

        '''
self
startDate
endDate
price_type