diff --git a/.unicornfig.yml b/.unicornfig.yml index 4d67c85..7ce5a3e 100644 --- a/.unicornfig.yml +++ b/.unicornfig.yml @@ -7,5 +7,5 @@ description: "This repository contains the original interface definitions of pub \ definitions can provide a better understanding of HPI Cloud APIs and help you\ \ to utilize them more efficiently. You can also use these definitions with open\ \ source tools to generate client libraries, documentation, and other artifacts." -version: "0.0.6" +version: "0.0.7" githubName: "HPI-de/hpi-cloud-apis" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0007809..24c85e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.0.7] - 2019-09-05 +### BREAKING CHANGES +- **course, food, news:** support pagination + +### Removed +- **food:** remove MenuItem.substitution + ## [0.0.6] - 2019-08-19 ### Added - **feedback:** add feedback definitions @@ -65,7 +72,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Initial release with NewsService. -[Unreleased]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.6...dev +[Unreleased]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.7...dev +[0.0.7]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.6...0.0.7 [0.0.6]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.5...0.0.6 [0.0.5]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.4...0.0.5 [0.0.4]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.3...0.0.4 diff --git a/build.gradle b/build.gradle index 6e671a3..2209d57 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ ext { githubReleaseNotes = 'CHANGELOG.md' allLicenses = ["Apache-2.0"] - libraryVersion = "0.0.6" + libraryVersion = "0.0.7" } task sourcesJar(type: Jar, dependsOn: classes) { diff --git a/hpi/cloud/course/v1test/course_service.proto b/hpi/cloud/course/v1test/course_service.proto index 3e055ce..bf96a75 100644 --- a/hpi/cloud/course/v1test/course_service.proto +++ b/hpi/cloud/course/v1test/course_service.proto @@ -31,20 +31,28 @@ service CourseService { rpc GetCourse (GetCourseRequest) returns (Course); - // Lists course details. - rpc ListCourseDetails (ListCourseDetailsRequest) returns (ListCourseDetailsResponse); - // Gets details for a course. rpc GetCourseDetail (GetCourseDetailRequest) returns (CourseDetail); } // Request message for listing course series using [ListCourseSeries][hpi.cloud.course.v1test.CourseService.ListCourseSeries]. message ListCourseSeriesRequest { + // The maximum number of course series to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListCourseSeries` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing CourseSeries using [ListCourseSeries][hpi.cloud.course.v1test.CourseService.ListCourseSeries]. message ListCourseSeriesResponse { + // A possibly paginated list of course series. repeated CourseSeries course_series = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetCourseSeries][hpi.cloud.course.v1test.CourseService.GetCourseSeries]. @@ -56,11 +64,21 @@ message GetCourseSeriesRequest { // Request message for listing semesters using [ListSemesters][hpi.cloud.course.v1test.CourseService.ListSemesters]. message ListSemestersRequest { + // The maximum number of semesters to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListSemesters` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing semesters using [ListSemesters][hpi.cloud.course.v1test.CourseService.ListSemesters]. message ListSemestersResponse { repeated Semester semesters = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetSemester][hpi.cloud.course.v1test.CourseService.GetSemester]. @@ -72,16 +90,27 @@ message GetSemesterRequest { // Request message for listing courses using [ListCourses][hpi.cloud.course.v1test.CourseService.ListCourses]. message ListCoursesRequest { + // The maximum number of courses to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListCourses` + // that indicates where this listing should continue from. + string page_token = 2; + // If specified, only courses of this series are returned. - string course_series_id = 1; + string course_series_id = 3; // If specified, only courses offered in this semester are returned. - string semester_id = 2; + string semester_id = 4; } // Response message for listing courses using [ListCourses][hpi.cloud.course.v1test.CourseService.ListCourses]. message ListCoursesResponse { repeated Course courses = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetCourse][hpi.cloud.course.v1test.CourseService.GetCourse]. @@ -91,15 +120,6 @@ message GetCourseRequest { } -// Request message for listing course details using [ListCourseDetails][hpi.cloud.course.v1test.CourseService.ListCourseDetails]. -message ListCourseDetailsRequest { -} - -// Response message for listing course details using [ListCourseDetails][hpi.cloud.course.v1test.CourseService.ListCourseDetails]. -message ListCourseDetailsResponse { - repeated CourseDetail details = 1; -} - // Request message for [GetCourseDetail][hpi.cloud.course.v1test.CourseService.GetCourseDetail]. message GetCourseDetailRequest { // Required. The ID of the course whose details to get. diff --git a/hpi/cloud/crashreporting/v1test/crashreport.proto b/hpi/cloud/crashreporting/v1test/crashreport.proto new file mode 100644 index 0000000..8e85d69 --- /dev/null +++ b/hpi/cloud/crashreporting/v1test/crashreport.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; + +package hpi.cloud.crashreporting.v1test; + +import "google/protobuf/timestamp.proto"; + +option java_multiple_files = true; +option java_outer_classname = "CrashReportProto"; +option java_package = "de.hpi.cloud.crashreporting.v1test"; + + +// A crash report from a client. +message CrashReport { + // Required, output only. The unique ID of this crash report. + string id = 1; + + // Required. The app (or package) name, e.g. de.hpi.android. + string app_name = 2; + + // Required. The version of this app, e.g. 1.2.5-alpha.2. + string app_version = 3; + + // Required. The version code of this app, e.g. 10205102. + uint32 app_version_code = 4; + + // The device a crash occurred on. + message Device { + // Required. The brand, e.g. Samsung. + string brand = 1; + + // Required. The model, e.g. Galaxy S8+. + string model = 2; + } + + // The device this crash occurred on. + Device device = 5; + + // The OS a crash occurred on. + message OperatingSystem { + // Required. The OS name, e.g. Android. + string os = 1; + + // Required. The OS version, e.g. 9. + string version = 2; + } + + // The OS this crash occurred on. + OperatingSystem operating_system = 6; + + // Required. The timestamp of when this crash occurred. + google.protobuf.Timestamp timestamp = 7; + + // Required. The exception itself. + string exception = 8; + + // Required. Stack trace of the exception. + string stack_trace = 9; + + // Logs of what occurred before the exception. + string log = 10; +} diff --git a/hpi/cloud/crashreporting/v1test/service.proto b/hpi/cloud/crashreporting/v1test/service.proto new file mode 100644 index 0000000..0685e2b --- /dev/null +++ b/hpi/cloud/crashreporting/v1test/service.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package hpi.cloud.crashreporting.v1test; + +import "hpi/cloud/crashreporting/v1test/crashreport.proto"; + +option java_multiple_files = true; +option java_outer_classname = "CrashReportingProto"; +option java_package = "de.hpi.cloud.crashreporting.v1test"; + +// Collects crash reports from clients. +service CrashReportingService { + // Create a crash report. + rpc CreateCrashReport(CreateCrashReportRequest) returns (CrashReport); +} + +// Request message for creating a crash report using [CreateCrashReport][hpi.cloud.crashreporting.v1test.CrashReportService.CreateCrashReport]. +message CreateCrashReportRequest { + // Required. The crash report to store. + CrashReport crash_report = 1; +} diff --git a/hpi/cloud/feedback/v1test/feedback_service.proto b/hpi/cloud/feedback/v1test/feedback_service.proto index e8a4f78..3d479c8 100644 --- a/hpi/cloud/feedback/v1test/feedback_service.proto +++ b/hpi/cloud/feedback/v1test/feedback_service.proto @@ -14,7 +14,7 @@ service FeedbackService { rpc CreateFeedback(CreateFeedbackRequest) returns (Feedback); } -// Request message for creating feedback using [ListInfoBits][hpi.cloud.feedback.v1test.FeedbackService.ListInfoBits]. +// Request message for creating feedback using [CreateFeedback][hpi.cloud.feedback.v1test.FeedbackService.CreateFeedback]. message CreateFeedbackRequest { // Required. The feedback to store. Feedback feedback = 1; diff --git a/hpi/cloud/food/v1test/restaurant.proto b/hpi/cloud/food/v1test/food.proto similarity index 86% rename from hpi/cloud/food/v1test/restaurant.proto rename to hpi/cloud/food/v1test/food.proto index 0d84645..43226d2 100644 --- a/hpi/cloud/food/v1test/restaurant.proto +++ b/hpi/cloud/food/v1test/food.proto @@ -40,15 +40,6 @@ message MenuItem { // IDs of the labels of the item. repeated string label_ids = 7; - - message Substitution { - string title = 1; - - repeated string label_ids = 2; - } - - // An optional substitution that's offered to the hungry consumer. - Substitution substitution = 8; } // A label on a menu item. diff --git a/hpi/cloud/food/v1test/food_service.proto b/hpi/cloud/food/v1test/food_service.proto index d37f47a..530ecdf 100644 --- a/hpi/cloud/food/v1test/food_service.proto +++ b/hpi/cloud/food/v1test/food_service.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package hpi.cloud.food.v1test; import "google/type/date.proto"; -import "hpi/cloud/food/v1test/restaurant.proto"; +import "hpi/cloud/food/v1test/food.proto"; option java_multiple_files = true; option java_outer_classname = "FoodServiceProto"; @@ -34,11 +34,22 @@ service FoodService { // Request message for listing restaurants using [ListRestaurants][hpi.cloud.food.v1test.FoodService.ListRestaurants]. message ListRestaurantsRequest { + // The maximum number of restaurants to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListRestaurants` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing restaurants using [ListRestaurants][hpi.cloud.food.v1test.FoodService.ListRestaurants]. message ListRestaurantsResponse { + // A possibly paginated list of restaurants. repeated Restaurant restaurants = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetRestaurant][hpi.cloud.food.v1test.FoodService.GetRestaurant]. @@ -50,16 +61,28 @@ message GetRestaurantRequest { // Request message for listing items on the menu using [ListMenuItems][hpi.cloud.food.v1test.FoodService.ListMenuItems]. message ListMenuItemsRequest { + // The maximum number of menu items to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListMenuItems` + // that indicates where this listing should continue from. + string page_token = 2; + // If specified, only menu items served at this restaurant are returned. - string restaurant_id = 1; + string restaurant_id = 3; // If specified, only menu items served on this day are returned. - google.type.Date date = 2; + google.type.Date date = 4; } // Response message for listing MenuItems using [ListMenuItems][hpi.cloud.food.v1test.FoodService.ListMenuItems]. message ListMenuItemsResponse { + // A possibly paginated list of menu items. repeated MenuItem items = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetMenuItem][hpi.cloud.food.v1test.FoodService.GetMenuItem]. @@ -71,11 +94,22 @@ message GetMenuItemRequest { // Request message for listing labels using [ListLabels][hpi.cloud.food.v1test.FoodService.ListLabels]. message ListLabelsRequest { + // The maximum number of labels to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListLabels` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing Labels using [ListLabels][hpi.cloud.food.v1test.FoodService.ListLabels]. message ListLabelsResponse { + // A possibly paginated list of labels. repeated Label Labels = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetLabel][hpi.cloud.food.v1test.FoodService.GetLabel]. diff --git a/hpi/cloud/news/v1test/news_service.proto b/hpi/cloud/news/v1test/news_service.proto index c7d6850..330e5da 100644 --- a/hpi/cloud/news/v1test/news_service.proto +++ b/hpi/cloud/news/v1test/news_service.proto @@ -40,19 +40,22 @@ service NewsService { // Request message for listing articles using [ListArticles][hpi.cloud.news.v1test.NewsService.ListArticles]. message ListArticlesRequest { - // If specified, only articles from this source are returned. - string source_id = 1; + // The maximum number of Articles to return in the response. + int32 page_size = 1; - // If specified, only articles from this category are returned. - string category_id = 2; - - // If specified, only articles tagged with this tag are returned. - string tag_id = 3; + // A pagination token returned from a previous call to `ListArticles` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing articles using [ListArticles][hpi.cloud.news.v1test.NewsService.ListArticles]. message ListArticlesResponse { + // A possibly paginated list of articles. repeated Article articles = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetArticle][hpi.cloud.news.v1test.NewsService.GetArticle]. @@ -64,11 +67,22 @@ message GetArticleRequest { // Request message for listing sources using [ListSources][hpi.cloud.news.v1test.NewsService.ListSources]. message ListSourcesRequest { + // The maximum number of sources to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListSources` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing sources using [ListSources][hpi.cloud.news.v1test.NewsService.ListSources]. message ListSourcesResponse { + // A possibly paginated list of sources. repeated Source sources = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetSource][hpi.cloud.news.v1test.NewsService.GetSource]. @@ -80,11 +94,22 @@ message GetSourceRequest { // Request message for listing categories using [ListCategories][hpi.cloud.news.v1test.NewsService.ListCategories]. message ListCategoriesRequest { + // The maximum number of categories to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListCategories` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing categories using [ListCategories][hpi.cloud.news.v1test.NewsService.ListCategories]. message ListCategoriesResponse { + // A possibly paginated list of categories. repeated Category categories = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetCategory][hpi.cloud.news.v1test.NewsService.GetCategory]. @@ -96,11 +121,22 @@ message GetCategoryRequest { // Request message for listing tags using [ListTags][hpi.cloud.news.v1test.NewsService.ListTags]. message ListTagsRequest { + // The maximum number of tags to return in the response. + int32 page_size = 1; + + // A pagination token returned from a previous call to `ListTags` + // that indicates where this listing should continue from. + string page_token = 2; } // Response message for listing tags using [ListTags][hpi.cloud.news.v1test.NewsService.ListTags]. message ListTagsResponse { + // A possibly paginated list of tags. repeated Tag tags = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; } // Request message for [GetTag][hpi.cloud.news.v1test.NewsService.GetTag].