{"id":18758741,"url":"https://github.com/optical/flickelectricsharp","last_synced_at":"2026-05-19T03:02:57.944Z","repository":{"id":144153742,"uuid":"133499270","full_name":"optical/FlickElectricSharp","owner":"optical","description":"A C# library for accessing basic information from flickelectric.co.nz","archived":false,"fork":false,"pushed_at":"2018-08-14T02:45:12.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T13:49:39.310Z","etag":null,"topics":["api","csharp","dotnet","dotnetcore","flick","flickelectric"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/optical.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-15T10:21:30.000Z","updated_at":"2018-08-14T02:45:13.000Z","dependencies_parsed_at":"2023-06-09T00:45:13.477Z","dependency_job_id":null,"html_url":"https://github.com/optical/FlickElectricSharp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optical%2FFlickElectricSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optical%2FFlickElectricSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optical%2FFlickElectricSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optical%2FFlickElectricSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/optical","download_url":"https://codeload.github.com/optical/FlickElectricSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239650781,"owners_count":19674808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","dotnet","dotnetcore","flick","flickelectric"],"created_at":"2024-11-07T17:47:33.558Z","updated_at":"2026-05-19T03:02:57.840Z","avatar_url":"https://github.com/optical.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlickElectricSharp [![Build Status](https://travis-ci.org/optical/FlickElectricSharp.svg?branch=master)](https://travis-ci.org/optical/FlickElectricSharp) [![Build status](https://ci.appveyor.com/api/projects/status/9x0eoknwn9tywgua?svg=true)](https://ci.appveyor.com/project/optical/flickelectricsharp) [![NuGet Package](https://img.shields.io/nuget/v/FlickElectricSharp.svg)](https://www.nuget.org/packages/FlickElectricSharp/)\n\nA simple, unofficial .NET client for accessing current [FlickElectric](https://flickelectric.co.nz) prices, along with historic data\n\n## Installation\nAvailable on [Nuget](https://www.nuget.org/packages/FlickElectricSharp/)\n```\nInstall-Package FlickElectricSharp -Version 0.2.0\n```\n\n## Usage\nThere are 2 main classes for accessing the Flick API's. One corresponds to their web api for exporting historic usage data, while the other uses their Android APP api to poll for current and predicted future pricing.\n\nSee the Flick2Influx project for an example application which queries the API and stores the results in InfluxDB.\n\n### FlickAndroidClient\nProvides access to the current flick prices\n\n```\nvar client = new FlickAndroidClient(\"username\", \"password\");\n// Get our user details\nvar userInfo = await client.GetUserInfo();\n\n// Get current + forecast prices\nvar forecastPrices = await client.GetPriceForecast(userInfo.AuthorizedDataContexts.SupplyNodes[0]);\n\n// Of all the forecasts, choose the current one.\nvar currentPredictedPrice = forecastPrices.Prices.MinBy(price =\u003e price.StartsAt);\n\n// Details  about how much the spot price is, along with retailer fees, line fees, etc that make up the total price\nforeach (var priceComponent in currentPredictedPrice.Components) {\n\tConsole.WriteLine($\"Component {priceComponent.ChargeSetter}_{priceComponent.ChargeMethod}: {priceComponent.Value}\");\n}\n\n// Simply output the total price\nConsole.WriteLine($\"Total price: currentPredictedPrice.Price.Value\")\n```\n\n### FlickWebClient\n\nProvides access to your historic usage data, via the flick website.\n```\nvar client = new FlickWebClient(\"username\", \"password\");\n\n// Historic usage only, no pricing\nvar powerUsageData = await client.GetPowerUsage(DateTime.Now - Timespan.FromDays(7), DateTime.Now - TimeSpan.FromDays(1));\n\nforeach (var bucket in powerUsageData) {\n\tConsole.WriteLine($\"ICP Number: {bucket.IcpNumber\");\n\tConsole.WriteLine($\"Meter Serial Number: {bucket.MeterSerialNumber\");\n\tConsole.WriteLine($\"ChannelNumber: {bucket.ChannelNumber\");\n\tConsole.WriteLine($\"StartedAt: {bucket.StartedAt\");\n\tConsole.WriteLine($\"EndedAt: {bucket.EndedAt\");\n\tConsole.WriteLine($\"Value: {bucket.Value\");\n\tConsole.WriteLine($\"UnitCode: {bucket.UnitCode\");\n\tConsole.WriteLine($\"Status: {bucket.Status\");\n}\n\nvar pricesAndUsage = await client.FetchDetailedUsageForDay(DateTime.Now.AddDays(-3));\nforeach (var usageBucket in pricesAndUsage) {\n\tConsole.WriteLine($\"Between {usageBucket.Start}-{usageBucket.End} the price of power was {usageBucket.Price} and you used {usageBucket.Units}kWh\");\n}\n\n```\n\n## Disclaimer\nAccess to this data is via Flicks public API's used by its Android App and Website. They're likely to break whenever a significant update is made by Flick. This library rough around the edges and not production ready, but you may find it useful for hobbyist projects\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptical%2Fflickelectricsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptical%2Fflickelectricsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptical%2Fflickelectricsharp/lists"}