diff --git a/src/Analytics.php b/src/Analytics.php index 62a46e6..492b129 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -171,6 +171,7 @@ public function get( array $dimensions = [], int $maxResults = 10, array $orderBy = [], + int $offset = 0, ): Collection { return $this->client->get( $this->propertyId, @@ -179,6 +180,7 @@ public function get( $dimensions, $maxResults, $orderBy, + $offset, ); } } diff --git a/src/AnalyticsClient.php b/src/AnalyticsClient.php index 4e9c790..90b7e01 100644 --- a/src/AnalyticsClient.php +++ b/src/AnalyticsClient.php @@ -33,6 +33,7 @@ public function get( array $dimensions = [], int $maxResults = 10, array $orderBy = [], + int $offset = 0, ): Collection { $typeCaster = resolve(TypeCaster::class); @@ -44,6 +45,7 @@ public function get( 'metrics' => $this->getFormattedMetrics($metrics), 'dimensions' => $this->getFormattedDimensions($dimensions), 'limit' => $maxResults, + 'offset' => $offset, 'orderBys' => $orderBy, ]); diff --git a/tests/AnalyticsTest.php b/tests/AnalyticsTest.php index e42cf7c..373465a 100644 --- a/tests/AnalyticsTest.php +++ b/tests/AnalyticsTest.php @@ -31,6 +31,7 @@ ['pageTitle'], 10, [], + 0, ]; $this @@ -68,6 +69,7 @@ [ OrderBy::dimension('date', true), ], + 0, ]; $this @@ -107,6 +109,7 @@ [ OrderBy::dimension('date', true), ], + 0, ]; $this @@ -147,6 +150,7 @@ [ OrderBy::metric('screenPageViews', true), ], + 0, ]; $this @@ -188,6 +192,7 @@ [ OrderBy::metric('screenPageViews', true), ], + 0, ]; $this @@ -225,6 +230,7 @@ [ OrderBy::metric('screenPageViews', true), ], + 0, ]; $this