Releases: bvdcode/Blink.NET
Releases · bvdcode/Blink.NET
Release 0.1.14
Update X-Blink-Time-Zone header to use UTC The code change updates the `X-Blink-Time-Zone` HTTP header value from "America/Los_Angeles" to "UTC". This means that the application will now use Coordinated Universal Time (UTC) instead of the Pacific Time Zone (America/Los_Angeles) for the `X-Blink-Time-Zone` header in its HTTP requests.
Release 0.1.13
Refactor authorization and client identification Modified `Program.cs` to always reauthorize the client by setting `reauth: true` in the `AuthorizeAsync` method call. Changed the reauthorization condition to check for client verification instead of an empty token. Removed the `Token` property from the `Secrets` class in `Secrets.cs`. Added a `UniqueId` property to the `BlinkClient` class in `BlinkClient.cs` to generate unique identifiers for each client instance, replacing the hardcoded `_uniqueId` value.
Release 0.1.12
Implement IBlinkClient interface in BlinkClient The BlinkClient class in BlinkClient.cs has been modified to implement the IBlinkClient interface. A new file, IBlinkClient.cs, has been introduced, defining the IBlinkClient interface with several asynchronous methods for interacting with the Blink API, such as AuthorizeAsync, DeleteVideoAsync, GetDashboardAsync, GetVideoAsync, GetVideosAsync, and VerifyPinAsync. It also includes a property GeneralSleepTime to control the delay required to prevent the server from returning an empty response.
Release 0.1.11
Refactor HTTP client handling and centralize base URL Introduce a new private constant `_baseUrl` for the Blink API. Replace direct `_http` usage with `GetHttpClient()` method. Update `CreateHttpClient` to have a default `token` value. Ensure `_http` is initialized with `_baseUrl` in `GetHttpClient()`. Centralize `HttpClient` creation and retrieval for consistency.
Release 0.1.10
Update unique_id in login API to include app name and version The code change updates the `unique_id` field in the request body for the login API call. Previously, the `unique_id` was set to `_userAgent`. Now, it is set to a string that combines the name and version of the entry assembly, formatted as "AppName vVersion". This modification ensures that the `unique_id` sent in the login request is more descriptive, including both the application name and its version, which can be useful for tracking and debugging purposes.
Release 0.1.9
Update HTTP client headers and user agent in BlinkClient.cs
Changed the token header key to uppercase ("TOKEN-AUTH") to ensure server recognition. Updated the user agent string to a static value ("35.1ANDROID_28746173") for standardization and compliance with server requirements.
Release 0.1.8
Change package icon
Release 0.1.7
Add retry mechanism to GetVideoAsync in BlinkClient - Added `System.Net.Mime` namespace to `BlinkClient.cs`. - Modified `GetVideoAsync` to include optional `tryCount` parameter. - Implemented retry logic in `GetVideoAsync`: - Attempts to retrieve video up to `tryCount` times. - Posts to URL and waits for `GeneralSleepTime` before retrying. - Returns video as byte array if content type is "video/mp4". - Throws `BlinkClientException` if content type is not "video/mp4" after retries.
Release 0.1.6
Improve error message in BlinkClient.cs for content type Updated the exception message in BlinkClient.cs to include the actual content type received instead of the video.ManifestId when the content type is not "video/mp4". This change provides more relevant information about the failure.
Release 0.1.5
Enhance error handling and disable video deletion Improved error handling and validation in `GetVideoAsync` and `DeleteVideoAsync` methods of `BlinkClient.cs` by adding checks for authorization and video data integrity, throwing `BlinkClientException` when necessary. Enhanced exception messages for better debugging. Temporarily disabled video deletion in `Program.cs` by commenting out the `await client.DeleteVideoAsync(video);` line.