-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 688 - new method "getProductImageIds" (#689)
New file: * `api_get_product_image_ids_test.dart`: tests around `OpenFoodAPIClient.getProductImageIds`. Impacted files: * `api_get_product_test.dart`: unrelated fix about server data change * `api_matched_product_v1_test.dart`: unrelated fix about server data change * `api_matched_product_v2_test.dart`: unrelated fix about server data change * `api_search_products_test.dart`: unrelated fix about server data change * `image_helper.dart`: new method `getUploadedImageUrl` * `open_food_api_client.dart`: new method `getProductImageIds`
- Loading branch information
1 parent
57d0685
commit 71e4067
Showing
7 changed files
with
93 additions
and
9 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
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,16 @@ | ||
import 'package:openfoodfacts/openfoodfacts.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import 'test_constants.dart'; | ||
|
||
void main() { | ||
test('get product image ids', () async { | ||
const String barcode = '3019081238643'; | ||
final List<int> result = await OpenFoodAPIClient.getProductImageIds( | ||
barcode, | ||
user: TestConstants.PROD_USER, | ||
queryType: QueryType.PROD, | ||
); | ||
expect(result.length, greaterThanOrEqualTo(34)); // was 34 on 2023-01-25 | ||
}); | ||
} |
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