{"id":16129156,"url":"https://github.com/laughedelic/scalajs-octokit","last_synced_at":"2025-04-06T13:29:26.673Z","repository":{"id":141990921,"uuid":"132675630","full_name":"laughedelic/scalajs-octokit","owner":"laughedelic","description":":octocat:  Scala.js facades for octokit/rest.js (GitHub REST API v3)","archived":false,"fork":false,"pushed_at":"2018-05-27T21:28:09.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T19:39:38.297Z","etag":null,"topics":["api-client","github-api","github-rest-v3","octokit","octokit-js","rest","rest-api","scala","scala-js","scalajs","scalajs-facade"],"latest_commit_sha":null,"homepage":"https://github.com/octokit/rest.js","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laughedelic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-08T23:21:47.000Z","updated_at":"2019-12-30T01:20:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4331515-1519-41ac-866e-2a5b3cf1d96e","html_url":"https://github.com/laughedelic/scalajs-octokit","commit_stats":{"total_commits":37,"total_committers":1,"mean_commits":37.0,"dds":0.0,"last_synced_commit":"aa984a0d1f2becb2bda0e3fddfa7798c34d6b3bb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fscalajs-octokit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fscalajs-octokit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fscalajs-octokit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fscalajs-octokit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laughedelic","download_url":"https://codeload.github.com/laughedelic/scalajs-octokit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247487914,"owners_count":20946847,"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":["api-client","github-api","github-rest-v3","octokit","octokit-js","rest","rest-api","scala","scala-js","scalajs","scalajs-facade"],"created_at":"2024-10-09T22:09:13.399Z","updated_at":"2025-04-06T13:29:26.652Z","avatar_url":"https://github.com/laughedelic.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Scala.js] facades for [octokit/rest.js]\n\n[\u003cimg align=\"right\" src=\"https://img.shields.io/badge/octokit/rest.js-15.8.0-blue.svg\"\u003e](https://www.npmjs.com/package/@octokit/rest/v/15.8.0)\n[\u003cimg align=\"right\" src=\"https://www.scala-js.org/assets/badges/scalajs-0.6.17.svg\"\u003e](https://www.scala-js.org)\n[![](https://travis-ci.com/laughedelic/scalajs-octokit.svg?branch=master)](https://travis-ci.com/laughedelic/scalajs-octokit)\n[![](http://img.shields.io/github/release/laughedelic/scalajs-octokit/all.svg)](https://github.com/laughedelic/scalajs-octokit/releases/latest)\n[![](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://www.tldrlegal.com/l/mpl-2.0)\n[![](https://img.shields.io/badge/contact-gitter_chat-dd1054.svg)](https://gitter.im/laughedelic/scalajs-octokit)\n\nThis project contains Scala.js facades for [octokit/rest.js], the official GitHub REST API v3 client for Node.js.\n\n## 🚧 WORK IN PROGRESS 🚧\n\n_This project is in active development, there are no published releases yet. Things may break without a warning, so don't rely on it._\n\n## Usage\n\n### Installation\n\n\u003cdetails\u003e\u003csummary\u003e🛠 Check installation instructions later, when there is a published release...\u003c/summary\u003e\n\n1. Add Octokit dependency to your project. It's important that the version of the underlying JS library matches the one this facade is built for.\n\n    * If it's a Node.js project where you manage dependencies with npm, run\n        ```shell\n        npm install @octokit/rest@15.8.0\n        ```\n\n    * If it's a Scala.js project use [scalajs-bundler] and add to your `build.sbt`:\n        ```scala\n        Compile/npmDependencies += \"@octokit/rest\" -\u003e \"15.8.0\"\n        ```\n\n2. Add facades dependency to your `build.sbt`:\n    ```scala\n    resolvers += Resolver.jcenterRepo\n    libraryDependencies += \"laughedelic\" %%% \"scalajs-octokit\" % \"\u003cversion\u003e\"\n    ```\n    (see the latest release version on the badge above)\n\n\u003c/details\u003e\n\n### Example\n\nHere's a simple usage example:\n\n```scala\nimport laughedelic.octokit.rest._\n\n// Non-authenticated client with default parameters:\nval octokit = new Octokit()\n\n// A simple request (returns a Future)\noctokit.repos.get(\n  owner = \"octokit\",\n  repo = \"rest.js\"\n).foreach { response =\u003e\n\n  // Check some data in the response\n  println(response.data.full_name)\n  println(response.data.stargazers_count)\n  println(response.data.license.name)\n\n  // Or print the whole payload (see https://developer.github.com/v3/repos/#get)\n  println(js.JSON.stringify(response.data, space = 2))\n}\n```\n\n## Project structure\n\nMost of the code in this project is generated, so you won't find it in the repository. To see that code you need to clone the project and run `sbt compile`.\n\nThe code that parses `routes.json` and generates the Scala code is in `project/src/`, so it's available to the main build and is used in the `sourceGenerators`.\n\nThere is also some manually written code: [`src/main/scala/octokit.scala`](src/main/scala/octokit.scala). It defines types for the `Octokit` client, its options, authentication and pagination.\n\n## Documentation\n\nThere's no documentation in the project (yet), but you may find useful these resources:\n* octokit/rest.js [readme](https://github.com/octokit/rest.js#restjs) and [API docs](https://octokit.github.io/rest.js)\n* GitHub [REST API v3 docs](https://developer.github.com/v3)\n\n## Related projects\n\n* [scalajs-io/github-api-node](https://github.com/scalajs-io/github-api-node): partial facade for the [Github.js](http://github-tools.github.io/github) library\n    \u003e Github.js provides a minimal higher-level wrapper around Github's API\n\n* [47deg/github4s](http://47deg.github.io/github4s): JVM/JS-compatible Scala wrapper for (a part of) the GitHub API\n    \u003e Github4s is based on a Free Monad Architecture, which helps decoupling of program declaration from program interpretation\n\n#### How is this project different\n\n* This is a Scala.js-only ([facades](https://www.scala-js.org/doc/interoperability/facade-types.html)) library, no JVM\n* It builds on the official JS client for node which covers _all available GitHub REST API v3_ (including latest previews)\n* The code is automatically generated using the same source as the underlying JS library, which means it should be easy to maintain and keep in sync\n\n[Scala.js]: https://www.scala-js.org\n[octokit/rest.js]: https://github.com/octokit/rest.js\n[scalajs-bundler]: https://github.com/scalacenter/scalajs-bundler\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaughedelic%2Fscalajs-octokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaughedelic%2Fscalajs-octokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaughedelic%2Fscalajs-octokit/lists"}