简体   繁体   English

如何开始使用Amazon Product Advertising API C#

[英]How to get started with Amazon Product Advertising API C#

I'm doing this for the first time so I'm very new to this API. 我是第一次这样做,所以我对这个API还是很陌生。 I need to write a C# program to fetch products by keywords, just like performing an item search on Amazon. 我需要编写一个C#程序来通过关键字获取产品,就像在Amazon上执行商品搜索一样。 I just started investigating on the ItemSearch API using these links: 我刚刚开始使用这些链接来研究ItemSearch API:

But I can't find any relevant code samples since the most recent one is 6 years ago... I understood that I have to have an "Associate Tag" but in order to do so, I need to provide a website URL which I currently don't have since I just started coding. 但是我找不到任何相关的代码示例,因为最近的代码示例是6年前...我了解我必须拥有一个“关联标签”,但为此,我需要提供一个网站网址,自从我刚开始编码以来,目前还没有。

Do I have to have an "Associate Tag" right from the start in order to start developing ? 为了开始开发,我是否必须从一开始就拥有一个“关联标签”?

Are there any recent and relevant C# code samples ? 是否有任何近期和相关的C#代码示例?

I came across this sample project in Git which can be found here: jz5/AmazonProductAdvtApiSample-2013 我在Git中遇到了这个示例项目,可以在这里找到: jz5 / AmazonProductAdvtApiSample-2013

It has a good base which one can build on, so I hope it may come in handy to other users as well. 它具有良好的基础,可以以此为基础,因此我希望它对其他用户也可以派上用场。

A current project to this assignment you can found here https://github.com/tinohager/Nager.AmazonProductAdvertising 您可以在这里找到此任务的最新项目https://github.com/tinohager/Nager.AmazonProductAdvertising

The library is also available over nuget 该库也可以通过nuget使用

PM> install-package Nager.AmazonProductAdvertising

Example: 例:

var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US);
var result = wrapper.Search("canon eos", AmazonSearchIndex.Electronics, AmazonResponseGroup.Large);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM