{"id":21406685,"url":"https://github.com/ringcentral/ringcentral-api-code-sample-generator","last_synced_at":"2026-02-07T07:03:41.883Z","repository":{"id":146854217,"uuid":"204057293","full_name":"ringcentral/ringcentral-api-code-sample-generator","owner":"ringcentral","description":"Generates code samples for all of RingCentral's API operations","archived":false,"fork":false,"pushed_at":"2024-05-01T11:36:47.000Z","size":471,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-30T23:51:04.038Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ringcentral.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":"2019-08-23T19:20:03.000Z","updated_at":"2025-07-22T15:35:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"12387d0c-7640-4dc4-aabe-dec53b062006","html_url":"https://github.com/ringcentral/ringcentral-api-code-sample-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ringcentral/ringcentral-api-code-sample-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-api-code-sample-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-api-code-sample-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-api-code-sample-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-api-code-sample-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringcentral","download_url":"https://codeload.github.com/ringcentral/ringcentral-api-code-sample-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-api-code-sample-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29188314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T05:07:31.176Z","status":"ssl_error","status_checked_at":"2026-02-07T05:06:15.227Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-22T16:41:50.031Z","updated_at":"2026-02-07T07:03:41.865Z","avatar_url":"https://github.com/ringcentral.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RingCentral API Samples\n\nThis repository contains scripts for generating sample code to access each of RingCentral's API operations in various programming languages.\nA complete list of (and greater detail about) these endpoints can be found on [RingCentral's API Reference](https://developers.ringcentral.com/api-reference/).\nIt additionally provides scripts to generate markdown documentation correspondent to each operation and a \"master lookup table\" containing all code samples.\n\n## Setup\n\nRequires [Node.js](https://nodejs.org/en/) (recommended v12.6.0 or higher).\n\nAfter cloning the repository, navigate to root directory and install the required dependencies using `npm install`.\n\n## Usage\n\nThe package contains a number of scripts that each provide (in)dependent functionality\n\n-   `npm run all`\n    Runs all of the below scripts, in order of their necessity. Run this if you are not interested in isolating any specific operation.\n\n-   `npm run sync`\n    Downloads the .yml specs with a remote copy on RC's GitLab. Remote resources are specified as the environment variables **SWAGGER_SPEC_REMOTE** and **X_TAG_GROUPS_REMOTE**. *NOTE: this step is absolutely necessary before you can run any of the subsequent generation scripts. On timeout or error, ensure you have access to [GitLab](https://git.ringcentral.com/) from your browser, your VPN may need to be enabled.*\n\n-   `npm run defs`\n    Generates the object definitions that are consumed and returned by the API. *NOTE: this step is necessary before you can run any of the subsequent generation scripts.*\n\n-   `npm run code`\n    Generates the sample code as per the templates in [./tmpl/](./tmpl/) and writes it to the directory specified by the **CODE_SAMPLES_OUTPUT** environment variable (default: [./out/code/](./out/code))\n\n-   `npm run json`\n    Generates the \"master lookup table\" containing code samples for all operations (and in all languages) based on the previously generated code samples. It outputs to the directory specified by the **OUTPUT** environment variable (default: [./out/samples.json](./out/samples.json))\n\n-   `npm run mkdn`\n    Generates the \"master markdown\" documents for each language based on the templates in [./tmpl/markdown/](./tmpl/markdown/). These output to the directory specified by the **MARKDOWN_OUTPUT** environment variable (default: [./out/mkdn/](./out/mkdn/)). These markdown files contain language-specific information and would be useful if bundled inside each language's SDK.\n\nMore specific and development only scripts can be found in [./package.json](./package.json)\n\n## Overrides\n\nSometimes it is necessary to alter the automatically generated code for a specific operation: whether to correct artifacts of an erroneous swagger spec, correct template errors in edge-cases, or any number of other reasons.\n\nTo allow for this behavior, this framework allows users to manually override any operation's generated sample code. These overrides can be found in the [./overrides/](./overrides/) directory and follow the same file-hierarchy as the code found in [./out/code/](./out/code/).\n\nDuring the process of code generation, the script will check for the existence of an override; in the case it is found, the script will simply use the contents of that file in the place of the automatically generated one. Any and all changes to these override files will be copied verbatim to the final output.\n\n## Editing Templates and Adding Additional Languages\n\n-   All templates use [EJS](https://ejs.co/)\n\n-   To edit the format for an existing language you may edit the code templates in [./tmpl/code/](./tmpl/code/). These changes will be reflected upon the next execution of sample code generation.\n\n-   If you are adding a new language, simply create a new template in [./tmpl/code/](./tmpl/code/) as well as an object template in [./tmpl/objects/](./tmpl/objects/). The code directory contains boilerplates for language-specific SDK calls, and the objects templates define that language's object structure (Ex: Javascript =\u003e `{ a: b }`, PHP =\u003e `array( a =\u003e b ))`. If you want to generate a markdown document to accompany this addition, you must additionally create a template for that language in [./tmpl/markdown/](./tmpl/markdown/). The name of the templates will be used as the file suffix for the code samples generated for each language (Ex: Javascript =\u003e '.js', PHP =\u003e '.php', Python =\u003e '.py', CSharp =\u003e '.cs', Ruby =\u003e '.rb'). Keep this consistent; likewise with the markdown.\n\n## Credits\n\n-   [Drew Ligman](https://github.com/drewligman) - original author\n-   [Tyler Long](https://github.com/tylerlong) - wrote the [original version](https://github.com/tylerlong/sample-code-generator) of this package\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fringcentral-api-code-sample-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringcentral%2Fringcentral-api-code-sample-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fringcentral-api-code-sample-generator/lists"}