Mgmt API and unit test improvements #61
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes #42
Adds new API endpoints
/user/{screenname}/account
- fetch profile html, email address, registration and confirmation status for a given account/user/{screenname}/icon
- fetch the users buddy icon (image/gif)/session/{screenname}
- filter session information to a given screen nameModifies existing endpoints
/session
- Now includes the online seconds, away message HTML, idle secondsCentralizes fetching a user's buddy icon bart item as a function of the FeedBagManager.
Removes the xxxHandler functions in the mgmt api in favor of using new patterns available for the http.ServeMux.HandleFunc registrations that can now include the HTTP method.
Unit tests were updated with mockParams for all of the interfaces used throughout the tests. Unit tests were also added for the new endpoints.
Testing
Fetching account information for an AIM account
Fetching account information for an ICQ account
Fetching the buddy icon for a given user in the browser
Fetching session data now outputs more information for each session
Fetch session data for just a single screen name
All unit tests pass