Skip to main content

ads.proto

path protobuffet/example/ad/v1/ads.proto

package protobuffet.example.ad.v1


Messages

Represents an Ad that can be displayed to a user. These are generated from a given context.

NameTypeDescription
redirect_urlstringURL to redirect to when an ad is clicked.
textstringShort advertisement text to display.
typeAdTypeType of ad.

AdRequest

Request to fetch ads for a given context.

NameTypeDescription
context_keysrepeated stringList of important key words from the current page describing the context.

AdResponse

Response containing ads to display to the user.

NameTypeDescription
adsrepeated AdList 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.

NameNumberDescription
UNKNOWN0Unknown/undefined ad type.
FEATURED_PRODUCT1Featured product ad type.
HEADER_PRODUCT2Header product ad type.
BUY_IT_AGAIN_PRODUCT3Buy it again ad type.

Services

AdService

Ads management service. Exposes APIs oriented around displaying ads for our users.

GetAds

MethodGetAds
RequestAdRequest
ResponseAdResponse
DescriptionFetch ads to display for a given context.