API makeover
-
Use email as list identifier. As of now the list_id and the list email can be used. -
Use email as subscription identifier. As of now the list_id and the list email can be used. -
Make parameter usage consistent: As of now we use query params and params in the request body. E. g. lists/{list_email}/send_list_key_to_subscriptions.json
-
Check for leftover implementation quirks from ActiveResource -
post /subscriptions.json: Return created object in response instead of redirect -
Check special commands -
Nest subscription and key resources under lists: lists/{list_email}/subscriptions/{subscription_email}.json
-
/keys.json: response should contain mail address of subscription if allowed and if it exists -
get '/:fingerprint.json': if subscription with list email and fingerprint exists return email of subscription in the response -
get 'subscription/{id}.json: Add one line representation of key to response. -
Check json responses and introduce a root node (data, error). Use json also in error cases, currently we return strings on errors. If we do this we could also check if we could get rid of setting the X-Messages attribute in the header.
{
root: {
data: {
},
messages: {
},
},
}
{
error: 'Description'
}