{"id":20243938,"url":"https://github.com/paulo-lopes-estevao/client-code-generators","last_synced_at":"2025-04-10T20:32:30.465Z","repository":{"id":162371294,"uuid":"635920136","full_name":"Paulo-Lopes-Estevao/client-code-generators","owner":"Paulo-Lopes-Estevao","description":"Repository for all code generators provided by clients","archived":false,"fork":false,"pushed_at":"2023-05-21T02:38:09.000Z","size":43,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-24T18:06:11.349Z","etag":null,"topics":["client","clientao","code-generation","dart","http","http-client","insomnia","postman"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/client_code_generators","language":"Dart","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/Paulo-Lopes-Estevao.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2023-05-03T18:36:56.000Z","updated_at":"2025-02-21T16:18:05.000Z","dependencies_parsed_at":"2023-07-04T19:46:16.244Z","dependency_job_id":null,"html_url":"https://github.com/Paulo-Lopes-Estevao/client-code-generators","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fclient-code-generators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fclient-code-generators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fclient-code-generators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fclient-code-generators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paulo-Lopes-Estevao","download_url":"https://codeload.github.com/Paulo-Lopes-Estevao/client-code-generators/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290033,"owners_count":21078923,"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":["client","clientao","code-generation","dart","http","http-client","insomnia","postman"],"created_at":"2024-11-14T09:10:30.830Z","updated_at":"2025-04-10T20:32:30.439Z","avatar_url":"https://github.com/Paulo-Lopes-Estevao.png","language":"Dart","funding_links":["https://ko-fi.com/E1E2L169R","https://www.buymeacoffee.com/pl1745240p"],"categories":[],"sub_categories":[],"readme":"# Client Code Generators\n\nConverts HTTP requests into different languages of your choice, generating HTTP request code for the same language.\n\nIt is a package written in dart based on Postman's [postman-code-generators](https://github.com/postmanlabs/postman-code-generators) package\n\n\n## How to use\n\n`language` - The language of the code snippet to be generated. The list of supported languages can be found\n`variant` - The variant of the code snippet to be generated. The list of supported variants can be found\n`request` - The request object to be converted into code snippet\n`options` - The options object for the snippet generation\n`callback` - The callback function to be called after the snippet is generated\n\n\u003cbr/\u003e\n\nList of supported code generators:\n|language | variant|\n--- | ---\n`Dart` | `http`\n\n\u003cbr/\u003e\n\nList of supported options:\n|option | type | description|\n--- | --- | ---\n`trimRequestBody` | `boolean` | Whether to trim request body fields\n`indentType` | `string` | The type of indentation to be used in the generated code snippet. Can be `Tab` or `Space`\n`indentCount` | `number` | The number of tabs or spaces to be used for indentation\n`requestTimeout` | `number` | The timeout value for the request in millisecond\n`followRedirect` | `boolean` | Whether to follow redirects for the request\n`includeBoilerplate` | `boolean` | Whether to include boilerplate code for the snippet\n\n\u003cbr/\u003e\n\nList of supported body types:\n|type | description| content-type|\n--- | --- | ---\n`raw` | Raw json data | `application/json`\n`urlencoded` | URL encoded form data | `application/x-www-form-urlencoded`\n`formdata` | Multipart form data | `multipart/form-data`\n`file` | File data | `multipart/form-data`\n`graphql` | GraphQL query | `application/graphql`\n`none` | No body | `none`\n\n\u003cbr/\u003e\n\nGetting Started\n\n## Installation\n\nAdd this to your package's pubspec.yaml file:\n\n```yaml\ndependencies:\n  client_code_generators: ^0.3.0\n```\n\nYou can install packages from the command line:\n\n```bash\n$ dart pub get\n```\n\n\n## Usage\nA simple usage example:\n\n```dart\nimport 'package:client_code_generators/client_code_generators.dart';\n\nmain() {\n  final request =\n        Request('GET', 'https://jsonplaceholder.typicode.com/users');\n\n    var options = {\n      'trimRequestBody': true,\n      'indentType': 'Space',\n      'indentCount': 2,\n      'requestTimeout': 0,\n      'followRedirect': true,\n      'includeBoilerplate': true\n    };\n    var language = 'Dart';\n    var variant = 'http';\n    \n    convert(language, variant, request, options, (error, snippet) {\n      print(snippet);\n    });\n}\n\n```\n\n## Testing\n\n```bash\n$ dart test ./..\n```\n\n## Contributing\n\nBefore opening an issue or pull request, please check the project's contribution documents.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details about our code of conduct, and the process for submitting pull requests.\n\n## Support Donate\n\nIf you find this project useful, you can buy author a glass of juice 🧃\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E2L169R)\n\nalso a coffee ☕️\n\n\u003ca href=\"https://www.buymeacoffee.com/pl1745240p\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\nwill be very grateful to you for your support 😊.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulo-lopes-estevao%2Fclient-code-generators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulo-lopes-estevao%2Fclient-code-generators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulo-lopes-estevao%2Fclient-code-generators/lists"}