Base clientsΒΆ

Here is 2 base API clients. Abstract clients that might be inherited and overridden:

  1. synchronous freedictionaryapi.clients.BaseDictionaryApiClient

  2. asynchronous freedictionaryapi.clients.BaseAsyncDictionaryApiClient

All you need to implement your own client it is to implement one method of the chosen base:

  • freedictionaryapi.clients.BaseDictionaryApiClient.fetch_api_response()

  • freedictionaryapi.clients.BaseAsyncDictionaryApiClient.fetch_api_response()

Method`s goals are very simple:
  • fetch response that JSON-ized (something like response.json());

  • get response status code;

  • put it in right order in one tuple.

See notes of particular class about this method.