Get forecasted consumptions for all services

REST: GET /me/consumption/usage/forecast
774913
public ArrayList<net.minidev.ovh.api.me.consumption.OvhTransaction> consumption_usage_forecast_GET() throws IOException {
		String qPath = "/me/consumption/usage/forecast";
		StringBuilder sb = path(qPath);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t7);
	}
273459
def _find_usage_applications(self):
        """"""
        applications = self.conn.describe_applications()
        self.limits['Applications']._add_current_usage(
            len(applications['Applications']),
            aws_type='AWS::ElasticBeanstalk::Application',
        )
112541
def get_window_forecasts(self):
        
        for model_name in self.model_names:
            self.window_forecasts[model_name] = {}
            for size_threshold in self.size_thresholds:
                self.window_forecasts[model_name][size_threshold] = \
                    np.array([self.raw_forecasts[model_name][size_threshold][sl].sum(axis=0)
                              for sl in self.hour_windows])
1162132
def find_usage(self):
        
        logger.debug("Checking usage for service %s", self.service_name)
        self.connect()
        for lim in self.limits.values():
            lim._reset_usage()
        self._find_usage_vpcs()
        subnet_to_az = self._find_usage_subnets()
        self._find_usage_ACLs()
        self._find_usage_route_tables()
        self._find_usage_gateways()
        self._find_usage_nat_gateways(subnet_to_az)
        self._find_usages_vpn_gateways()
        self._find_usage_network_interfaces()
        self._have_usage = True
        logger.debug("Done checking usage.")
1185533
def usagereports(self):
        
        if self._resources is None:
            self.__init()
        if "usagereports" in self._resources:
            url = self._url + "/usagereports"
            return _usagereports.UsageReports(url=url,
                                              securityHandler=self._securityHandler,
                                              proxy_url=self._proxy_url,
                                              proxy_port=self._proxy_port,
                                              initialize=True)
        else:
            return None
1154210
def usage(self):
        
        if self._usage is None:
            self._usage = UsageList(self._version, sim_sid=self._solution['sid'], )
        return self._usage
625605
def usage_records(self):
        
        if self._usage_records is None:
            self._usage_records = UsageRecordList(self._version, sim_sid=self._solution['sid'], )
        return self._usage_records
1169424
def _find_usage_environments(self):
        """"""
        environments = self.conn.describe_environments()
        self.limits['Environments']._add_current_usage(
            len(environments['Environments']),
            aws_type='AWS::ElasticBeanstalk::Environment',
        )
495239
def get_forecast_fromstr(self, reply):
        
        self.forecast = json.loads(reply)

        for item in self.forecast.keys():
            setattr(self, item, self.forecast[item])
835184
def estimated_visits(domain, params = {})
      params[:start] ||= Date.today.prev_month.prev_month(3).strftime("%m-%Y")
      params[:end] ||= Date.today.prev_month(2).strftime("%m-%Y")

      request_old("#{domain}/v1/visits", params)
    end
190865
def get_services(self):
        """"""
        self.request(EP_GET_SERVICES)
        return {} if self.last_response is None else self.last_response.get('payload').get('services')
309097
def gas(self):
        """"""
        usage = self._state['gasUsage']
        return Usage(usage.get('avgDayValue'),
                     usage.get('avgValue'),
                     usage.get('dayCost'),
                     usage.get('dayUsage'),
                     usage.get('isSmart'),
                     usage.get('meterReading'),
                     usage.get('value'))
1088395
def get_current(self):
        """"""
        now = dt.now().timestamp()
        url = build_url(self.api_key, self.spot_id, self.fields,
                        self.unit, now, now)
        return get_msw(url)
996965
def _usage_overall(raw):
    '''
    
    '''
    data = {}
    for line in raw.split("\n")[1:]:
        keyset = [item.strip() for item in re.sub(r"\s+", " ", line).split(":", 1) if item.strip()]
        if len(keyset) == 2:
            key = re.sub(r"[()]", "", keyset[0]).replace(" ", "_").lower()
            if key in ['free_estimated', 'global_reserve']:  # An extra field
                subk = keyset[1].split("(")
                data[key] = subk[0].strip()
                subk = subk[1].replace(")", "").split(": ")
                data["{0}_{1}".format(key, subk[0])] = subk[1]
            else:
                data[key] = keyset[1]

    return data
1243777
def _get_usage(self):
        
        parser = argparse.ArgumentParser()
        parser.prog = 'juju-resources {}'.format(self.object_name)
        for set_name, set_args in getattr(self.object, '_subcommand_argsets', {}).items():
            for ap_args, ap_kwargs in set_args:
                parser.add_argument(*ap_args, **ap_kwargs)
        for ap_args, ap_kwargs in getattr(self.object, '_subcommand_args', []):
            parser.add_argument(*ap_args, **ap_kwargs)
        usage = parser.format_usage()
        usage = re.sub(r'\n *', ' ', usage)
        return usage.strip()
928841
def get_services(cls, request=None):
        
        return {service['name']: reverse(service['list_view'], request=request)
                for service in cls._registry.values()}
866873
async def async_get_forecast(self) -> List[SmhiForecast]:
        
        json_data = await self._api.async_get_forecast_api(self._longitude,
                                                           self._latitude)
        return _get_forecast(json_data)