-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
…ploadProof (openfoodfacts#926) * feat: 831 - prices methods getProofs, getProof and getUsers + fixed uploadProof New files: * `flavor.dart`: Flavor is used to refer to a specific Open*Facts project. * `get_price_count_parameters_helper.dart`: Helper class for API query parameters with price count filters. * `get_proofs_order.dart`: Field for the "order by" clause of "get proofs". * `get_proofs_parameters.dart`: Parameters for the "get proofs" API query. * `get_proofs_result.dart`: List of proof objects returned by the "get proofs" method. * `get_proofs_result.g.dart`: generated * `get_users_order.dart`: Field for the "order by" clause of "get users". * `get_users_parameters.dart`: Parameters for the "get users" API query. * `get_users_result.dart`: List of price user objects returned by the "get users" method. * `get_users_result.g.dart`: generated * `price_user.dart`: Price user object. * `price_user.g.dart`: generated Impacted files: * `api_prices_test.dart`: added tests for new methods `getProofs`, `getProof` and `getUsers`; fixed test of method `uploadProof` * `badge_base.g.dart`: unrelated file generation change * `events_base.g.dart`: unrelated file generation change * `get_locations_parameters.dart`: refactoring * `get_locations_result.g.dart`: unrelated file generation change * `get_parameters_helper.dart`: refactoring * `get_prices_parameters.dart`: refactoring * `get_prices_result.g.dart`: unrelated file generation change * `key_stats.g.dart`: unrelated file generation change * `knowledge_panel_element.g.dart`: unrelated file generation change * `leaderboard_entry.g.dart`: unrelated file generation change * `location.dart`: new field `priceCount` * `location.g.dart`: generated * `ocr_ingredients_result.g.dart`: unrelated file generation change * `ocr_packaging_result.g.dart`: unrelated file generation change * `old_product_result.g.dart`: unrelated file generation change * `open_prices_api_client.dart`: new methods `getProofs`, `getProof` and `getUsers`; fixed method `uploadProof` * `openfoodfacts.dart`: exported the new files * `price.dart`: new fields `proof`, `location` and `product` * `price.g.dart`: generated * `price_product.dart`: new fields * `price_product.g.dart`: generated * `product.g.dart`: unrelated file generation change * `product_stats.g.dart`: unrelated file generation change * `product_tag.g.dart`: unrelated file generation change * `proof.dart`: removed old field (that provoked test failure anyway) * `proof.g.dart`: generated * `pubspec.yaml`: upgraded packages to more recent versions - while not too recent either * `spelling_corrections.g.dart`: unrelated file generation change * Unrelated unit test fixes
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import '../model/off_tagged.dart'; | ||
import '../utils/server_type.dart'; | ||
|
||
/// Flavor is used to refer to a specific Open*Facts project. | ||
/// | ||
/// cf. `Flavor` in https://prices.openfoodfacts.org/api/docs | ||
/// Somehow redundant with [ServerType]. | ||
enum Flavor implements OffTagged { | ||
/// Open Food Facts | ||
@JsonValue('off') | ||
openFoodFacts(offTag: 'off'), | ||
|
||
/// Open Beauty Facts | ||
@JsonValue('obf') | ||
openBeautyFacts(offTag: 'obf'), | ||
|
||
/// Open Pet Food Facts | ||
@JsonValue('opff') | ||
openPetFoodFacts(offTag: 'opff'), | ||
|
||
/// Open Product Facts | ||
@JsonValue('opf') | ||
openProductFacts(offTag: 'opf'), | ||
|
||
/// Open Product Facts (Pro platform) | ||
@JsonValue('off-pro') | ||
openFoodProductFactsPro(offTag: 'off-pro'); | ||
|
||
const Flavor({ | ||
required this.offTag, | ||
}); | ||
|
||
@override | ||
final String offTag; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.