-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/1003
- Loading branch information
Showing
11 changed files
with
293 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
description: 'Create a report to help us improve the Open Food Facts Dart SDK' | ||
about: 'Create a report to help us improve the Open Food Facts Dart SDK' | ||
title: '' | ||
labels: '' | ||
type: '🐛 Bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Description | ||
A clear and concise description of what the bug is. | ||
<!-- A clear and concise description of what the bug is.--> | ||
|
||
### Expected behavior | ||
A clear and concise description of what you expected to happen. | ||
<!-- A clear and concise description of what you expected to happen.--> | ||
|
||
### Stacktraces | ||
If applicable, provide error stacktraces. | ||
<!-- If applicable, provide error stacktraces.--> | ||
|
||
### Package information | ||
Open Food Facts package version: | ||
<!-- Open Food Facts package version:--> | ||
|
||
### Additional context | ||
Add any other context about the problem here. | ||
<!-- Add any other context about the problem here.--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
run: dart doc . | ||
|
||
- name: Deploy API documentation to Github Pages | ||
uses: JamesIves/[email protected].1 | ||
uses: JamesIves/[email protected].2 | ||
with: | ||
BRANCH: gh-pages | ||
FOLDER: doc/api/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'order_by.dart'; | ||
|
||
/// Field for the "order by" clause of "get price products". | ||
enum GetPriceProductsOrderField implements OrderByField { | ||
priceCount(offTag: 'price_count'), | ||
created(offTag: 'created'), | ||
updated(offTag: 'updated'); | ||
|
||
const GetPriceProductsOrderField({required this.offTag}); | ||
|
||
@override | ||
final String offTag; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:openfoodfacts/src/prices/flavor.dart'; | ||
|
||
import 'get_price_count_parameters_helper.dart'; | ||
import 'get_price_products_order.dart'; | ||
|
||
/// Parameters for the "get price products" API query. | ||
class GetPriceProductsParameters | ||
extends GetPriceCountParametersHelper<GetPriceProductsOrderField> { | ||
String? brandsLike; | ||
String? brandsTagsContains; | ||
String? categoriesTagsContains; | ||
String? code; | ||
String? ecoscoreGrade; | ||
String? labelsTagsContains; | ||
String? novaGroup; | ||
String? nutriscoreGrade; | ||
String? productNameLike; | ||
int? uniqueScansNGte; | ||
Flavor? source; | ||
|
||
@override | ||
Map<String, String> getQueryParameters() { | ||
super.getQueryParameters(); | ||
addNonNullString(brandsLike, 'brands__like'); | ||
addNonNullString(brandsTagsContains, 'brands_tags__contains'); | ||
addNonNullString(categoriesTagsContains, 'categories_tags__contains'); | ||
addNonNullString(code, 'code'); | ||
addNonNullString(ecoscoreGrade, 'ecoscore_grade'); | ||
addNonNullString(labelsTagsContains, 'labels_tags__contains'); | ||
addNonNullString(novaGroup, 'nova_group'); | ||
addNonNullString(nutriscoreGrade, 'nutriscore_grade'); | ||
addNonNullString(productNameLike, 'product_name__like'); | ||
addNonNullInt(uniqueScansNGte, 'unique_scans_n__gte'); | ||
addNonNullString(source?.offTag, 'source'); | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:openfoodfacts/openfoodfacts.dart'; | ||
|
||
import '../interface/json_object.dart'; | ||
|
||
part 'get_price_products_result.g.dart'; | ||
|
||
/// List of price product objects returned by the "get price products" method. | ||
@JsonSerializable() | ||
class GetPriceProductsResult extends JsonObject { | ||
@JsonKey() | ||
List<PriceProduct>? items; | ||
|
||
@JsonKey() | ||
int? total; | ||
|
||
@JsonKey(name: 'page') | ||
int? pageNumber; | ||
|
||
@JsonKey(name: 'size') | ||
int? pageSize; | ||
|
||
@JsonKey(name: 'pages') | ||
int? numberOfPages; | ||
|
||
GetPriceProductsResult(); | ||
|
||
factory GetPriceProductsResult.fromJson(Map<String, dynamic> json) => | ||
_$GetPriceProductsResultFromJson(json); | ||
|
||
@override | ||
Map<String, dynamic> toJson() => _$GetPriceProductsResultToJson(this); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.