-
Notifications
You must be signed in to change notification settings - Fork 203
/
Copy pathProgram.cs
42 lines (29 loc) · 1.3 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace FikaAmazonAPI.SampleCode
{
class Program
{
static async Task Main(string[] args)
{
var config = new ConfigurationBuilder()
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.AddJsonFile("appsettings.json")
.AddUserSecrets<Program>()
.Build();
var factory = LoggerFactory.Create(builder => builder.AddConsole());
AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
{
ClientId = config.GetSection("FikaAmazonAPI:ClientId").Value,
ClientSecret = config.GetSection("FikaAmazonAPI:ClientSecret").Value,
RefreshToken = config.GetSection("FikaAmazonAPI:RefreshToken").Value,
MarketPlaceID = config.GetSection("FikaAmazonAPI:MarketPlaceID").Value,
SellerID = config.GetSection("FikaAmazonAPI:SellerId").Value,
IsDebugMode = true
}, loggerFactory: factory);
FeedsSample feedsSample = new FeedsSample(amazonConnection);
_ = feedsSample.SubmitFeedPRICING_JSONAsync("B087YHP3HQ.151", 131.77M, 67.70M, 131.77M);
Console.ReadLine();
}
}
}