Based on the Search client, the code is more or less a copy-paste of the Search client, modified to make it work with the new LiveFeed api.
The main difference between the Search and LiveFeed clients is that there is no need for a Query class for LiveFeed. It has one endpoint with three input parameters which is easier to just handle directly in the Client. (In Search, it is the Client object that handles the request anyway.)
Todo
[x] Fix the namespace problems described in 63557577ea34c73287e1dd4f712aa1be03c49d0c (fixed in 6e5e110a2a0b0943feedcd81511e33e059781645)
[x] Add tests for all LiveFeed classes (3ffe0bbb07d084ce45ba3988a2dab5f450277395)
[x] De-duplicate the code, LiveFeed and Search are pretty similar - Skipping this, it is better to do when the Search client has been updated as well
[x] Rename the environment variable to something better (right now TWINGLY_SEARCH_KEY is used for both Search and LiveFeed) - I'll leave it as is, this can also be done later
Based on the Search client, the code is more or less a copy-paste of the Search client, modified to make it work with the new LiveFeed api.
The main difference between the Search and LiveFeed clients is that there is no need for a Query class for LiveFeed. It has one endpoint with three input parameters which is easier to just handle directly in the Client. (In Search, it is the Client object that handles the request anyway.)
Todo
De-duplicate the code, LiveFeed and Search are pretty similar- Skipping this, it is better to do when the Search client has been updated as wellRename the environment variable to something better (right now- I'll leave it as is, this can also be done laterTWINGLY_SEARCH_KEY
is used for both Search and LiveFeed)