Amazon Instant Access API
Amazon Instant Access (AIA) is a fulfilment technology for digital
content that is purchased on the Amazon website and is delivered by a
third party vendor.
Motivation
My motivation for developing this API is so I can advertise my software on the thousands of books sold by Amazon relevant to the software. But do this I need to become a vendor. It could be worth it despite the 30% cut Amazon take on the software.
Progress Update
Work on this API is now substantially finished although I have yet to test against a live server. I have inserted links to the integration guide in the class descriptions. I have not bothered to implement the subscription activation part of the API since I have my own software subscription system. But will be happy to implement it for anyone who requests it. There is very little in it.
Test Suite
New Reflective Classes
It's a fairly simple API and the reason it has been taking so long is I have been using it as a test ground for some new Eiffel-Loop classes that provide some powerful reflective capabilities. If you examine the AIA code you will find many classes are curiously absent of code that does anything. For example you won't find any JSON related strings, and you won't find any code to translate between the JSON camel case and the Eiffel snake case naming conventions, and you won't find any code that defines object equality by attribute comparison. All the heavy lifting is done by the reflective parent. Here is the reflective class hierarchy as pertaining to the AIA api.
EL_REFLECTION
EL_STATUS_CODE_REFLECTION* [N -> {NUMERIC, HASHABLE}]
AIA_RESPONSE_CODE
AIA_REASON_CODE
EL_REFLECTIVELY_SETTABLE* [S -> STRING_GENERAL create make_empty end]
EL_STORABLE*
AIA_CREDENTIAL
EL_REFLECTIVELY_JSON_SETTABLE*
AIA_REQUEST*
AIA_GET_USER_ID_REQUEST
AIA_PURCHASE_REQUEST
AIA_REVOKE_REQUEST
AIA_RESPONSE
AIA_GET_USER_ID_RESPONSE
AIA_PURCHASE_RESPONSE
AIA_REVOKE_RESPONSE
AIA_AUTHORIZATION_HEADER
EL_REFLECTIVELY_SETTABLE_STRINGS* [S -> STRING_GENERAL create make_empty end]
AIA_CREDENTIAL_ID
FCGI_REQUEST_PARAMETERS
FCGI_HTTP_HEADERS
Source CodeThe code is not yet part of an Eiffel-Loop release but is available by cloning or checking out the github repository.
The AIA code is located here