Skip to content

Commit

Permalink
Merge pull request #112 from apivideo/sort-params-in-analytics
Browse files Browse the repository at this point in the history
Add sort parameters in analytics routes
  • Loading branch information
bot-api-video authored Sep 5, 2024
2 parents 59ecfca + e6df5ec commit e6545ee
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 45 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.6.1] - 2024-09-05
- Add sort parameters in analytics endpoints

## [1.6.0] - 2024-07-29
- Add new analytics methods
- Add livestream complete() method
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>video.api</groupId>
<artifactId>android-api-client</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -80,7 +80,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
implementation "video.api:android-api-client:1.6.0"
implementation "video.api:android-api-client:1.6.1"
```

#### Others
Expand All @@ -93,7 +93,7 @@ mvn clean package

Then manually install the following JARs:

* `target/android-api-client-1.6.0.jar`
* `target/android-api-client-1.6.1.jar`
* `target/lib/*.jar`

### Code sample
Expand Down
72 changes: 72 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11745,6 +11745,42 @@ paths:
format: date-time
type: string
style: form
- description: |
Use this parameter to choose which field the API will use to sort the analytics data.

These are the available fields to sort by:

- `metricValue`: Sorts the results based on the **metric** you selected in your request.
- `dimensionValue`: Sorts the results based on the **dimension** you selected in your request.
example: metricValue
explode: false
in: query
name: sortBy
required: false
schema:
enum:
- metricValue
- dimensionValue
type: string
style: form
- description: |
Use this parameter to define the sort order of results.

These are the available sort orders:

- `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`.
- `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`.
example: asc
explode: false
in: query
name: sortOrder
required: false
schema:
enum:
- asc
- desc
type: string
style: form
- $ref: '#/components/parameters/filterBy_2'
description: "Use this parameter to filter the API's response based on different\
\ data dimensions. You can serialize filters in your query to receive more\
Expand Down Expand Up @@ -12188,6 +12224,42 @@ paths:
- day
type: string
style: form
- description: |
Use this parameter to choose which field the API will use to sort the analytics data.

These are the available fields to sort by:

- `metricValue`: Sorts the results based on the **metric** you selected in your request.
- `emittedAt`: Sorts the results based on the **timestamp** of the event in ATOM date-time format.
example: metricValue
explode: false
in: query
name: sortBy
required: false
schema:
enum:
- metricValue
- emittedAt
type: string
style: form
- description: |
Use this parameter to define the sort order of results.

These are the available sort orders:

- `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`.
- `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`.
example: asc
explode: false
in: query
name: sortOrder
required: false
schema:
enum:
- asc
- desc
type: string
style: form
- $ref: '#/components/parameters/filterBy_2'
description: "Use this parameter to filter the API's response based on different\
\ data dimensions. You can serialize filters in your query to receive more\
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'maven-publish'
apply plugin: 'kotlin-android'

group = 'video.api'
version = '1.6.0'
version = '1.6.1'

buildscript {
repositories {
Expand Down
16 changes: 14 additions & 2 deletions docs/AnalyticsApi.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions maven-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'

def isReleaseBuild() {
return !"1.6.0".contains("SNAPSHOT")
return !"1.6.1".contains("SNAPSHOT")
}

def getReleaseRepositoryUrl() {
Expand Down Expand Up @@ -57,7 +57,7 @@ afterEvaluate {

groupId = "video.api"
artifactId = "android-api-client"
version = "1.6.0"
version = "1.6.1"

pom {
name = "video.api:android-api-client"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>android-api-client</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<version>1.6.0</version>
<version>1.6.1</version>
<url>https://github.com/apivideo/api.video-android-client</url>
<description>The official Android api.video client</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/video/api/client/api/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private OkHttpClient initHttpClient(List<Interceptor> interceptors) {
private void init() {
verifyingSsl = true;
json = new JSON();
addDefaultHeader("AV-Origin-Client", "android:1.6.0");
addDefaultHeader("AV-Origin-Client", "android:1.6.1");
}

private boolean isValid(String regex, String field) {
Expand Down
Loading

0 comments on commit e6545ee

Please sign in to comment.