{"id":28171632,"url":"https://github.com/ahrefs/basecamp","last_synced_at":"2025-05-15T19:15:36.244Z","repository":{"id":291063727,"uuid":"976437991","full_name":"ahrefs/basecamp","owner":"ahrefs","description":"basecamp client library for OCaml","archived":false,"fork":false,"pushed_at":"2025-05-02T08:38:17.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-10T21:47:07.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahrefs.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}},"created_at":"2025-05-02T05:31:19.000Z","updated_at":"2025-05-02T08:38:21.000Z","dependencies_parsed_at":"2025-05-02T07:43:54.460Z","dependency_job_id":"d3f9638c-14c4-4239-8da7-d565411f6be8","html_url":"https://github.com/ahrefs/basecamp","commit_stats":null,"previous_names":["ahrefs/basecamp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fbasecamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fbasecamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fbasecamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fbasecamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahrefs","download_url":"https://codeload.github.com/ahrefs/basecamp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254404327,"owners_count":22065641,"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":"2025-05-15T19:15:35.617Z","updated_at":"2025-05-15T19:15:36.236Z","avatar_url":"https://github.com/ahrefs.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basecamp\n\nA comprehensive OCaml client library for the Basecamp 3 API, developed by Ahrefs.\n\n## Overview\n\nThis library provides a typed OCaml interface to the [Basecamp 3 API](https://github.com/basecamp/bc3-api), making it easy to interact with Basecamp from OCaml applications. It handles authentication, request rate limiting, pagination, and provides a comprehensive set of models and client functions to work with Basecamp resources.\n\n## Features\n\n- OAuth2 authentication support\n- Comprehensive Basecamp resource models\n- Type-safe API client\n- Automatic request rate limiting\n- Pagination support\n- Lwt-based asynchronous API\n\n## Installation\n\n```bash\nopam install basecamp\n```\n\n## Usage\n\n### Authentication\n\nThe library uses OAuth2 for authentication. You'll need to register your application with Basecamp to obtain client credentials.\n\n```ocaml\nlet client = Basecamp.Client.make\n  ~organization_id:123456\n  ~client_id:\"your_client_id\"\n  ~client_secret:\"your_client_secret\"\n  ~refresh_token:\"your_refresh_token\"\n  ~app_name:\"Your App Name\"\n  ~email:\"your_email@example.com\"\n  ()\n```\n\n### Examples\n\n#### Fetching Projects\n\n```ocaml\nopen Lwt_result.Syntax\n\nlet get_all_projects client =\n  let* projects, next_page = Basecamp.Client.get_projects client in\n  Lwt_io.printf \"Found %d projects\\n\" (List.length projects)\n```\n\n#### Working with Todos\n\n```ocaml\n(* Create a new todo *)\nlet create_new_todo client ~project_id ~todolist_id =\n  let* todo = Basecamp.Client.create_todo\n    ~project_id\n    ~todolist_id\n    ~content:\"Implement new feature\"\n    ~description:\"This is a detailed description of what needs to be done\"\n    ~due_on:\"2023-12-31\"\n    client\n  in\n  Lwt_io.printf \"Created todo with ID: %d\\n\" todo.id\n  \n(* Get all todos in a list *)\nlet get_todos client ~project_id ~todolist_id =\n  let* todos, _ = Basecamp.Client.get_todos \n    ~project_id \n    ~todolist_id \n    client \n  in\n  Lwt_io.printf \"Found %d todos\\n\" (List.length todos)\n```\n\n#### Pagination Support\n\n```ocaml\n(* Fetch all paginated results *)\nlet get_all_people client =\n  let* people = Basecamp.Client.fetch_all_paginated_results\n    ~paginated_query:Basecamp.Client.get_people\n    ~parse:Basecamp.Model.people_of_json_string\n    client\n  in\n  Lwt_io.printf \"Found %d people\\n\" (List.length people)\n```\n\n## API Documentation\n\nThe library provides access to the following Basecamp resources:\n\n- People and profiles\n- Projects\n- Todosets\n- Todolists\n- Todos\n\nFor more details, see the [inline documentation](https://github.com/ahrefs/basecamp).\n\n## Development\n\n### Building\n\n```bash\ndune build\n```\n\n### Running Tests\n\n`make -C test` Or see [/test](https://github.com/ahrefs/basecamp/blob/main/test/README.md)\n\n## License\n\nThis project is released into the public domain under the Unlicense. See the LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Acknowledgements\n\nDeveloped and maintained by [Ahrefs](https://github.com/ahrefs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahrefs%2Fbasecamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahrefs%2Fbasecamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahrefs%2Fbasecamp/lists"}