{"id":24787688,"url":"https://github.com/yuhima03/dotnet-traq","last_synced_at":"2025-10-12T11:31:53.572Z","repository":{"id":272470096,"uuid":"877815712","full_name":"YuHima03/dotnet-traq","owner":"YuHima03","description":"⚠️ Community Driven ⚠️ .NET client library for the traQ API.","archived":false,"fork":false,"pushed_at":"2025-01-27T04:59:22.000Z","size":288,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T05:26:35.221Z","etag":null,"topics":["dotnet","traq"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Traq","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/YuHima03.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-10-24T09:40:37.000Z","updated_at":"2025-01-14T17:05:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f5606a7-5360-4c21-ae67-d1a5516b87fe","html_url":"https://github.com/YuHima03/dotnet-traq","commit_stats":null,"previous_names":["yuhima03/dotnet-traq"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuHima03%2Fdotnet-traq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuHima03%2Fdotnet-traq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuHima03%2Fdotnet-traq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuHima03%2Fdotnet-traq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YuHima03","download_url":"https://codeload.github.com/YuHima03/dotnet-traq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236210701,"owners_count":19112872,"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":["dotnet","traq"],"created_at":"2025-01-29T16:13:21.926Z","updated_at":"2025-10-12T11:31:53.561Z","avatar_url":"https://github.com/YuHima03.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotnet-traq\n\n.NET client library for the traQ API.\n\nThe source code is generated from the [OpenAPI Spec for the traQ API](https://github.com/traPtitech/traQ/blob/master/docs/v3-api.yaml) by [Microsoft Kiota](https://github.com/microsoft/kiota).\n\n## How to Use\n\n### Use in Generic Host\n\nAn extension method for the `IServiceCollection` type can be used.\n\nIn the sample code below, an instance of the `TraqApiClient` class configured by environment variables (`TRAQ_BASE_ADDRESS` and `TRAQ_ACCESS_TOKEN`) is added to the service collection.\n\n```cs\nvar host = Host.CreateDefaultApplication(args)\n    .ConfigureServices((ctx, services) =\u003e\n    {\n        services.AddTraqApiClient(options =\u003e\n        {\n            var conf = ctx.Configuration;\n            options.BaseAddress = conf[\"TRAQ_BASE_ADDRESS\"];\n            options.BearerAuthToken = conf[\"TRAQ_ACCESS_TOKEN\"];\n        });\n    })\n    .Build();\n\nhost.Run();\n```\n\nYou can also separate configurator from the `AddTraqApiClient` method by using parameterless method.\nIn the following code, the added `TraqApiClient` automatically use configured `TraqApiClientOptions`.\n\n```cs\nvar host = Host.CreateDefaultApplication(args)\n    .ConfigureServices((ctx, services) =\u003e\n    {\n        services.Configure\u003cTraqApiClientOptions\u003e(ctx.Configuration);\n        services.AddTraqApiClient();\n    })\n    .Build();\n\nhost.Run();\n```\n\n### Create API Client Manually\n\nThe `CreateFromOptions` method in the `TraqApiClientHelper` class is useful to create a new instance of the `TraqApiClient` class with specified options.\n\n```cs\nTraqApiClientOptions options = new()\n{\n    BaseAddress = \"Base address of the traQ API\",\n    BearerAuthToken = \"Bearer authentication token\"\n}\nvar client = TraqApiClientHelper.CreateFromOptions(options);\n```\n\nThe `TraqApiClient` class implements `Microsoft.Kiota.Abstractions.BaseRequestBuilder` so that you can manually manage methods to access the traQ API.\n\nFor more information, please check [Kiota Official Documentation](https://learn.microsoft.com/en-us/openapi/kiota/overview).\n\n## Source Generation\n\n[Docker](https://www.docker.com) and [Task](https://taskfile.dev) are required for source generation.\n\nTo generate API client for certain version of traQ, set it to the `GITHUB_TAG_NAME` variable and run `task`, `task gen` or `task generate-client`.\n\nThe following command generates API client for traQ v3.25.0.\n\n```shell\nGITHUB_TAG_NAME=v3.25.0 task\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhima03%2Fdotnet-traq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuhima03%2Fdotnet-traq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhima03%2Fdotnet-traq/lists"}