Sha256: 323ef50103857cbeaca4dcf9d54dc4df0da381379b8d40285aa44e3448d81be5
Contents?: true
Size: 537 Bytes
Versions: 3
Compression:
Stored size: 537 Bytes
Contents
# frozen_string_literal: true module PlausibleApi module Stats class Timeseries def initialize(options = {}) @period = options[:period] || '30d' @filters = options[:filters] @interval = options[:interval] end def request_url url = "/api/v1/stats/timeseries?site_id=$SITE_ID" url += "&period=#{@period}" if @period url += "&filters=#{CGI.escape(@filters)}" if @filters url += "&interval=#{@interval}" if @interval url end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
plausible_api-0.1.3 | lib/plausible_api/stats/timeseries.rb |
plausible_api-0.1.2 | lib/plausible_api/stats/timeseries.rb |
plausible_api-0.1.1 | lib/plausible_api/stats/timeseries.rb |