joedawson / amazon-ecs Goto Github PK
View Code? Open in Web Editor NEWWith Laravel, search and lookup Amazon products easily.
License: MIT License
With Laravel, search and lookup Amazon products easily.
License: MIT License
Hi thanks for your bundle, I've had problem with config file with lumen framework, I've manual write the config file, in amazonECS.php, line 37 write this:
config(['amazon.access_key' => 'xxxxxxxxxxxx']);
config(['amazon.secret_key' => 'xxxxxxxxxxxxxxx']);
config(['amazon.associate_tag' => 'xxxxxxxxxxx']);
config(['amazon.locale' => 'xx']);
Doing a simple:
$bookFromAmazon = Amazon::lookup($bookTitle)->json();
throws an error:
Call to undefined method GuzzleHttp\Psr7\Response::json()
do you have any idea why ?
PS: ->xml()
gives the same error
hi , what should i do to define Amazon Class in controller ?
my error is : Class 'App\Http\Controllers\Amazon' not found
Hi,
It seems like an amazing library for my use but I am facing the same issue that was reported earlier.
I tried to check the of status by using "\Amazon::search('Home Alone')->getStatusCode()" and its giving me 400. Can you please check this out for me.
Thanks in advance. :)
It's possible order by price - relevance and search only in category elettronics - movie etc.?
thanks
Hello thank you for this package - i'm trying to install on a new Laravel 5.6 project and receiving the following error message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/http-foundation (locked at v4.0.6) -> satisfiable by symfony/http-foundation[v4.0.6].
- dawson/amazon-ecs 2.0.1 requires symfony/psr-http-message-bridge 0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2].
- dawson/amazon-ecs v2.0.0 requires symfony/psr-http-message-bridge 0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2].
- Conclusion: don't install symfony/psr-http-message-bridge v0.2
- Installation request for dawson/amazon-ecs ^2.0 -> satisfiable by dawson/amazon-ecs[2.0.1, v2.0.0].
Installation failed, reverting ./composer.json to its original content.
Dear Joe,
It looks like the package is not compatible with Laravel 5.4 is there anyway to fix this issue?
Problem 1
- Installation request for symfony/psr-http-message-bridge (locked at v1.0.0) -> satisfiable by symfony/psr-http-message-bridge[v1.0.0].
- dawson/amazon-ecs 1.0.0 requires symfony/psr-http-message-bridge 0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2].
- dawson/amazon-ecs 1.0.1 requires symfony/psr-http-message-bridge 0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2].
- dawson/amazon-ecs 1.0.2 requires symfony/psr-http-message-bridge 0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2].
- dawson/amazon-ecs 1.0.3 requires symfony/psr-http-message-bridge 0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2].
- Conclusion: don't install symfony/psr-http-message-bridge v0.2
- Installation request for dawson/amazon-ecs ^1.0 -> satisfiable by dawson/amazon-ecs[1.0.0, 1.0.1, 1.0.2, 1.0.3].
I have the following method in a controller:
public function add()
{
$product = Amazon::lookup('B004VLKY8M')->json();
return $product;
}
and I'm getting a Class 'App\Http\Controllers\Amazon' not found
I'm not sure what use statement to place in the controller file, I have tried
use Amazon;
use Dawson\AmazonECS\AmazonECS
use Dawson\AmazonECS\Amazon
and many more versons and get the same result.
I have both Dawson\AmazonECS\AmazonECSServiceProvider::class, and 'Amazon' => Dawson\AmazonECS\AmazonECSFacade::class, in my config\app.php file in the correct place.
can't figure out why I am getting this error.
Hi! How to paginate a results?
Any method ->paginate() ?
Thanks
Hello,
since this morning, without update the code, I have this error which is triggered by calling the method ->json ();
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message></Error>
I already generated a new Amazon Api key but that does not change anything.
An idea ?
Thank you !
Dear @joedawson
I already tried and I thought that I can add more parameters into the search method inside AmazonECS class like these lines below but it seems I can't,
$params = $this->params(['Keywords' => $query, 'SearchIndex' => $category, 'ResponseGroup' => 'Images,ItemAttributes,Offers'**, 'Sort' => '-price']**);
And I tried to retrieve all the items inside a category by bypassing the search query like below:
$amazon_results = \Amazon::search('', 'Electronics')->json();
and that's not possible too.
And I can't remove the search 'keyword' inside the search method when I think as I read it on the Amazon API manuals it's possible.
$params = $this->params(['SearchIndex' => $category, 'ResponseGroup' => 'Images,ItemAttributes,Offers']);
I've been running this package for about 1 year now. Suddenly (within the last month or two?) all amazon requests return a 400 response (bad request). Not sure if something changed in the API or if my keys were disabled or something?
Any insight would be great!
Thanks
Hi there,
I included the package for my laravel app. ItemLookup is working and I receive the correct output. For the ItemSearch operation I do not receive any items, so my response looks like this:
The request seems to be valid. AWS keys are correct as well since otherwise the ItemLookup would not work. I tried with several keywords where amazon definitely has products. I deleted my vendor folder and run composer install.
I appreciate any kind of help or ideas what the problem might be!
Cheers,
Sebastian
Hi I have this error after setting up the package:
Call to undefined method GuzzleHttp\Psr7\Response::json()
and that's my code in the controller which I called it directly from the home controller just for testing.
public function index()
{
$results = \Amazon::search('Home Alone')->json();
Thanks in advance, And thank you for the hard work and the time you given to this great project.
Thanks
Hint: I'm using it on Laravel 5.3
i want 3 results only
Hi,
I needed to include the ability to add pagination to my Amazon search results, I'm not sure my method is the best way but it is working for my use case (basically just submitting an optional "page" attribute with the request). I can submit a pull request, but this might be too much of a "quick and dirty" approach (code below).
Thanks for your work on this package btw, it was really helpful in my project.
public function search($query, $page = 1)
{
$query = rawurlencode($query);
if ($page == 1) {
$params = $this->params(['Keywords' => $query, 'SearchIndex' => 'All', 'ResponseGroup' => $this->response_group]);
} else {
$params = $this->params(['Keywords' => $query, 'SearchIndex' => 'All', 'ResponseGroup' => $this->response_group, 'ItemPage'=>$page]);
}
$string = $this->buildString($params);
$signature = $this->signString($string);
$url = $this->url($params, $signature);
try {
$this->response = $this->client->get($url)->getBody();
return $this;
} catch(ClientException $e) {
return $e->getResponse();
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.