{"id":16336211,"url":"https://github.com/jerryfzhang/launchlib-js","last_synced_at":"2025-03-22T23:32:19.952Z","repository":{"id":34229332,"uuid":"172323292","full_name":"JerryFZhang/LaunchLib-js","owner":"JerryFZhang","description":"NPM package for wrapping Launch Library (https://launchlibrary.net/docs/1.4.1/api.html)","archived":false,"fork":false,"pushed_at":"2022-12-30T21:41:48.000Z","size":183,"stargazers_count":4,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-16T10:32:17.561Z","etag":null,"topics":["launch","launchlibrary","library","node","npm","npm-package"],"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/JerryFZhang.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":"2019-02-24T10:19:17.000Z","updated_at":"2022-10-31T20:45:52.000Z","dependencies_parsed_at":"2023-01-15T05:26:36.881Z","dependency_job_id":null,"html_url":"https://github.com/JerryFZhang/LaunchLib-js","commit_stats":null,"previous_names":["jerryfzhang/launchjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerryFZhang%2FLaunchLib-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerryFZhang%2FLaunchLib-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerryFZhang%2FLaunchLib-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerryFZhang%2FLaunchLib-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JerryFZhang","download_url":"https://codeload.github.com/JerryFZhang/LaunchLib-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036113,"owners_count":20550662,"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":["launch","launchlibrary","library","node","npm","npm-package"],"created_at":"2024-10-10T23:43:30.432Z","updated_at":"2025-03-22T23:32:19.670Z","avatar_url":"https://github.com/JerryFZhang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LaunchLib-js\n[![NPM version][npm-version-image]][npm-url] \n[![NPM downloads][npm-downloads-image]][downloads-url]\n[![MIT License][license-image]][license-url]\n[![Travis](https://api.travis-ci.org/JerryFZhang/LaunchLib-js.svg)](https://travis-ci.org/JerryFZhang/LaunchLib-js) \n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/beb89b404293452bbc98bc6c65829fdb)](https://www.codacy.com/manual/jerry.fengwei/LaunchLib-js?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=JerryFZhang/LaunchLib-js\u0026amp;utm_campaign=Badge_Grade)\n[![Dependency Status](https://david-dm.org/JerryFZhang/LaunchLib-js.svg)](https://david-dm.org/JerryFZhang/LaunchLib-js) \n[![devDependency Status](https://david-dm.org/JerryFZhang/LaunchLib-js/dev-status.svg)](https://david-dm.org/JerryFZhang/LaunchLib-js#info=devDependencies) \n[![Coverage Status](https://coveralls.io/repos/github/JerryFZhang/LaunchLib-js/badge.svg?branch=master)](https://coveralls.io/github/JerryFZhang/LaunchLib-js?branch=master) \n![License](https://img.shields.io/badge/license-MIT-lightgray.svg)\n\nUnofficial NPM package for wrapping Launch Library (https://launchlibrary.net)\n\n## Usage\n### Install\n`npm install --save launchlib-js`\n\n### Import\n`const Launch = require('launchlib-js')`\n\n`const LaunchLib = new Launch()`\n\n### Examples\nLaunchLib takes two parameters, a function name, and a variable, then returns the result depends on the parameters passed in.\n`LaunchLib.get(functionName, var).then(data =\u003e {...})`\n\n```\nLaunchLib.get('getLaunches', '12')\n    .then(data =\u003e { \n        // do something\n    })\n    .catch(err =\u003e { \n        // handle error\n    }) \n```\n\nThe above call will return next 12 upcoming launches.\n\n## Supported Request Types and Parameters (total of 33)\n\n### Agency\n#### `getAgencyById`\n- To return the agency with an ID of 1 using `getAgencyById`\n```\nLaunchLib.get('getAgencyById', '1').then(data =\u003e {{...})\n```\n\n#### `getAgencyByAbbr`\n- To return the agency with an abbreviation of NASA using `getAgencyByAbbr`\n```\nLaunchLib.get('getAgencyByAbbr', 'NASA').then(data =\u003e {{...})\n```\n#### `getAgenciesByName`\n- To return the agency with a name matching \"National\" using `getAgenciesByName`\n```\nLaunchLib.get('getAgenciesByName', 'National').then(data =\u003e {{...})\n```\n\n### Agency Type\n#### `getAgencyTypeById`\n- To return the agency type with an ID of 1 using `getAgencyTypeById`\n```\nLaunchLib.get('getAgencyTypeById', '1').then(data =\u003e {{...})\n```\n\n#### `getAgencyTypeByName`\n- To return the agency type with a name of government using `getAgencyTypeByName`\n```\nLaunchLib.get('getAgencyTypeByName', 'government').then(data =\u003e {{...})\n```\n\n### Event Type\n#### `getEventTypeById`\n- To return the event type with an ID of 1 using `getEventTypeById`\n```\nLaunchLib.get('getEventTypeById', '1').then(data =\u003e {{...})\n```\n\n#### `getEventTypeByName`\n- To return the event type with a name of info using `getEventTypeByName`\n```\nLaunchLib.get('getEventTypeByName', 'info').then(data =\u003e {{...})\n```\n\n### Launch\n#### `getLaunchById`\n- To return the launch with an ID of 1028 using `getLaunchById`\n```\nLaunchLib.get('getLaunchById', '1028').then(data =\u003e {{...})\n```\n\n#### `getLaunchByName`\n- TO return the launch with a name including Falcon using `getLaunchByName`\n```\nLaunchLib.get('getLaunchByName', 'falcon').then(data =\u003e {{...})\n```\n\n#### `getLaunches`\n- To return the next 5 launches using `getLaunches`\n```\nLaunchLib.get('getLaunches', '5').then(data =\u003e {{...})\n```\n\n#### `getLaunchesAfter`\n- To return launches after August 20th, 2015 using `getLaunchesAfter`\n```\nLaunchLib.get('getLaunchesAfter', '2015-08-20').then(data =\u003e {{...})\n```\n\n#### `getLaunchesBetween`\n- To return launches between August 20th, 2015 and September 20th, 2015 using `getLaunchesBetween`\n```\nLaunchLib.get('getLaunchesBetween', {\n        \"startDate\": \"2015-08-20\",\n        \"endDate\": \"2015-09-20\"\n    }).then(data =\u003e {{...})\n```\n### Launch Event\n#### `getLaunchEventById`\n- To return the launch event with an ID of 7 using `getLaunchEventById`\n```\nLaunchLib.get('getLaunchEventById', '1').then(data =\u003e {{...})\n```\n\n### Launch Status\n#### `getLaunchStatusById`\n- To return the launch status with an ID of 1 using `getLaunchStatusById`\n```\nLaunchLib.get('getLaunchStatusById', '1').then(data =\u003e {{...})\n```\n#### `getLaunchStatusByName`\n- To return the launch status with a name of GO using `getLaunchStatusByName`\n```\nLaunchLib.get('getLaunchStatusByName', 'GO').then(data =\u003e {{...})\n```\n\n### Location\n#### `getLocationById`\n- To return the location with an ID of 1 using `getLocationById`\n```\nLaunchLib.get('getLocationById', '1').then(data =\u003e {{...})\n```\n#### `getLocationByName`\n- To return the location with a name of Woomera using `getLocationByName`\n```\nLaunchLib.get('getLocationByName', 'woomera').then(data =\u003e {{...})\n```\n#### `getLocationByCountryCode`\n- To return the location withing the United States using `getLocationByCountryCode`\n```\nLaunchLib.get('getLocationByCountryCode', 'USA').then(data =\u003e {{...})\n```\n\n### Mission\n#### `getMissionById`\n- To return the mission with an ID of 601 using `getMissionById`\n```\nLaunchLib.get('getMissionById', '601').then(data =\u003e {{...})\n```\n#### `getMissionByName`\n- To return the mission with a name of GPS using s `getMissionByName`\n```\nLaunchLib.get('getMissionByName', 'GPS').then(data =\u003e {{...})\n```\n\n### Mission Event\n#### `getMissionEventById`\n- To return the mission event with an ID of 1 using `getMissionEventById`\n```\nLaunchLib.get('getMissionEventById', '1').then(data =\u003e {{...})\n```\n#### `getMissionEventByParentId`\n- To return the mission event with a mission id of 1 using `getMissionEventByParentId`\n```\nLaunchLib.get('getMissionEventByParentId', '1').then(data =\u003e {{...})\n```\n\n### Mission Type\n#### `getMissionTypeById`\n- To return the mission type with an ID of 1 using `getMissionTypeById`\n```\nLaunchLib.get('getMissionTypeById', '1').then(data =\u003e {{...})\n```\n#### `getMissionTypeByName`\n- To should return the mission type with a name of Earth Science using `getMissionTypeByName`\n```\nLaunchLib.get('getMissionTypeByName', 'Earth Science').then(data =\u003e {{...})\n```\n\n### Pad\n#### `getPadById`\n- To return the pad with an ID of 1 using `getPadById`\n```\nLaunchLib.get('getPadById', '1').then(data =\u003e {{...})\n```\n#### `getPadTypeByName`\n- To should return pads with a name containing launch complex using `getPadTypeByName`\n```\nLaunchLib.get('getPadTypeByName', 'launch complex').then(data =\u003e {{...})\n```\n#### `getPadTypeByLocationId`\n- To should return pads with a location ID of 1 using `getPadTypeByLocationId`\n```\nLaunchLib.get('getPadTypeByLocationId', '1').then(data =\u003e {{...})\n```\n\n### Rocket Event\n#### `getRocketById`\n- To return the rocket with an ID of 1 using `getRocketById`\n```\nLaunchLib.get('getRocketById', '1').then(data =\u003e {{...})\n```\n#### `getRocketTypeByName`\n- To return the rocket with a name containing Falcon using `getRocketTypeByName`\n```\nLaunchLib.get('getRocketTypeByName', 'falcon').then(data =\u003e {{...})\n```\n#### `getRocketTypeByConfigName`\n- To return the rockets with configuration containing v1.1 using `getRocketTypeByConfigName`\n```\nLaunchLib.get('getRocketTypeByConfigName', 'v1.1').then(data =\u003e {{...})\n```\n#### `getRocketEventById`\n- To return the rocket event with an ID of 10 using `getRocketEventById`\n```\nLaunchLib.get('getRocketEventById', '10').then(data =\u003e {{...})\n```\n#### `getRocketEventByLaunchId`\n- To return the launch event with a launch id of 1 using `getRocketEventByLaunchId`\n```\nLaunchLib.get('getRocketEventByLaunchId', '1').then(data =\u003e {{...})\n```\n\n### Rocket Family\n#### `getRocketFamilyById`\n- To return the rocket family with an ID of 1 using `getRocketFamilyById`\n```\nLaunchLib.get('getRocketFamilyById', '1').then(data =\u003e {{...})\n```\n\n### Example App\n[Click here](https://github.com/JerryFZhang/rockets) to see a React + Node.js exmaple of `launchlib-js`\n\n## License\n\n\nLaunchLib-js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE).\n\n\n\n[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat\n[license-url]: LICENSE\n\n[npm-url]: https://npmjs.org/package/launchlib-js\n[npm-version-image]: http://img.shields.io/npm/v/launchlib-js.svg?style=flat\n[npm-downloads-image]: http://img.shields.io/npm/dm/launchlib-js.svg?style=flat\n[downloads-url]: https://npmcharts.com/compare/launchlib-js?minimal=true\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryfzhang%2Flaunchlib-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerryfzhang%2Flaunchlib-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryfzhang%2Flaunchlib-js/lists"}