Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Rework and centralize api client operation #189

Merged
merged 5 commits into from
May 5, 2023
Merged

Commits on May 5, 2023

  1. Configuration menu
    Copy the full SHA
    a1c7ac8 View commit details
    Browse the repository at this point in the history
  2. [TASK] Skip one test when DEEPLMOCKAPISERVER is used

    The `DEEPLMOCKAPISERVER` is only a really rudimentary
    api implementation and do not simulate "full" api in
    any way. That means, that not all source/target languages
    are supported like for production api.
    
    Therefore, one test is skipped now when `DEEPLMOCKAPISERVER`
    is in use because of not supporting `EN` as target language.
    An additionally test is added to test from `EN` to `DE` in
    anny case.
    
    Furthermore, when mock server is used the supported content
    and and translated strings are used for test expectations.
    sbuerk committed May 5, 2023
    Configuration menu
    Copy the full SHA
    5ca8098 View commit details
    Browse the repository at this point in the history
  3. [TASK] Use DEEPLMOCKAPISERVER supported content and translation

    The `DEEPLMOCKAPISERVER` is only a really rudimentary
    api implementation and do not simulate "full" api in
    any way. That means, that not all source/target languages
    are supported like for production api.
    
    Therefore, when mock server is used, the supported content
    and and translated strings are used for test expectations.
    sbuerk committed May 5, 2023
    Configuration menu
    Copy the full SHA
    c1c263a View commit details
    Browse the repository at this point in the history
  4. [TASK] Use DEEPLMOCKAPISERVER supported content and translation

    The `DEEPLMOCKAPISERVER` is only a really rudimentary
    api implementation and do not simulate "full" api in
    any way. That means, that not all source/target languages
    are supported like for production api.
    
    Therefore, when mock server is used, the supported content
    and and translated strings are used for test expectations.
    
    [TASK] Donate fine grained method to retrieve api url parts
    
    `\WebVision\WvDeepltranslate\Configuration` transports the
    required configuration settings through the system, which
    is a good approach.
    
    This change donates more fine grained read methods to this
    class, to access api url parts. This is a preparation for
    an upcoming change.
    sbuerk committed May 5, 2023
    Configuration menu
    Copy the full SHA
    f9a9701 View commit details
    Browse the repository at this point in the history
  5. [TASK] Respect the url scheme of configured api url

    In a couple of places, `https` has been hardcoded enforced
    as request scheme, ignoring the scheme of the configured
    api url.
    
    This may seem to be a "security" enforcement, but these
    kind of overrides are not very user friendly and hidden
    magic is always a pain in the ass for debugging issues.
    
    This change now re-uses the configured api url scheme
    when building api requests. One test is adopted to do
    the same.
    
    The donated methods on the `Configuration` class to
    access api url parts are used for this.
    sbuerk committed May 5, 2023
    Configuration menu
    Copy the full SHA
    be84235 View commit details
    Browse the repository at this point in the history