Newegg.Marketplace.SDK
1.0.10
dotnet add package Newegg.Marketplace.SDK --version 1.0.10
NuGet\Install-Package Newegg.Marketplace.SDK -Version 1.0.10
<PackageReference Include="Newegg.Marketplace.SDK" Version="1.0.10" />
paket add Newegg.Marketplace.SDK --version 1.0.10
#r "nuget: Newegg.Marketplace.SDK, 1.0.10"
// Install Newegg.Marketplace.SDK as a Cake Addin #addin nuget:?package=Newegg.Marketplace.SDK&version=1.0.10 // Install Newegg.Marketplace.SDK as a Cake Tool #tool nuget:?package=Newegg.Marketplace.SDK&version=1.0.10
Newegg Marketplace SDK for .Net
Newegg Marketplace SDK(C#) is a library to help .Net programmers easily integrate their application with the Newegg Marketplace API. Included are definitions for the data objects models to create the request and resolve the response. The logger and retry mechanism can be customized to your requirements.
To use the SDK to communicate with the Newegg API, you need to be a registered seller and have an 'API Key(Authorization)' and 'Secret Key'. Please visit Newegg Marketplace Seller Portal to request API credentials. Review the Seller Help Guide to learn about detailed instruction. Put this information into a JSON file and load the setting using the APIConfig.FromJsonFile method. Without the 'API Key(Authorization)' and 'Secret Key' you can run the test project in Simulation Mode. This is provided to help you understand the SDK before actual use.
The solution contains 2 library projects: Newegg.Marketplace.SDK.Base and Newegg.Marketplace.SDK. The first one is the framework of the SDK, and the second one is the business logic model and interface to various API. The code is based on .NET Standard 2.0, you can build it with .Net framework 4.6 or .Net Core 2.1.
Target Frameworks
- .NET Standard 2.0
- .NET Core 2.1
- .NET Framework 4.6
Installation
The package is on Nuget. You can install it with the Nuget Package Manager, search for 'newegg.marketplace.sdk'. You can also install it with the following tools:
- Package Manager:
Install-Package Newegg.Marketplace.SDK -Version <current version number>
- .Net CLI
Install-Package Newegg.Marketplace.SDK -Version <current version number>
- PackageReference
<PackageReference Include="Newegg.Marketplace.SDK" Version="<current version number>" />
- Paket CLI
paket add Newegg.Marketplace.SDK --version <current version number>
build
You can download the zip file and build it for your target frameworks(.Net framework4.6 or .Net core2.1). You can choose manually build it and link library from your project or direct include the project to your solution. We recommend using Visual Studio 2017 or later. You can choose to build it with the command following too.
- To build
dotnet build Newegg.Marketplace.SDK
- Nuget library The library Dependents on 'Newtonsoft.Json(12.0.1)' and 'NLog(4.6.2)'.
Q&A
- How to use the SDK?
- We recommed setting these infomation in a json file as below.
{
"SellerID": "****",
"Credentials": {
"Authorization": "********************************",
"SecretKey": "*******-****-****-****-************"
},
"Connection": {
"RequestTimeoutMs": 20000,
"AttemptsTimes": 3,
"RetryIntervalMs": 3000
},
"APIFormat": "XML",
"Platform": "CAN"
}
- load the configuration to a APIConfig object.
APIConfig config = APIConfig.FromJsonFile(PathOfTheJSONConfigFile);
- Create a APIClient with the config.
APIClient client = new APIClient(config);
- Create the APICall object with the APIClien.
OrderCall ordercall = new OrderCall(client);
- Use the APICall object to call API.
var orderstatus = await ordercall.GetOrderStatus("105137040", 304);
What's the settings in the Config?
- SellerID : The 4-character Seller ID. Required.
- Credentials.Authorization: The API Key get from datafeeds@newegg.com. Required.
- Credentials.SecretKey: The Secret Key get from datafeeds@newegg.com. Required.
- Connection.RequestTimeoutMs: The number of milliseconds the system connection timed out. Optional, Default:10000.
- Connection.AttemptsTimes: Number of retries after a failed connection. Optional, Default:3.
- Connection.RetryIntervalMs: The number of milliseconds between retry attempts. Optional, Default:3000.
- BaseUrl: The base url of the Newegg marketplace API. Optional, Default: "https://api.newegg.com/marketplace/"
- APIFormat: Content type used to call API. The options are XML and Json. Optional, Default: XML.
- Platform: The platfrom of seller: There are three options:
- USA: seller on www.newegg.com
- B2B: seller on www.neweggbussiness.com
- CAN: seller on www.newegg.ca Optional, Default: USA.
How to get the API key and Secret Key?
- Send the request to Datafeeds@newegg.com from the seller default email address.
- The message should include seller name or default email address. Newegg Marketplace team will process all requests in 24 hours.
NLog configuration file location and how to customize log
Please refer https://github.com/NLog/NLog/wiki/Configuration-file#configuration-file-locationsHow to use the Mock model?
Set the SimulationEnabled to be 'true' to the APIClient object.
fakeUSAClientXML = new APIClient(USA_Config_XML) { SimulationEnabled = true };
- Where is the example code?
There is an example project in the solution.
https://github.com/Newegg/newegg-marketplace-sdk-dotnet/tree/master/Newegg.Marketplace.SDK/example
Modules
Item
Seller
- Seller Management
https://developer.newegg.com/newegg_marketplace_api/seller_management/
Order
Shipping
- Newegg Shipping Label Service
https://developer.newegg.com/newegg_marketplace_api/newegg_shipping_label_service/
Other
- Verify Service Status
https://developer.newegg.com/newegg_marketplace_api/verify_service_status/
SBN
- Shipped by Newegg Management
https://developer.newegg.com/newegg_marketplace_api/sbn_shipped_by_newegg_management/
DataFeed
- DataFeed Management
https://developer.newegg.com/newegg_marketplace_api/datafeed_management/
Report
- Reports Management
https://developer.newegg.com/newegg_marketplace_api/reports_management/
RMA
- RMA(Return Merchandise Authorization) Management
https://developer.newegg.com/newegg_marketplace_api/rma_management/
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 12.0.1)
- NLog (>= 4.6.2)
-
.NETFramework 4.6
- Newtonsoft.Json (>= 12.0.1)
- NLog (>= 4.6.2)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
- NLog (>= 4.5.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initialize of the project