-
Notifications
You must be signed in to change notification settings - Fork 18
Using Mashape
If you have your own private version of Readability Metrics, you can import the readability-metrics-configuration.xml into your new API.
Make sure to set the Base URL as:
http://your-appengine-app.appspot.com/readability/api/v1
This is due to versioning needs. Then test:
$ curl -v http://you-appengine-app.appspot.com/readability/api/v1/debugIf everything goes fine, calls to debug should return 200 OK in the example above.
IT tests should reflected (MashapeTextResourceId), specially if using the API Permissions Addon (which you should really use). In particular, change those constants:
- MASHAPE_PUBLIC_USER_ID
- MASHAPE_AUTH_HEADER_VALUE
The last one should be fetched from the API Docs - Its the value of the X-Mashape-Authorization, which appears when you click the "Show Curl Example" link.
Since appengine needs DataStore (and DataStore is not your mothers' Relational Database), things are a bit different than the usual.
Due to security needs, each entity has an unique name, defined as such:
<user-mashape-id>:<text-id>
Where:
- user-mashape-id is the value of the public user identifier, obtained from Mashapes' Dashboard (under Mashape Keys | Public Key)
- Text Id is the SHA-1 hash of the source text
We accept id-without-:, and we append yours if that happens. If you send others users id, we'll replace with yours. This is made in order to make it easier to start using.