Skip to content

Commit

Permalink
fix: Regenerated from new openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspersorensen committed Feb 9, 2024
1 parent 4e983f4 commit 504e192
Show file tree
Hide file tree
Showing 11 changed files with 468 additions and 21 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/digiseg-labs/api-client-go

go 1.18

require golang.org/x/oauth2 v0.16.0
require golang.org/x/oauth2 v0.17.0

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
2 changes: 2 additions & 0 deletions openapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ docs/PrivateAudienceStats.md
docs/PrivateAudienceStatsAudienceCategories.md
docs/QueryCampaignAudienceStats200Response.md
docs/QueryCampaignCountryStats200Response.md
docs/QueryCampaignFrequencyStats200Response.md
docs/QueryCampaignTimingStats200Response.md
docs/RegistrationByIdResponseData.md
docs/RegistrationCreationResponseData.md
Expand Down Expand Up @@ -238,6 +239,7 @@ model_private_audience_stats.go
model_private_audience_stats_audience_categories.go
model_query_campaign_audience_stats_200_response.go
model_query_campaign_country_stats_200_response.go
model_query_campaign_frequency_stats_200_response.go
model_query_campaign_timing_stats_200_response.go
model_registration_by_id_response_data.go
model_registration_creation_response_data.go
Expand Down
2 changes: 2 additions & 0 deletions openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Class | Method | HTTP request | Description
*CampaignsAPI* | [**ListCampaigns**](docs/CampaignsAPI.md#listcampaigns) | **Get** /campaigns | List campaigns
*CampaignsAPI* | [**QueryCampaignAudienceStats**](docs/CampaignsAPI.md#querycampaignaudiencestats) | **Get** /campaigns/{campaign_id}/stats/audiences | Audience statistics for campaign
*CampaignsAPI* | [**QueryCampaignCountryStats**](docs/CampaignsAPI.md#querycampaigncountrystats) | **Get** /campaigns/{campaign_id}/stats/countries | Country statistics for campaign
*CampaignsAPI* | [**QueryCampaignFrequencyStats**](docs/CampaignsAPI.md#querycampaignfrequencystats) | **Get** /campaigns/{campaign_id}/stats/frequencies | Frequency statistics for campaign
*CampaignsAPI* | [**QueryCampaignTimingStats**](docs/CampaignsAPI.md#querycampaigntimingstats) | **Get** /campaigns/{campaign_id}/stats/timing | Timing statistics for campaign
*CampaignsAPI* | [**UpdateCampaignById**](docs/CampaignsAPI.md#updatecampaignbyid) | **Put** /campaigns/{campaign_id} | Update campaign
*PopulationsAPI* | [**GetPopuplationByKey**](docs/PopulationsAPI.md#getpopuplationbykey) | **Get** /populations/{category_key}/{population_key} | Get Population by key
Expand Down Expand Up @@ -250,6 +251,7 @@ Class | Method | HTTP request | Description
- [PrivateAudienceStatsAudienceCategories](docs/PrivateAudienceStatsAudienceCategories.md)
- [QueryCampaignAudienceStats200Response](docs/QueryCampaignAudienceStats200Response.md)
- [QueryCampaignCountryStats200Response](docs/QueryCampaignCountryStats200Response.md)
- [QueryCampaignFrequencyStats200Response](docs/QueryCampaignFrequencyStats200Response.md)
- [QueryCampaignTimingStats200Response](docs/QueryCampaignTimingStats200Response.md)
- [RegistrationByIdResponseData](docs/RegistrationByIdResponseData.md)
- [RegistrationCreationResponseData](docs/RegistrationCreationResponseData.md)
Expand Down
81 changes: 67 additions & 14 deletions openapi/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X GET \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET \
https://api.digiseg.net/accounts/$ACCOUNT_ID
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/accounts/\"+account_id, {\n \"method\"\
Expand Down Expand Up @@ -212,7 +212,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X GET \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET \
https://api.digiseg.net/accounts/$ACCOUNT_ID/users
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/accounts/\"+account_id+\"/users\"\
Expand Down Expand Up @@ -278,7 +278,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X GET \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET \
https://api.digiseg.net/users/$USER_ID/apikeys
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/users/\"+user_id+\"/apikeys\", {\n\
Expand Down Expand Up @@ -350,7 +350,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X DELETE \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X DELETE \
https://api.digiseg.net/users/$USER_ID/apikeys/$KEY_ID
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/users/\"+user_id+\"/apikeys/\"+key_id,\
Expand Down Expand Up @@ -391,7 +391,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X GET \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET \
https://api.digiseg.net/users/$USER_ID/apikeys/$KEY_ID
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/users/\"+user_id+\"/apikeys/\"+key_id,\
Expand All @@ -416,7 +416,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X GET \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET \
https://api.digiseg.net/user
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/user\", {\n \"method\": \"GET\"\
Expand Down Expand Up @@ -446,7 +446,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X DELETE \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X DELETE \
https://api.digiseg.net/users/$USER_ID
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/users/\"+user_id, {\n \"method\"\
Expand Down Expand Up @@ -479,7 +479,7 @@ paths:
x-codeSamples:
- lang: Shell
source: |-
curl -H "Authorization: $ACCESS_TOKEN" -X GET \
curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET \
https://api.digiseg.net/users/$USER_ID
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/users/\"+user_id, {\n \"method\"\
Expand Down Expand Up @@ -957,6 +957,42 @@ paths:
source: "fetch(\"https://api.digiseg.net/campaigns/\"+campaign_id+\"/stats/timing\"\
, {\n \"method\": \"GET\", \n \"headers\": {\"X-API-KEY\": apikey},\n\
}).then(response => {\n console.log(response);\n})"
/campaigns/{campaign_id}/stats/frequencies:
get:
description: |
Query the frequency statistics for a campaign. Frequency
statistics are helpful to identify the frequency of impressions
per user, or distinct reach of a campaign. It can also be helpful
to identify how multiple impressions for the same users may or
may not generate more clicks.
operationId: queryCampaignFrequencyStats
parameters:
- explode: false
in: path
name: campaign_id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/queryCampaignFrequencyStats_200_response'
description: OK
summary: Frequency statistics for campaign
tags:
- campaigns
x-codeSamples:
- lang: Shell
source: |-
curl -H "X-API-KEY: $APIKEY" -X GET \
https://api.digiseg.net/campaigns/$CAMPAIGN_ID/stats/frequencies
- lang: JavaScript
source: "fetch(\"https://api.digiseg.net/campaigns/\"+campaign_id+\"/stats/frequencies\"\
, {\n \"method\": \"GET\", \n \"headers\": {\"X-API-KEY\": apikey},\n\
}).then(response => {\n console.log(response);\n})"
/populations/{category_key}:
get:
description: List all populations within a category
Expand Down Expand Up @@ -1207,10 +1243,7 @@ components:
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/CampaignFrequencyStats'
type: object
$ref: '#/components/schemas/queryCampaignFrequencyStats_200_response'
description: OK
ListPopulationsResponse:
content:
Expand Down Expand Up @@ -3010,11 +3043,12 @@ components:
properties:
average_frequency:
description: |
The average frequency of impressions per user
The average frequency of impressions per user.
type: number
frequencies:
description: |
A listing of each frequency observed and the relevant measurements for each
A listing of frequencies observed and the relevant measurements for each. The returned list
may be truncated to cut off the "long tail" of frequency values.
items:
$ref: '#/components/schemas/FrequencyStats'
type: array
Expand Down Expand Up @@ -3586,6 +3620,25 @@ components:
data:
$ref: '#/components/schemas/CampaignTimingStats'
type: object
queryCampaignFrequencyStats_200_response:
example:
data:
frequencies:
- frequency: 1
count: 4327843
- frequency: 2
count: 1337207
- frequency: 3
count: 38447
- frequency: 4
count: 4383
- frequency: 5
count: 1238
count_above_cap: 27
properties:
data:
$ref: '#/components/schemas/CampaignFrequencyStats'
type: object
listPopuplations_200_response:
example:
data:
Expand Down
136 changes: 136 additions & 0 deletions openapi/api_campaigns.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openapi/docs/CampaignFrequencyStats.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AverageFrequency** | Pointer to **float32** | The average frequency of impressions per user | [optional]
**Frequencies** | Pointer to [**[]FrequencyStats**](FrequencyStats.md) | A listing of each frequency observed and the relevant measurements for each | [optional]
**AverageFrequency** | Pointer to **float32** | The average frequency of impressions per user. | [optional]
**Frequencies** | Pointer to [**[]FrequencyStats**](FrequencyStats.md) | A listing of frequencies observed and the relevant measurements for each. The returned list may be truncated to cut off the \"long tail\" of frequency values. | [optional]
**CountAboveCap** | Pointer to **int32** | The number of users that have generated impressions at a frequency value greater than those represented in `frequencies`. | [optional]

## Methods
Expand Down
Loading

0 comments on commit 504e192

Please sign in to comment.