This issue would deal with the initial development of the native_api_amazon within the affiliates_connect_amazon sub-module by incorporating specifically by making API calls through Guzzle. Though initially, the API calls were supposed to be made by involving the REST API and creating REST resources for the same, however, making http calls through cURL for rest involves the need to call the curl_setopt() method to define the header and the particular HTTP verb like GET, POST, PUT, etc. and makes the job pretty complicated. However, Guzzle is far more flexible makes it relatively easier by just initializing the client and providing HTTP verbs and the URL. The authorization layer could be added later on. Also after the skeleton works fine we could add in REST UI integration into the parent module if needed.
As of now, it is done according to the following 2 steps:
- Setup Amazon Associate account for utilizing the resources of the Product Advertising API
- Create the basic working skeleton for the amazon native plugin by implementing dummy GET calls by using the Guzzle client to create required methods with HTTP calls to verify that the skeleton is correct and the data is being fetched. Also for the GET aTests could be added later on once the skeleton works as designed.
Comment | File | Size | Author |
---|---|---|---|
#23 | Screenshot from 2018-07-15 21-40-32.png | 136.51 KB | ankitjain28may |
#20 | 2979372-20.patch | 77.56 KB | ankitjain28may |
| |||
#17 | 2979372-17.patch | 80.21 KB | ankitjain28may |
#14 | 2979372-14.patch | 73.27 KB | ankitjain28may |
#10 | 2979372-10.patch | 73.19 KB | ankitjain28may |
Comments
Comment #2
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedComment #3
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedComment #4
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedAttached patch containing dummy get call by sending request to PA API endpoint through Guzzle client as mentioned in issue summary above.
Please review and suggest changes.
Comment #5
thedrupalkid CreditAttribution: thedrupalkid as a volunteer commentedComment #6
thedrupalkid CreditAttribution: thedrupalkid as a volunteer commentedChange
affiliates-connectamazon to affiliates-connect-amazon
Why
AmazonTestAPIController
notAmazonAPIController
Please correct all the naming conventions.
Comment #7
thedrupalkid CreditAttribution: thedrupalkid as a volunteer commentedComment #8
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@thedrupalkid,
On it.
Comment #9
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedComment #10
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedAdded the complete Amazon Native API module. Please review.
Limitation-
Pagination is missing and Amazon throttling issue,
Features-
1- User can add the locale and everything will be according to his locale.
2- Search Items from your Locale Categories.
3- Search Items through Product ASIN No.
4- Import Selected Products from the Search Page.
5- Import all the products of the search page through Batch processing (Throttling issue)
6- Everything is configured through the Amazon Settings page.
Comment #11
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedAhh, I think, Tests will get failed, I haven't fixed the config form tests of the Amazon Module. Will fix them in next issue.
Comment #13
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedComment #14
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedPatch rerolled.
Comment #16
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedComment #17
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedFixed the tests and added routes test for the search page.
Along with that, Implement the pagination feature and request throttling issue is also resolved.
Comment #19
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedComment #20
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedFixed the tests and made some improvement.
Comment #22
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedDon't know why tests are failing here, Its passed on my local.
Comment #23
ankitjain28may CreditAttribution: ankitjain28may as a volunteer and at Google Summer of Code commentedAttach the image for the tests running successfully on my system.
Comment #25
dbjpanda CreditAttribution: dbjpanda commented