예제 #1
0
        public BaseMagentoClient(MagentoClientConfig config)
        {
            Config = config;

            RestClient = new RestClient(Config.BaseUrl + (Config.UseRewritedUrlFormat ? "/api/rest/" : "/index.php/rest/default/V1/"));
            RestClient.AddDefaultHeader(Config.ContentTypeHeaderWithUnderscore ? "Content_Type" : "Content-Type", "application/json");
            RestClient.Authenticator = OAuth1Authenticator.ForProtectedResource(
                Config.ConsumerKey,
                Config.ConsumerSecret,
                Config.AccessToken,
                Config.AccessTokenSecret);
        }
예제 #2
0
 public MagentoClientV2(MagentoClientConfig config) : base(config)
 {
 }