BNMetrics / Laravel-ShopifyAPI

Shopify Laravel API Wrapper ( with Billing support!)
MIT License
53 stars 30 forks source link

Add ability to use Search keyword (+ code PSR) #8

Closed RRStoyanov closed 7 years ago

RRStoyanov commented 7 years ago

$searchResults = $shopify->getCustomersSearch([ 'query' => 'email: foo@example.com', 'limit' => 250, ]);

BNMetrics commented 7 years ago

Hello @RRStoyanov , Thanks for submitting the pull request. However, since not all the api endpoints have /search.json, I would limit this to specific endpoints, such as 'customer'. If you can make that change, I will review it and approve this pull request.

Thanks!:)

RRStoyanov commented 7 years ago

Not needed. There is other possibility

$shopify->getCustomersAll('search', ['query' => 'email:foo', 'limit' => 250]);

Keep in mind, that

$shopify->getCustomersAll('search', ['query' => 'email: foo', 'limit' => 250]);

will not reutrn results (notice the space after email: )

Thanks @BNMetrics for contacting me and taking care of the package!