{"id":22202739,"url":"https://github.com/namchee/optimus","last_synced_at":"2025-03-25T01:47:07.798Z","repository":{"id":42296471,"uuid":"238676836","full_name":"Namchee/optimus","owner":"Namchee","description":"Topcoder's mobile movies API challenge","archived":false,"fork":false,"pushed_at":"2023-01-24T01:19:43.000Z","size":445,"stargazers_count":1,"open_issues_count":17,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T03:28:02.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Namchee.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}},"created_at":"2020-02-06T11:48:44.000Z","updated_at":"2023-03-04T04:08:13.000Z","dependencies_parsed_at":"2023-01-31T14:45:18.967Z","dependency_job_id":null,"html_url":"https://github.com/Namchee/optimus","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/Namchee%2Foptimus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Foptimus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Foptimus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namchee%2Foptimus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Namchee","download_url":"https://codeload.github.com/Namchee/optimus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245383119,"owners_count":20606265,"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-12-02T16:37:21.566Z","updated_at":"2025-03-25T01:47:07.773Z","avatar_url":"https://github.com/Namchee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mobile Movies API Wrapper\n\nWrapper library for Mobile Movies API\n\n## How to use this Wrapper\n\n1. Download the source code of the wrapper and install the wrapper to your own project:\n\n```bash\n    npm install path/to/mobile-movies-api-wrapper\n```\n\n2. Create an instance of this wrapper as below\n\n```javascript\nconst wrapper = require('mobile-movies-api-wrapper')\nconst config = {\n  MOBILE_MOVIES_API_URL,\n  authToken,\n  exhibitorCode\n}\nconst client = wrapper(config)\n```\n\n- authToken - the authorization token.\n- exhibitorCode - the exhibitor code (includes Prospector, RTSDemo, CinemaWest, BandBTheaters).\n- MOBILE_MOVIES_API_URL - Mobile Movies API URL. E.g. `https://wmp-mobileapi-dev.azurewebsites.net`\n\n3. Every function in this wrapper will return a promise, Handling promises is at the caller end. Call the functions with appropriate arguments\n\nE.g.\n\n```node\nconst theaterId = '7871'\nconst authToken = 'vSD45gbEgd5ggevbxjhg4655bvE='\nconst exhibitorCode = 'Prospector'\nconst reqQuery = {\n  firstDate: '2018-07-16',\n  lastDate: '2019-12-20'\n}\n\n// promise\nclient\n  .getSingleTheater(theaterId, reqQuery, authToken, exhibitorCode)\n  .then((result) =\u003e console.log(result.body, result.status))\n  .catch((err) =\u003e console.log(err))\n\n// async/await\nconst result = await client.getSingleTheater(theaterId, reqQuery, authToken, exhibitorCode)\n```\n\nRefer `index.js` for the list of available wrapper functions\n\n## Documentation for wrapper methods\n\nAll URIs are relative to **MOBILE_MOVIES_API_URL** configuration variable.\n\n### Theater Detail wrapper methods\n\n| Method                                                            | HTTP request                            | Description                              |\n| ----------------------------------------------------------------- | --------------------------------------- | ---------------------------------------- |\n| [**getTheaters**](docs/TheaterDetailApi.md#gettheaters)           | **GET** /api/theaters                   | Get a list of Theaters for an Exhibitor. |\n| [**getSingleTheater**](docs/TheaterDetailApi.md#getsingletheater) | **GET** /api/theaters/single/:theaterId | Get a theater detail by theaterId.       |\n\n### Movie Detail wrapper methods\n\n| Method                                                      | HTTP request                        | Description                                        |\n| ----------------------------------------------------------- | ----------------------------------- | -------------------------------------------------- |\n| [**getSingleMovie**](docs/MovieDetailApi.md#getsinglemovie) | **GET** /api/movies/single/:movieId | Get a movie detail by movieId.                     |\n| [**getNowPlaying**](docs/MovieDetailApi.md#getnowplaying)   | **GET** /api/movies/nowplaying      | Get a list of Now Playing movies for an Exhibitor. |\n| [**getComingSoon**](docs/MovieDetailApi.md#getcomingsoon)   | **GET** /api/movies/comingsoon      | Get a list of Coming Soon movies for an Exhibitor. |\n\n### Emergency Messages wrapper methods\n\n| Method                                                                        | HTTP request           | Description                   |\n| ----------------------------------------------------------------------------- | ---------------------- | ----------------------------- |\n| [**getEmergencyMessages**](docs/EmergencyMessagesApi.md#getemergencymessages) | **GET** /api/emergency | Get EmergencyMessage objects. |\n\n### Orders wrapper methods\n\n| Method                                                   | HTTP request                         | Description                                      |\n| -------------------------------------------------------- | ------------------------------------ | ------------------------------------------------ |\n| [**getOrderSummary**](docs/OrdersApi.md#getordersummary) | **GET** /api/orders/summary/:orderId | Get a summary of a (completed) order by orderId. |\n\n### Compatibility wrapper methods\n\n| Method                                                            | HTTP request               | Description                    |\n| ----------------------------------------------------------------- | -------------------------- | ------------------------------ |\n| [**getCompatibility**](docs/CompatibilityApi.md#getcompatibility) | **GET** /api/compatibility | Get compatibility information. |\n\n\n## Lint\n\n- Run lint: `npm run lint`\n- Run lint fix: `npm run lint:fix`\n\n## Running tests\n\n### Preparation\n\nRun `npm install` to install dependencies.\n\nTo run tests alone\n\n```bash\nnpm run test\n```\n\nTo run unit tests with coverage report\n\n```bash\nnpm run test:cov\n```\n\n## Verification\n\nSee [Verification.md](./Verification.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamchee%2Foptimus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamchee%2Foptimus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamchee%2Foptimus/lists"}