ads.proto
path protobuffet/example/ad/v1/ads.proto
package protobuffet.example.ad.v1
Messages
Ad
Represents an Ad that can be displayed to a user. These are generated from a given context.
Name | Type | Description |
---|---|---|
redirect_url | string | URL to redirect to when an ad is clicked. |
text | string | Short advertisement text to display. |
type | AdType | Type of ad. |
AdRequest
Request to fetch ads for a given context.
Name | Type | Description |
---|---|---|
context_keys | repeated string | List of important key words from the current page describing the context. |
AdResponse
Response containing ads to display to the user.
Name | Type | Description |
---|---|---|
ads | repeated Ad | List of all ads to display. The service responds with many ads, so it is up to the client to handle how many should be displayed to the user at a time. |
Enums
AdType
Type of ad to render.
Name | Number | Description |
---|---|---|
UNKNOWN | 0 | Unknown/undefined ad type. |
FEATURED_PRODUCT | 1 | Featured product ad type. |
HEADER_PRODUCT | 2 | Header product ad type. |
BUY_IT_AGAIN_PRODUCT | 3 | Buy it again ad type. |
Services
AdService
Ads management service. Exposes APIs oriented around displaying ads for our users.
GetAds
Method | GetAds |
---|---|
Request | AdRequest |
Response | AdResponse |
Description | Fetch ads to display for a given context. |