{"id":48540167,"url":"https://github.com/panoramicdata/solidtime.api","last_synced_at":"2026-04-08T04:01:51.254Z","repository":{"id":327441377,"uuid":"1109211579","full_name":"panoramicdata/Solidtime.Api","owner":"panoramicdata","description":"Solidtime API client library for .NET","archived":false,"fork":false,"pushed_at":"2026-03-29T01:40:54.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T04:30:27.320Z","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/panoramicdata.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-03T13:47:06.000Z","updated_at":"2026-03-29T01:40:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/panoramicdata/Solidtime.Api","commit_stats":null,"previous_names":["panoramicdata/solidtime.api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/panoramicdata/Solidtime.Api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSolidtime.Api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSolidtime.Api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSolidtime.Api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSolidtime.Api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panoramicdata","download_url":"https://codeload.github.com/panoramicdata/Solidtime.Api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSolidtime.Api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31539229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-04-08T04:01:50.307Z","updated_at":"2026-04-08T04:01:51.238Z","avatar_url":"https://github.com/panoramicdata.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solidtime.Api NuGet Package\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3201cac7238d4aeaa062e1fc6092c715)](https://app.codacy.com/gh/panoramicdata/Solidtime.Api/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Nuget](https://img.shields.io/nuget/v/Solidtime.Api)](https://www.nuget.org/packages/Solidtime.Api/)\n[![Nuget](https://img.shields.io/nuget/dt/Solidtime.Api)](https://www.nuget.org/packages/Solidtime.Api/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Description\n\nA .NET 10.0 client library for the [Solidtime API](https://docs.solidtime.io/api-reference).\n\nSolidtime is a modern, open-source time tracking solution with comprehensive project management, time tracking, reporting, and team collaboration features.\n\nThis library provides strongly-typed access to the Solidtime API v1 with full support for:\n- **API Tokens** - Personal access token management\n- **Users** - User profile and current user information\n- **Organizations** - Organization management and settings\n- **Clients** - Client management with pagination\n- **Projects** - Project management with archiving support\n- **Project Members** - Project member and billing rate management\n- **Tags** - Tag management with pagination\n- **Tasks** - Task management\n- **Time Entries** - Full time tracking with start/stop timer support\n- **Members** - Organization member management\n- **Reports** - Report generation and management\n- **Charts** - Data visualization endpoints\n- **Imports** - Data import from other time tracking tools\n\n## Installation\n\n```bash\ndotnet add package Solidtime.Api\n```\n\nOr via Package Manager:\n```powershell\nInstall-Package Solidtime.Api\n```\n\n## Quick Start\n\n```csharp\nusing Solidtime.Api;\n\n// Create a client with your API token\nvar client = new SolidtimeClient(new SolidtimeClientOptions\n{\n    ApiToken = \"your-api-token-here\"\n});\n\n// Get current user information\nvar me = await client.Me.GetAsync(CancellationToken.None);\nConsole.WriteLine($\"Hello, {me.Data.Name}!\");\n\n// Get an organization (you need to know your organization ID)\nvar organizationId = \"your-organization-uuid\";\nvar organization = await client.Organizations.GetAsync(organizationId, CancellationToken.None);\nConsole.WriteLine($\"Organization: {organization.Data.Name}\");\n\n// Get projects for an organization\nvar projects = await client.Projects.GetAsync(organizationId, null, null, CancellationToken.None);\nforeach (var project in projects.Data)\n{\n    Console.WriteLine($\"Project: {project.Name}\");\n}\n```\n\n## Authentication\n\nSolidtime API uses Bearer token authentication (Personal Access Tokens). You can create an API token in your Solidtime account settings.\n\n```csharp\nvar options = new SolidtimeClientOptions\n{\n    ApiToken = \"your-api-token\",\n    TimeoutSeconds = 30 // Optional, default is 30\n};\n\nvar client = new SolidtimeClient(options);\n```\n\n## API Coverage\n\nThis library provides access to all Solidtime API v1 endpoints:\n\n- **API Tokens** - Manage personal access tokens\n- **Users** - User management and current user information\n- **Organizations** - Organization management and settings\n- **Clients** - Client management\n- **Projects** - Project management and archiving\n- **Project Members** - Project member management\n- **Tags** - Tag management\n- **Tasks** - Task management\n- **Time Entries** - Time entry management and tracking\n- **Members** - Organization member management\n- **Reports** - Report generation and management\n- **Charts** - Data visualization\n- **Imports** - Import data from other time tracking tools\n\n## Usage Examples\n\n### Managing Projects\n\n```csharp\n// Create a project\nvar newProject = await client.Projects.CreateAsync(\n    organizationId,\n    new ProjectStoreRequest\n    {\n        Name = \"My New Project\",\n        Color = \"#3498db\",\n        IsBillable = true,\n        ClientId = clientId // optional\n    },\n    CancellationToken.None);\n\n// Update a project\nvar updatedProject = await client.Projects.UpdateAsync(\n    organizationId,\n    projectId,\n    new ProjectUpdateRequest\n    {\n        Name = \"Updated Project Name\",\n        IsArchived = false\n    },\n    CancellationToken.None);\n\n// Get all projects\nvar projects = await client.Projects.GetAsync(\n    organizationId,\n    page: 1,\n    archived: null,\n    CancellationToken.None);\n```\n\n### Time Tracking\n\n```csharp\n// Start a time entry\nvar timeEntry = await client.TimeEntries.CreateAsync(\n    organizationId,\n    new TimeEntryStoreRequest\n    {\n        ProjectId = projectId,\n        TaskId = taskId, // optional\n        Description = \"Working on feature X\",\n        Start = DateTimeOffset.UtcNow,\n        Tags = new[] { tagId } // optional\n    },\n    CancellationToken.None);\n\n// Stop a time entry\nvar stoppedEntry = await client.TimeEntries.UpdateAsync(\n    organizationId,\n    timeEntry.Data.Id,\n    new TimeEntryUpdateRequest\n    {\n        End = DateTimeOffset.UtcNow\n    },\n    CancellationToken.None);\n```\n\n### Managing Clients\n\n```csharp\n// Create a client\nvar newClient = await client.Clients.CreateAsync(\n    organizationId,\n    new ClientStoreRequest\n    {\n        Name = \"Acme Corporation\"\n    },\n    CancellationToken.None);\n\n// List all clients\nvar clients = await client.Clients.GetAsync(\n    organizationId,\n    page: null,\n    archived: null,\n    CancellationToken.None);\n```\n\n## Error Handling\n\nThe library throws `SolidtimeApiException` for API errors:\n\n```csharp\ntry\n{\n    var project = await client.Projects.GetByIdAsync(orgId, projectId, CancellationToken.None);\n}\ncatch (SolidtimeApiException ex)\n{\n    Console.WriteLine($\"API Error: {ex.Message}\");\n    Console.WriteLine($\"Status Code: {ex.StatusCode}\");\n}\n```\n\n## Configuration\n\n### Base URL\n\nBy default, the client uses `https://app.solidtime.io/api`. You can override this:\n\n```csharp\nvar options = new SolidtimeClientOptions\n{\n    ApiToken = \"your-token\",\n    BaseUrl = \"https://your-instance.solidtime.io/api\"\n};\n```\n\n### Logging\n\nThe client supports Microsoft.Extensions.Logging:\n\n```csharp\nvar logger = loggerFactory.CreateLogger\u003cSolidtimeClient\u003e();\nvar options = new SolidtimeClientOptions\n{\n    ApiToken = \"your-token\",\n    Logger = logger\n};\n```\n\n## Contributing\n\nThis project is developed using:\n- **Refit** for declarative HTTP client interfaces\n- **System.Text.Json** for JSON serialization\n- **XUnit 3** and **AwesomeAssertions** for testing\n\nContributions are welcome! Please:\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for your changes\n4. Ensure all tests pass\n5. Submit a pull request\n\nRefer to the Solidtime API documentation for endpoint details: https://docs.solidtime.io/api-reference\n\n### Running Tests\n\nThe test project requires configuration via user secrets. Set up your test environment:\n\n**Step 1: Find Your Organization ID**\n\nWe've included a helper script to guide you:\n\n```powershell\n# Run the helper script (it will prompt for your API token)\n.\\GetOrganizationId.ps1\n\n# Or provide the token directly\n.\\GetOrganizationId.ps1 -ApiToken \"your-api-token\"\n```\n\n**Alternatively, find it manually:**\n1. Log into Solidtime at https://app.solidtime.io\n2. Look at the URL in your browser\n3. The URL will be: `https://app.solidtime.io/teams/{YOUR-ORGANIZATION-ID}/...`\n4. Copy the UUID from the URL (the part after `/teams/`)\n5. Note: The Solidtime UI uses \"teams\" in the URL path, but the API uses \"organizations\"\n\n**Step 2: Configure User Secrets**\n\n```bash\ncd Solidtime.Api.Test\n\n# Set your API token (required)\ndotnet user-secrets set \"Configuration:ApiToken\" \"your-api-token\"\n\n# Set your organization ID (required for most tests)\ndotnet user-secrets set \"Configuration:SampleOrganizationId\" \"your-organization-uuid\"\n\n# Optional: Set sample IDs to speed up tests\ndotnet user-secrets set \"Configuration:SampleProjectId\" \"project-uuid\"\ndotnet user-secrets set \"Configuration:SampleClientId\" \"client-uuid\"\n```\n\n**Step 3: Run Tests**\n\n```bash\ndotnet test\n```\n\n### Publishing to NuGet (Maintainers Only)\n\nThis repository includes a PowerShell script for publishing packages to NuGet.org:\n\n1. Create a file named `nuget-key.txt` in the solution root containing your NuGet API key\n   - Get your API key from: https://www.nuget.org/account/apikeys\n   - This file is .gitignored and will not be committed\n2. Run the publish script:\n   ```powershell\n   # Run all tests and publish\n   .\\Publish.ps1\n   \n   # Skip tests and publish (not recommended)\n   .\\Publish.ps1 -SkipTests\n   \n   # Publish a Debug build (not recommended for production)\n   .\\Publish.ps1 -Configuration Debug\n   ```\n\nThe script will:\n- ? Clean and restore the project\n- ? Build in Release configuration\n- ? Run all unit tests (unless -SkipTests is specified)\n- ? Pack the NuGet package with symbols\n- ? Publish to NuGet.org automatically\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Built by [Panoramic Data Limited](https://github.com/panoramicdata)\n- Solidtime API documentation: https://docs.solidtime.io/api-reference\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoramicdata%2Fsolidtime.api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanoramicdata%2Fsolidtime.api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoramicdata%2Fsolidtime.api/lists"}