v2.0.0
FritzApi 2.0 is a major release containing significant changes, particularly around the FritzApi.Client.
Enhancements
- Use tesla to make the underlying HTTP client configurable
Breaking Changes
- Replace the stateful
FritzApi.Clientthat would need to be started as part of a supervision tree with a simpler struct based approach:- Call
FritzApi.Client.new()to create a new client andFritzApi.Client.login(client, "user", "password")to authenticate with the Fritz API - See README for an example
- Call
- Switch functions like
FritzApi.get_switch_state/2return:on,:offatoms instead of a boolean, and:unknownif the actor is unavailable - Introduce a custom error struct (
FritzApi.Error) and use custom structs for actors (e.g.FritzApi.Switch) - Make hackney an optional dependency. To use the default
hackneybased adatper, add{:hackney, "~> 1.16"}to the list of dependencies.