{"id":22350667,"url":"https://github.com/timmoth/epochflow-toolkit","last_synced_at":"2025-03-26T11:27:41.112Z","repository":{"id":223765523,"uuid":"761334499","full_name":"Timmoth/epochflow-toolkit","owner":"Timmoth","description":"Repo containing public tools \u0026 samples for EpochFlow","archived":false,"fork":false,"pushed_at":"2024-05-12T20:34:50.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-13T20:57:18.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Timmoth.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":"2024-02-21T17:15:56.000Z","updated_at":"2024-06-02T14:07:05.664Z","dependencies_parsed_at":"2024-04-25T23:22:54.843Z","dependency_job_id":"af501f75-2297-42ed-8df7-c61b2293df7a","html_url":"https://github.com/Timmoth/epochflow-toolkit","commit_stats":null,"previous_names":["timmoth/epochflow-toolkit"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2Fepochflow-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2Fepochflow-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2Fepochflow-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2Fepochflow-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Timmoth","download_url":"https://codeload.github.com/Timmoth/epochflow-toolkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245643475,"owners_count":20649042,"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":[],"created_at":"2024-12-04T11:12:45.419Z","updated_at":"2025-03-26T11:27:41.093Z","avatar_url":"https://github.com/Timmoth.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# epochflow-toolkit\n\nRepo containing public tools \u0026amp; samples for EpochFlow\n\n## Links\n[App](https://app.epochflow.io/) • [Docs](https://docs.epochflow.io/) • [Swagger Api](https://api.epochflow.io/swagger/index.html)\n\n## Emulator\n\nThis [docker image](https://hub.docker.com/r/aptacode/epochflow-emulator) provides a light weight in memory emulator for the API which can be easily ran locally for development or part of your CICD pipeline for integration tests.\n\n```\ndocker run -p 8085:8080 aptacode/epochflow:latest\nEmulator web ui: https://localhost:8085\nEmulator Swagger docs: https://localhost:8085/swagger\n```\n\n## Nuget package\n\nThis [nuget package](https://www.nuget.org/packages/Epochflow/) contains all the classes needed to integrate Epoch flow into your dotnet Api.\n\n### Install the nuget package\n```bash\ndotnet add package epochflow\n```\n\n### Configure services\n```csharp\nvar apiKey = \"\u003capi_key\u003e\";\nvar accountId = \"\u003caccount_id\u003e\";\nvar apiUrl = \"\u003capi_url\u003e\";\nservices.AddEpochFlowV1(apiKey, accountId, apiUrl);\n```\n\n### Make requests\n```csharp\nprivate readonly IEpochFlowV1 _epochflow;\n\npublic async Task Load(){\n  var setId = \"\u003cset_id\u003e\";\n  var result = await _epochflow.GetSet(setId);\n  if(!result.IsSuccessStatusCode){\n    return;\n  }\n\n  var set = result.Content;\n}\n```\n\nAlternatively, if you don't want to configure DI\n```csharp\nvar httpClient = new HttpClient();\nhttpClient.BaseAddress = new Uri(EpochFlowApiUrl);\nhttpClient.DefaultRequestHeaders.Add(\"X-API-Key'\", EpochFlowApiKey);\nhttpClient.DefaultRequestHeaders.Add(\"X-Account-Id\", EpochFlowAccountId);\n\nvar epochFlowApi = RestService.For\u003cIEpochFlowV1\u003e(httpClient);\nvar result = await epochFlowApi.PostDataPoints(EpochFlowSetId, measurements);\n```\n\n## Using the CLI toolkit\n\n[Download the latest release for Windows, Linux or Osx](https://github.com/Timmoth/epochflow-toolkit/releases)\n\n### Configuration\n\nIf you want to target the local emulator specify the '--emulator true' flag.\n```bash\n./epoch get-account --emulator true\n```\nIf you want to target the real api you must configure the cli toolkit with the api url, your account id and api key, there are two ways to do this:\n\n#### Parameters\n\nEach command takes the following parameters:\n\n```bash\n--url \"https://api.epochflow.io/\"\n--account \"\u003caccount_id\u003e\"\n--key \"\u003capi_key\u003e\"\n```\n\n#### Environment variables\n\nWindows:\n\n```powershell\nsetx epochflow_url \"https://api.epochflow.io/\"\nsetx epochflow_account \"\u003caccount_id\u003e\"\nsetx epochflow_key \"\u003capi_key\u003e\"\n\nOpen a new terminal so the environment variables are updated.\n```\n\nLinux / Osx:\n\n```bash\nexport epochflow_url=\"https://api.epochflow.io/\"\nexport epochflow_account=\"\u003caccount_id\u003e\"\nexport epochflow_key=\"\u003capi_key\u003e\"\n```\n\n### Usage\n\n```bash\n# Accounts\n./epoch get-account\n\n# Sets\n./epoch create-set --name \"\u003cset_name\u003e\" --collision-mode \"\u003coverwrite | combine\u003e\"\n./epoch list-sets\n./epoch get-set --id \"\u003cset_id\u003e\"\n./epoch delete-set --id \"\u003cset_id\u003e\"\n\n# Tags\n./epoch list-tags --id \"\u003cset_id\u003e\"\n./epoch delete-tag --id \"\u003cset_id\u003e\" --tag \"\u003ctag_name\u003e\"\n\n# Data\n./epoch get-data --id \"\u003cset_id\u003e\" --tag \"\u003ctag_name_1,tag_name_2\u003e\"\n\n# Api Keys\n./epoch create-key --name \"\u003ckey_name\u003e\" --expiry \"\u003cdatetime\u003e\" --admin \"\u003cTrue|False\u003e\" --all_set_operations \"\u003cUndefined | Read | Write\u003e\" --permissions \"set_1_id;tag1,tag2;read,write\u0026set_2_id;all;read\"\n./epoch get-key --id \"\u003ckey_id\u003e\"\n./epoch list-keys\n./epoch enable-key --id \"\u003ckey_id\u003e\"\n./epoch disable-key --id \"\u003ckey_id\u003e\"\n./epoch delete-key --id \"\u003ckey_id\u003e\"\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmoth%2Fepochflow-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimmoth%2Fepochflow-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmoth%2Fepochflow-toolkit/lists"}