{"id":17911228,"url":"https://github.com/toddtreece/swagger-client-promises","last_synced_at":"2025-04-03T09:28:21.450Z","repository":{"id":57152410,"uuid":"42658847","full_name":"toddtreece/swagger-client-promises","owner":"toddtreece","description":"An ES6 promise wrapper for swagger-client","archived":false,"fork":false,"pushed_at":"2015-09-18T20:09:07.000Z","size":152,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T17:05:59.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/toddtreece.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}},"created_at":"2015-09-17T13:48:45.000Z","updated_at":"2017-11-30T02:36:24.000Z","dependencies_parsed_at":"2022-08-27T18:33:11.544Z","dependency_job_id":null,"html_url":"https://github.com/toddtreece/swagger-client-promises","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddtreece%2Fswagger-client-promises","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddtreece%2Fswagger-client-promises/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddtreece%2Fswagger-client-promises/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toddtreece%2Fswagger-client-promises/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toddtreece","download_url":"https://codeload.github.com/toddtreece/swagger-client-promises/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246975427,"owners_count":20862904,"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-10-28T19:37:24.658Z","updated_at":"2025-04-03T09:28:21.423Z","avatar_url":"https://github.com/toddtreece.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swagger-client promisify [![Build Status](https://travis-ci.org/toddtreece/swagger-client-promises.svg?branch=master)](https://travis-ci.org/toddtreece/swagger-client-promises)\n\nAn ES6 promise wrapper for [swagger-client](https://www.npmjs.com/package/swagger-client).\n\n## Requirements\n\nThis module is a [npm](https://www.npmjs.org) package, and requires\nthe latest stable version of [node.js](https://nodejs.org).\n\n```\n$ node -v\nv4.0.0\n```\n\n## Installation\n```\n$ npm install swagger-client-promises\n```\n\n## Usage\nThis wrapper turns every API operation into an ES6 promise, and leaves the rest\nof the `swagger-client` interface intact.\n\nHere's a modified version of the example from the [swagger-client README](https://github.com/swagger-api/swagger-js#calling-an-api-with-swagger--nodejs).\n```\nconst client = require('swagger-client-promises');\n\nconst swagger = new client({\n  url: 'http://petstore.swagger.io/v2/swagger.json',\n  success: () =\u003e {\n    swagger.pet.getPetById({petId: 7}, {responseContentType: 'application/json'})\n    .then(pet =\u003e {\n      console.log('pet', pet);\n    })\n    .catch(err =\u003e {\n      console.log(err);\n    });\n  }\n});\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing\ncoding style. Add unit tests for any new or changed functionality.\nLint and test your code using [Gulp](http://gulpjs.com/).\n\n## License\n\nCopyright (c) 2015 Todd Treece. Licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoddtreece%2Fswagger-client-promises","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoddtreece%2Fswagger-client-promises","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoddtreece%2Fswagger-client-promises/lists"}