C# Класс Retrospection.PersonalAnalyticsHttp

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetVisualizationDateFromUrlParameters ( HttpReqResp req ) : DateTimeOffset

Parses the request parameter (for "date") as a DateTime or returns a fallback value if there is no or if it fails.

GetVisualizationTypesFromUrlParameters ( HttpReqResp req ) : VisType

tries to parse the url

PersonalAnalyticsHttp ( ) : System
SetTrackers ( List trackers ) : void

link to the current tracker list is needed to fetch the visualization of every tracker

Start ( ) : void
Stop ( ) : void
VerifyDateForRetrospection ( DateTimeOffset date ) : DateTimeOffset

If the date is in the future, prompt an error message and use the current date.

Приватные методы

Метод Описание
CreateDashboardItem ( IVisualization vis, DateTimeOffset date ) : string
GetRetrospectionTitle ( VisType visType, DateTimeOffset date ) : string

Creates a nice title depending on the setting

GetVisualizationsHtml ( VisType type, DateTimeOffset date ) : Task

Gets the week OR day visualizations from each tracker and prepares the HTML for showing on the website

OnResource ( HttpReqResp req ) : int
OnStats ( HttpReqResp req ) : int
OnStylesheets ( HttpReqResp req ) : int

Описание методов

GetVisualizationDateFromUrlParameters() публичный статический Метод

Parses the request parameter (for "date") as a DateTime or returns a fallback value if there is no or if it fails.
public static GetVisualizationDateFromUrlParameters ( HttpReqResp req ) : DateTimeOffset
req HttpReqResp
Результат DateTimeOffset

GetVisualizationTypesFromUrlParameters() публичный статический Метод

tries to parse the url
public static GetVisualizationTypesFromUrlParameters ( HttpReqResp req ) : VisType
req HttpReqResp
Результат VisType

PersonalAnalyticsHttp() публичный Метод

public PersonalAnalyticsHttp ( ) : System
Результат System

SetTrackers() публичный Метод

link to the current tracker list is needed to fetch the visualization of every tracker
public SetTrackers ( List trackers ) : void
trackers List
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void

VerifyDateForRetrospection() публичный статический Метод

If the date is in the future, prompt an error message and use the current date.
public static VerifyDateForRetrospection ( DateTimeOffset date ) : DateTimeOffset
date DateTimeOffset
Результат DateTimeOffset