{"id":28028401,"url":"https://github.com/permitio/permit-cpp","last_synced_at":"2025-05-11T07:13:30.795Z","repository":{"id":103960401,"uuid":"595623234","full_name":"permitio/permit-cpp","owner":"permitio","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-09T11:16:51.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-11T07:13:27.002Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/permitio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-01-31T13:25:46.000Z","updated_at":"2025-01-09T11:16:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"dcd55de0-6a72-43be-847f-c380397dca38","html_url":"https://github.com/permitio/permit-cpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permitio","download_url":"https://codeload.github.com/permitio/permit-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528978,"owners_count":21922637,"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":"2025-05-11T07:13:30.316Z","updated_at":"2025-05-11T07:13:30.788Z","avatar_url":"https://github.com/permitio.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Permit C++ SDK\n\n# \n\nPermit.io API\n\n- API version: 2.0.0\n\n\nAuthorization as a service\n\n\n\n*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*\n\n\n## Requirements\n\nBuilding the API client library requires:\n\n1. CMake 3.2+\n2. Qt\n3. C++ Compiler\n\n## Getting Started\n\nexample.h:\n```c++\n\n#include \u003ciostream\u003e\n#include \"../client/OAIAPIKeysApi.h\"\n\nusing namespace test_namespace;\n\nclass Example : public QObject {\n    Q_OBJECT\n    OAIAPIKeyCreate create();\npublic slots:\n   void exampleFunction1();\n};\n\n```\n\nexample.cpp:\n```c++\n\n#include \"../client/OAIAPIKeysApi.h\"\n#include \"example.h\"\n#include \u003cQTimer\u003e\n#include \u003cQEventLoop\u003e\n\nOAIAPIKeyCreate Example::create(){\n    OAIAPIKeyCreate obj;\n return obj;\n}\n\nvoid Example::exampleFunction1(){\n     OAIAPIKeysApi apiInstance;\n     \n      // Configure HTTP bearer authorization: HTTPBearer\n      apiInstance.setBearerToken(\"BEARER TOKEN\");\n\n      QEventLoop loop;\n      connect(\u0026apiInstance, \u0026OAIAPIKeysApi::createApiKeySignal, [\u0026]() {\n          loop.quit();\n      });\n      connect(\u0026apiInstance, \u0026OAIAPIKeysApi::createApiKeySignalE, [\u0026](QNetworkReply::NetworkError, QString error_str) {\n          qDebug() \u003c\u003c \"Error happened while issuing request : \" \u003c\u003c error_str;\n          loop.quit();\n      });\n\n      OAIAPIKeyCreate oaiapi_key_create = create(); // OAIAPIKeyCreate | \n      apiInstance.createApiKey(oaiapi_key_create);\n      QTimer::singleShot(5000, \u0026loop, \u0026QEventLoop::quit);\n      loop.exec();\n  }\n\n```\n\n## Documentation for Servers\n\nParameterized Servers are supported. Define a server in the API for each endpoint with arbitrary numbers of variables:\n\n```yaml\nservers:\n- url: http://{server}:{port}/{basePath}\n  description: Description of the Server\n  variables:\n    server:\n        enum:\n          - 'petstore'\n          - 'qa-petstore'\n          - 'dev-petstore'\n        default: 'petstore'\n    port:\n      enum:\n        - '3000'\n        - '1000'\n      default: '3000'\n    basePath:\n      default: v1\n```\nTo change the default variable, use this function in each Api:\n```c++\nint setDefaultServerValue(int serverIndex,const QString \u0026operation, const QString \u0026variable,const QString \u0026val);\n```\nThe parameter \"serverIndex\" will choose a server from the server list for each endpoint. There is always at least one server with index 0. The Parameter \"operation\" should be the desired endpoint operationid.\nVariable is the name of the variable you wish to change and the value is the new default Value.\nThe function will return -1 when the variable does not exists, -2 if value is not defined in the variable enum and -3 if the operation is not found.\n\nIf your endpoint has multiple server objects in the servers array, you can set the server that will be used with this function:\n```c++\nvoid setServerIndex(const QString \u0026operation, int serverIndex);\n```\nParameter \"operation\" should be your operationid. \"serverIndex\" is the index you want to set as your default server. The function will check if there is a server with your index.\nHere is an example of multiple servers in the servers array. The first server will have index 0 and the second will have index 1.\n```yaml\nservers:\n- url: http://{server}:8080/\n  description: Description of the Server\n  variables:\n    server:\n        enum:\n          - 'petstore'\n          - 'qa-petstore'\n          - 'dev-petstore'\n        default: 'petstore'\n- url: https://localhost:8080/v1\n```\n\n## Documentation for Authorization\n\nAuthentication schemes defined for the API:\n### HTTPBearer\n\n- **Type**: HTTP Bearer Token authentication\n\n\n## Author\n\n\n\n\n## License\n\n for more information visit []()","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Fpermit-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermitio%2Fpermit-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Fpermit-cpp/lists"}