{"id":16455278,"url":"https://github.com/cchantep/foorgol","last_synced_at":"2026-03-13T18:35:11.907Z","repository":{"id":20354223,"uuid":"23629239","full_name":"cchantep/foorgol","owner":"cchantep","description":":snowman: Google API client (or one the Discworld, the Ephebian God of Avalanches).","archived":false,"fork":false,"pushed_at":"2026-03-02T21:31:28.000Z","size":533,"stargazers_count":16,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-03T00:38:46.595Z","etag":null,"topics":["google-spreadsheet","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cchantep.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-09-03T16:59:58.000Z","updated_at":"2026-03-02T21:31:34.000Z","dependencies_parsed_at":"2023-01-11T20:48:50.476Z","dependency_job_id":"2293b1e7-0804-40ab-902f-231dacc9fe5d","html_url":"https://github.com/cchantep/foorgol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cchantep/foorgol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchantep%2Ffoorgol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchantep%2Ffoorgol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchantep%2Ffoorgol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchantep%2Ffoorgol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cchantep","download_url":"https://codeload.github.com/cchantep/foorgol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchantep%2Ffoorgol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30472980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: 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":["google-spreadsheet","scala"],"created_at":"2024-10-11T10:21:48.571Z","updated_at":"2026-03-13T18:35:11.877Z","avatar_url":"https://github.com/cchantep.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foorgol\n\nGoogle API client (or one the Discworld, the Ephebian God of Avalanches).\n\n[![Build Status](https://secure.travis-ci.org/cchantep/foorgol.png?branch=master)](http://travis-ci.org/cchantep/foorgol)\n\n## Motivation\n\nGoogle offer some nice Web API (Drive, Spreadsheet, ...), but Java client is not so nice to be easily integrated in a backend project (dependency issue, complexity).\n\nFoorgol help integration of some of these features.\n\n## Usage\n\nTo include foorgol to your sbt project, add the following lines to your `build.sbt`:\n```sbtshell\nresolvers += \"Tatami Releases\" at \"https://raw.github.com/cchantep/tatami/master/releases/\"\n\nlibraryDependencies += \"foorgol\" %% \"scala\" % \"1.0.5-SNAPSHOT\" // or \"foorgol\" % \"java-client\" % \"1.0.5-SNAPSHOT\"\n``` \n\n* Low-level [Java API](http://cchantep.github.io/foorgol/java-client/api/)\n* [Scala API](http://cchantep.github.io/foorgol/scala/api/#package)\n\n### Spreadsheet\n\nScala [DSL for Google Spreadsheet](http://cchantep.github.io/foorgol/scala/api/#foorgol.Spreadsheet) can be initialized as following.\n\n```scala\nimport foorgol.{ RefreshToken, Spreadsheet }\n\nval api: Spreadsheet = Spreadsheet(\"accessToken\")\n// Given access token must not be expired, as there refresh token is \n// not provided along, so it can be refreshed automatically.\n\nval refreshableApi: Spreadsheet = Spreadsheet(\"maybeExpiredAccessToken\",\n  Some(RefreshToken(\"clientId\", \"clientSecret\", \"refreshToken\")))\n// If access token is expired, then if will be automatically refreshed\n```\n\nOnce access to Google Spreadsheet is initialized, following features can be used.\n\n**List all available spreadsheets**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.SpreadsheetInfo\n\n// api: foorgol.Spreadsheet\n\nval spreadsheets: Future[List[SpreadsheetInfo]] = api.list\n```\n\n**Find a single spreadsheet by ID**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.SpreadsheetInfo\n\n// api: foorgol.Spreadsheet\n\nval spreadsheet: Future[SpreadsheetInfo] = api.spreadsheet(\"anID\")\n```\n\n**Create worksheet**\n\n```scala\nimport scala.concurrent.Future\n\n// api: foorgol.Spreadsheet\n\nval id: Future[String] = api.createWorksheet(spreadsheetId, \"Work title\")\n```\n\n**List worksheets by spreadsheet ID**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetInfo\n\n// api: foorgol.Spreadsheet\n\nval worksheets: Future[List[WorksheetInfo]] = api.worksheets(spreadsheetId)\n```\n\n**List worksheets by URI**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetInfo\n\n// api: foorgol.Spreadsheet\n// sheet: foorgol.SpreadsheetInfo\n\nval worksheets: Future[List[WorksheetInfo]] = \n  api.worksheets(sheet.worksheetsUri)\n```\n\n**Find a single worksheet by spreadsheet ID and worksheet index**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetInfo\n\n// api: foorgol.Spreadsheet\nval firstWorksheet: Future[Option[WorksheetInfo]] = \n  api.worksheet(\"spreadsheetId\", 0)\n```\n\n**Find a single worksheet by spreadsheet ID and worksheet ID**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetInfo\n\n// api: foorgol.Spreadsheet\nval worksheet: Future[Option[WorksheetInfo]] = \n  api.worksheet(\"spreadsheetId\", \"worksheetId\")\n```\n\n**Custom process with worksheets of a specified spreadsheet**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetInfo\n\n// api: foorgol.Spreadsheet\n\n// Find worksheet with matching title\nval matching: Future[Option[WorksheetInfo]] =\n  api.worksheet(\"spreadsheetId\")(None: Option[WorksheetInfo]) { \n    case (_, w @ WorksheetInfo(_, _, \"Matching title\", _, _)) =\u003e Left(Some(w)) \n      // found some matching sheet, put it at final value in the `Left`\n    case (st, _) =\u003e Right(st)\n      // Not matching title so will look at other worksheets\n  }\n```\n\n**Read cells by spreadsheet ID and worksheet index**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetCells\n\n// api: foorgol.Spreadsheet\n\nval cells: Future[Option[WorksheetCells]] = \n  api.cells(\"spreadsheetId\", 0, None, None)\n// All cells of first worksheet from specified spreadsheet\n```\n\n**Read cells by spreadsheet ID and worksheet ID**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetCells\n\n// api: foorgol.Spreadsheet\n\nval cells: Future[Option[WorksheetCells]] = \n  api.cells(\"spreadsheetId\", \"worksheetId\", None, None)\n// All cells of specified worksheet\n```\n\n**Read cells by URI**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetCells\n\n// api: foorgol.Spreadsheet\n// work: foorgol.WorksheetInfo\n\nval cells: Future[Option[WorksheetCells]] = api.cells(work.cellsUri, None, None)\n```\n\n**Get last row by spreadsheet ID and worksheet ID**\n\n```scala\nimport scala.concurrent.Future\nimport foorgol.WorksheetCells\n\n// api: foorgol.Spreadsheet\n\nval last: Future[Option[WorksheetCells]] = \n  api.lastRow(\"spreadsheetId\", \"worksheetId\")\n```\n\n**Changing cells content by URI**\n\n```scala\nimport scala.concurrent.Future\n\n// api: foorgol.Spreadsheet\n// work: foorgol.WorksheetInfo\n\n// Will change content for cells (4, 1) and (4, 3)\nval versionUris: Future[List[String]] = api.change(work.cellsUri, \n  List(CellValue(4, 1, \"4_1\"), CellValue(4, 3, \"4_3\")))\n// These urls can be used for batch update\n```\n\n**Changing cells by spreadsheet ID and worksheet index**\n\n```scala\nimport scala.concurrent.Future\n\n// api: foorgol.Spreadsheet\n\n// Will change content for cells (1, 1) and (1, 2),\n// in second worksheet of specified spreadsheet.\nval versionUris: Future[List[String]] = api.change(\"spreadsheetId\", 1, \n  List(CellValue(1, 1, \"1_1\"), CellValue(1, 2, \"1_2\")))\n```\n\n**Changing cells by spreadsheet ID and worksheet ID**\n\n```scala\nimport scala.concurrent.Future\n\n// api: foorgol.Spreadsheet\n\n// Will change content for cells (1, 1) and (1, 2),\n// in specified worksheet of specified spreadsheet.\nval versionUris: Future[List[String]] = \n  api.change(\"spreadsheetId\", \"worksheetId\", \n    List(CellValue(1, 1, \"1_1\"), CellValue(1, 2, \"1_2\")))\n```\n\n**Append cells at end of specified worksheet**\n\n```scala\nimport scala.concurrent.Future\n\n// api: foorgol.Spreadsheet\n\n// Append a row with first cell \"A\" and third one \"C\"\nval versionUris: Future[List[String]] = \n  api.append(\"spreadsheetId\", \"worksheetId\", List(\n    1 -\u003e \"A\", 3 -\u003e \"C\"))\n```\n\n**Append row at end of specified worksheet**\n\n```scala\nimport scala.concurrent.Future\n\n// api: foorgol.Spreadsheet\n\n// Append a row with contiguous cells (\"A\", \"B\", \"C\")\nval versionUris: Future[List[String]] = \n  api.append(\"spreadsheetId\", \"worksheetId\", \"A\", \"B\", \"C\")\n```\n\n\u003e Given values are assumed to be contiguous.\n\u003e Other `.append(spreadsheetId: String, worksheetId: String, values: List[(Int, String)])` must be prefered.\n\n## Requirements\n\n* Java 1.6+\n* SBT 1.1+\n\n## Build\n\nFoorgol can be built from these sources using SBT (1.1+): `sbt publish`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcchantep%2Ffoorgol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcchantep%2Ffoorgol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcchantep%2Ffoorgol/lists"}