| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Protocol buffer messages to get wallpaper info from the Backdrop service, |
| // including the wallpaper collection names, image url and descriptions etc. |
| |
| syntax = "proto2"; |
| |
| package backdrop; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| // Information about the creator or owner of an image. |
| message Attribution { |
| // A localized description of the attribution of an image e.g. |
| // "Photo by John Doe" or "Geschrieben von John". |
| optional string text = 1; |
| } |
| |
| // Next Id: 7 |
| message Image { |
| // A unique ID for the image. Useful for analytics. |
| optional fixed64 asset_id = 1; |
| |
| // The image URL. May be wrapped or modified to include cropping, etc. |
| optional string image_url = 2; |
| |
| // A URL that can be accessed to find out more information about the image. |
| // For example, a link to more information about an artist or photographer or |
| // to a Google+ post. |
| optional string action_url = 3; |
| |
| // An attribution list for the image. |
| repeated Attribution attribution = 4; |
| } |
| |
| // A logical grouping of images e.g. landscapes or space photography. |
| message Collection { |
| // The unique id for the collection. |
| optional string collection_id = 1; |
| |
| // A localized description of the collection e.g. "Landscapes" or "Kunst". |
| optional string collection_name = 2; |
| |
| // A list of representative images for the collection. Currently only a single |
| // image will be returned. |
| repeated Image preview = 3; |
| } |
| |
| message GetCollectionsRequest { |
| // The language that should be used for content. |
| optional string language = 1; |
| |
| // The approximate permanent location of the user e.g. "us". |
| optional string region = 2; |
| |
| // An string describes a label (e.g. NEXUS, etc) used to return exclusive |
| // content or filter unwanted collections from the corpus. |
| repeated string filtering_label = 3; |
| } |
| |
| message GetCollectionsResponse { |
| // A list of every available collection for the given language and region. |
| repeated Collection collections = 1; |
| } |
| |
| // Next Id: 5 |
| message GetImagesInCollectionRequest { |
| // The id of the collection being requested. |
| optional string collection_id = 1; |
| |
| // The language that should be used for content. |
| optional string language = 2; |
| |
| // The approximate permanent location of the user e.g. "us". |
| optional string region = 3; |
| |
| // An string describes a label (e.g. NEXUS, etc) used to return exclusive |
| // content or filter unwanted images from the corpus. |
| repeated string filtering_label = 4; |
| } |
| |
| message GetImagesInCollectionResponse { |
| // A list of all the images in a collection, filtered by language and region. |
| repeated Image images = 1; |
| } |
| |
| // Next Id: 6 |
| message GetImageFromCollectionRequest { |
| // The collections that the image will be selected from. |
| repeated string collection_ids = 1; |
| |
| // An opaque token, copied from GetImageFromCollectionResponse, that is used |
| // to prevent duplicate images from being returned. |
| optional string resume_token = 2; |
| |
| // The language that should be used for content. |
| optional string language = 3; |
| |
| // The approximate permanent location of the user e.g. "us". |
| optional string region = 4; |
| |
| // An string describes a label (e.g. NEXUS, etc) used to return exclusive |
| // content or filter unwanted images from the corpus. |
| repeated string filtering_label = 5; |
| } |
| |
| message GetImageFromCollectionResponse { |
| // The imaged selected from the given collections. |
| optional Image image = 1; |
| |
| // An opaque token that should be passed in subsequent calls and is used to |
| // prevent duplicate images from being returned. |
| optional string resume_token = 2; |
| } |