1
1
using FikaAmazonAPI . Utils ;
2
- using System ;
3
- using System . Collections . Generic ;
4
- using System . Linq ;
5
- using System . Text ;
6
- using System . Threading . Tasks ;
2
+ using static FikaAmazonAPI . Utils . Constants ;
7
3
8
4
namespace FikaAmazonAPI . SampleCode
9
5
{
@@ -15,19 +11,20 @@ public CatalogItemsSample(AmazonConnection amazonConnection)
15
11
this . amazonConnection = amazonConnection ;
16
12
}
17
13
18
-
19
- public void GetCatalogItem ( )
14
+ [ Obsolete ( "This method deprecated in June 2022. Please use GetCatalogItem(ParameterGetCatalogItem parameterListCatalogItem) instead." , true ) ]
15
+ public void GetCatalogItemAsync ( )
20
16
{
21
17
var item = amazonConnection . CatalogItem . GetCatalogItem ( "B00CZC5F0G" ) ;
22
18
23
19
}
24
-
20
+
25
21
public void ListCatalogCategories ( )
26
22
{
27
23
var item = amazonConnection . CatalogItem . ListCatalogCategories ( "B00CZC5F0G" ) ;
28
24
29
25
}
30
26
27
+ [ Obsolete ( "This method deprecated in June 2022. Please use SearchCatalogItems202204 instead." , true ) ]
31
28
public void ListCatalogItems ( )
32
29
{
33
30
var items = amazonConnection . CatalogItem . ListCatalogItems ( new Parameter . CatalogItems . ParameterListCatalogItems ( )
@@ -36,5 +33,39 @@ public void ListCatalogItems()
36
33
Query = "740985280133"
37
34
} ) ;
38
35
}
36
+
37
+ public async Task GetCatalogItem ( )
38
+ {
39
+ var data = await amazonConnection . CatalogItem . GetCatalogItem202204Async (
40
+ new Parameter . CatalogItems . ParameterGetCatalogItem
41
+ {
42
+ ASIN = "B00JK2YANC" ,
43
+ includedData = new [ ] { IncludedData . attributes ,
44
+ IncludedData . salesRanks ,
45
+ IncludedData . summaries ,
46
+ IncludedData . productTypes ,
47
+ IncludedData . relationships ,
48
+ IncludedData . dimensions ,
49
+ IncludedData . identifiers ,
50
+ IncludedData . images }
51
+ } ) ;
52
+ }
53
+
54
+ public async Task SearchCatalogItems ( )
55
+ {
56
+ var data = await amazonConnection . CatalogItem . SearchCatalogItems202204Async (
57
+ new Parameter . CatalogItems . ParameterSearchCatalogItems202204
58
+ {
59
+ keywords = new [ ] { "vitamin c" } ,
60
+ includedData = new [ ] { IncludedData . attributes ,
61
+ IncludedData . salesRanks ,
62
+ IncludedData . summaries ,
63
+ IncludedData . productTypes ,
64
+ IncludedData . relationships ,
65
+ IncludedData . dimensions ,
66
+ IncludedData . identifiers ,
67
+ IncludedData . images }
68
+ } ) ;
69
+ }
39
70
}
40
71
}
0 commit comments