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