analytic: Analytic API

Description Usage Arguments Value

Description

GET data from the Analytic API

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
analytic(
  format = c("csv", "json"),
  perspective = c("rank", "interval"),
  resolution_time = c("minute", "hour", "day", "week", "month"),
  restrict_begin = lubridate::floor_date(Sys.Date(), "week"),
  restrict_end = Sys.Date(),
  restrict_kind = c("overview", "category", "activity", "productivity", "document",
    "efficiency"),
  restrict_thing = NULL,
  restrict_thingy = NULL,
  restrict_source_type = c("computers", "mobile", "offline"),
  restrict_schedule_id = NULL,
  key = get_key()
)

Arguments

format

'csv' | 'json'

perspective

Consider this the X - axis of the returned data. It is what determines how your data is crunched serverside for ordered return.

  • rank: (default) Organized around a calculated value, usually a sum like time spent.

  • interval: Organized around calendar time.

resolution_time

Default is "hour". In an interval report, the X axis unit. In other words, data is summarizd into chunks of this size. "minute" will return data grouped into five-minute buckets, which is the most granular view available.

restrict_begin

Sets the start day for data batch, inclusive (always at time 00:00, start hour/minute not supported) Format ISO 8601 "YYYY-MM-DD"

restrict_end

Sets the end day for data batch, inclusive (always at time 00:00, end hour/minute not supported) Format ISO 8601 "YYYY-MM-DD"

restrict_kind

Allows you to preprocess data through different statistical engines. The perspective dictates the main grouping of the data, this provides different aspects of that main grouping.

  • overview: sums statistics for all activities into their top level category

  • category: sums statistics for all activities into their sub category

  • activity: sums statistics for individual applications / web sites / activities

  • productivity: productivity calculation

  • efficiency: efficiency calculation (not applicable in "rank" perspective)

  • document: sums statistics for individual documents and web pages

restrict_thing

The name of a specific overview, category, application or website. For websites, use the domain component only if it starts with "www", eg. "www.nytimes.com" would be "nytimes.com".

restrict_thingy

Refers to the specific "document" or "activity" we record for the currently active application, if supported. For example, the document name active when using Microsoft Word. Available for most major applications and web sites. Let us know if yours is not.

restrict_source_type

Allows for querying by source device type.

restrict_schedule_id

Allows for filtering results by schedule.

key

Your API key (retrieved automatically if stored in .Renviron) OR access_token - the access token from the Oauth2 Connection

Value

(data.frame/list)


yogat3ch/Rescuetime documentation built on Jan. 15, 2022, 9:06 a.m.