github.com/cbroglie/openapi2proto@v0.0.0-20171004221549-76b8501da882/fixtures/most_popular-options.proto (about)

     1  syntax = "proto3";
     2  
     3  import "google/protobuf/any.proto";
     4  
     5  import "google/api/annotations.proto";
     6  
     7  package themostpopularapi;
     8  
     9  message GetMostemailedSectionTimePeriodRequest {
    10      string Accept = 1;
    11      string api_key = 2;
    12      string section = 3;
    13      string time_period = 4;
    14  }
    15  
    16  message GetMostemailedSectionTimePeriodResponse {
    17      string copyright = 1;
    18      int32 num_results = 2;
    19      repeated ArticleWithCountType results = 3;
    20      string status = 4;
    21  }
    22  
    23  message GetMostsharedSectionTimePeriodRequest {
    24      string api_key = 1;
    25      string section = 2;
    26      string time_period = 3;
    27  }
    28  
    29  message GetMostsharedSectionTimePeriodResponse {
    30      string copyright = 1;
    31      int32 num_results = 2;
    32      repeated Article results = 3;
    33      string status = 4;
    34  }
    35  
    36  message GetMostviewedSectionTimePeriodRequest {
    37      string Accept = 1;
    38  }
    39  
    40  message GetMostviewedSectionTimePeriodResponse {
    41      string copyright = 1;
    42      int32 num_results = 2;
    43      repeated Article results = 3;
    44      string status = 4;
    45  }
    46  
    47  message Article {
    48      string abstract = 1;
    49      string byline = 2;
    50      string column = 3;
    51      DesFacet des_facet = 4;
    52      GeoFacet geo_facet = 5;
    53      google.protobuf.Any media = 6;
    54      OrgFacet org_facet = 7;
    55      PerFacet per_facet = 8;
    56      string published_date = 9;
    57      string section = 10;
    58      string source = 11;
    59      string title = 12;
    60      string url = 13;
    61  }
    62  
    63  message ArticleWithCountType {
    64      string abstract = 1;
    65      string byline = 2;
    66      string column = 3;
    67      string count_type = 4;
    68      DesFacet des_facet = 5;
    69      GeoFacet geo_facet = 6;
    70      message Media {
    71          string caption = 1;
    72          string copyright = 2;
    73          message Media_metadata {
    74              string format = 1;
    75              int32 height = 2;
    76              string url = 3;
    77              int32 width = 4;
    78          }
    79          Media_metadata media_metadata = 3;
    80          string subtype = 4;
    81          string type = 5;
    82      }
    83      repeated Media media = 7;
    84      OrgFacet org_facet = 8;
    85      PerFacet per_facet = 9;
    86      string published_date = 10;
    87      string section = 11;
    88      string source = 12;
    89      string title = 13;
    90      string url = 14;
    91  }
    92  
    93  message DesFacet {
    94      string type = 1;
    95  }
    96  
    97  message GeoFacet {
    98      string type = 1;
    99  }
   100  
   101  message OrgFacet {
   102      string type = 1;
   103  }
   104  
   105  message PerFacet {
   106      string type = 1;
   107  }
   108  
   109  enum Section {
   110      ARTS = 0;
   111      AUTOMOBILES = 1;
   112      BLOGS = 2;
   113      BOOKS = 3;
   114      BUSINESS_DAY = 4;
   115      EDUCATION = 5;
   116      FASHION_AND_STYLE = 6;
   117      FOOD = 7;
   118      HEALTH = 8;
   119      JOB_MARKET = 9;
   120      MAGAZINE = 10;
   121      MEMBERCENTER = 11;
   122      MOVIES = 12;
   123      MULTIMEDIA = 13;
   124      NY202F20REGION = 14;
   125      NYT_NOW = 15;
   126      OBITUARIES = 16;
   127      OPEN = 17;
   128      OPINION = 18;
   129      PUBLIC_EDITOR = 19;
   130      REAL_ESTATE = 20;
   131      SCIENCE = 21;
   132      SPORTS = 22;
   133      STYLE = 23;
   134      SUNDAY_REVIEW = 24;
   135      T_MAGAZINE = 25;
   136      TECHNOLOGY = 26;
   137      THE_UPSHOT = 27;
   138      THEATER = 28;
   139      TIMES_INSIDER = 29;
   140      TODAYS_PAPER = 30;
   141      TRAVEL = 31;
   142      US = 32;
   143      WORLD = 33;
   144      YOUR_MONEY = 34;
   145      ALLSECTIONS = 35;
   146  }
   147  
   148  enum SharedType {
   149      DIGG = 0;
   150      EMAIL = 1;
   151      FACEBOOK = 2;
   152      MIXX = 3;
   153      MYSPACE = 4;
   154      PERMALINK = 5;
   155      TIMESPEOPLE = 6;
   156      TWITTER = 7;
   157      YAHOOBUZZ = 8;
   158  }
   159  
   160  enum TimePeriod {
   161      TIMEPERIOD_1 = 0;
   162      TIMEPERIOD_7 = 1;
   163      TIMEPERIOD_30 = 2;
   164  }
   165  
   166  service TheMostPopularAPIService {
   167      // Most Emailed by Section & Time Period
   168      rpc GetMostemailedSectionTimePeriod(GetMostemailedSectionTimePeriodRequest) returns (GetMostemailedSectionTimePeriodResponse) {
   169        option (google.api.http) = {
   170          get: "/svc/mostpopular/v2/mostemailed/{section}/{time-period}.json"
   171        };
   172      }
   173      // Most Shared by Section & Time Period
   174      rpc GetMostsharedSectionTimePeriod(GetMostsharedSectionTimePeriodRequest) returns (GetMostsharedSectionTimePeriodResponse) {
   175        option (google.api.http) = {
   176          get: "/svc/mostpopular/v2/mostshared/{section}/{time-period}.json"
   177        };
   178      }
   179      // Most Viewed by Section & Time Period
   180      rpc GetMostviewedSectionTimePeriod(GetMostviewedSectionTimePeriodRequest) returns (GetMostviewedSectionTimePeriodResponse) {
   181        option (google.api.http) = {
   182          get: "/svc/mostpopular/v2/mostviewed/{section}/{time-period}.json"
   183        };
   184      }
   185  }