schedjoules / ios-public-calendars-sdk

MIT License
6 stars 2 forks source link

Replace accessToken Parameters with Api parameters. #9

Closed dmfs closed 6 years ago

dmfs commented 6 years ago

The current code passes accessToken everywhere so each Controller creates its own SchedJoulesApi instance. That's not a good design. Instead the SchedJoulesApi object should created at the top level (by the user of the SDK) and passed to each instance which needs to send requests to the API. So instead if a String with the accessToken, all controllers should accept an Api instance.