gomdb
gomdb copied to clipboard
Episode/Series API changes and cleanups
I'm sending this PR for further discussion and possible inclusion. Things done:
- properly format (erroneous space before gomd.Init()) code in README
- remove erroneous "/?" suffix in baseURL, as parameter/query builder will make sure we have proper URL format
- refactor MovieByImdbID() to use query *QueryData as rest of the API, so that we can also provide Season and Episode in query, as per OMDB API (i permits Season and Episode parameters)
- refactor requestAPI() for "id" and "t" accordingly, so that we also permit Season and Episode parameters in QueryData
- fix invalid Errorf() format in TestInvalidCategory() and TestFailSearch()
- refactor TestMediaByTitle() to add more tests and update for API changes, test Episode and Series queries
- refactor TestMediaByImdbID() for API changes mentioned above and add new tests, namely Season and Episode searches