pub struct GetViews {
pub path: String,
pub year: Option<Year>,
pub month: Option<Month>,
pub day: Option<Day>,
pub hour: Option<Hour>,
}Expand description
Use this method to get the number of views for a Telegraph article. Returns a PageViews object on success. By default, the total number of page views will be returned.
-
path (String) Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
-
year (Integer, 2000-2100) Required if month is passed. If passed, the number of page views for the requested year will be returned.
-
month (Integer, 1-12) Required if day is passed. If passed, the number of page views for the requested month will be returned.
-
day (Integer, 1-31) Required if hour is passed. If passed, the number of page views for the requested day will be returned.
-
hour (Integer, 0-24) If passed, the number of page views for the requested hour will be returned.
-
Sample request https://api.telegra.ph/getViews/Sample-Page-12-15?year=2016&month=12
Fields§
§path: String§year: Option<Year>§month: Option<Month>§day: Option<Day>§hour: Option<Hour>