{"id":20039257,"url":"https://github.com/sampatbadhe/dotloop-ruby","last_synced_at":"2025-05-05T07:32:36.667Z","repository":{"id":62557436,"uuid":"112641241","full_name":"sampatbadhe/dotloop-ruby","owner":"sampatbadhe","description":"Unofficial Ruby library for Dotloop API V2","archived":false,"fork":false,"pushed_at":"2020-04-18T15:49:39.000Z","size":93,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-24T13:56:23.362Z","etag":null,"topics":["apiv2","dotloop","ruby","ruby-library"],"latest_commit_sha":null,"homepage":"https://dotloop.github.io/public-api/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sampatbadhe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-30T17:38:34.000Z","updated_at":"2021-05-13T13:16:31.000Z","dependencies_parsed_at":"2022-11-03T06:30:19.136Z","dependency_job_id":null,"html_url":"https://github.com/sampatbadhe/dotloop-ruby","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampatbadhe%2Fdotloop-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampatbadhe%2Fdotloop-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampatbadhe%2Fdotloop-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampatbadhe%2Fdotloop-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sampatbadhe","download_url":"https://codeload.github.com/sampatbadhe/dotloop-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252458603,"owners_count":21751069,"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":["apiv2","dotloop","ruby","ruby-library"],"created_at":"2024-11-13T10:36:40.214Z","updated_at":"2025-05-05T07:32:35.973Z","avatar_url":"https://github.com/sampatbadhe.png","language":"Ruby","readme":"# Ruby library for Dotloop API v2\n\n[![Build Status](https://semaphoreci.com/api/v1/sampat-badhe/dotloop-ruby/branches/master/badge.svg)](https://semaphoreci.com/sampat-badhe/dotloop-ruby)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/a03408e2791211b8b816/test_coverage)](https://codeclimate.com/github/sampatbadhe/dotloop-ruby/test_coverage)\n\n* [Homepage](https://www.dotloop.com)\n* [API Documentation](https://dotloop.github.io/public-api)\n* [Sign Up](https://www.dotloop.com/#/signup)\n\n\n## Description\n\nProvides a Ruby interface to [Dotloop](https://www.dotloop.com/). This library is designed to help ruby applications consume the DotLoop API v2.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'dotloop-ruby'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install dotloop-ruby\n\n## Usage\n\n\n### Setup\n\nRegister for your OAuth2 credentials by creating a client at https://www.dotloop.com/my/account/#/clients.\n\nNOTE: You'll need at least `Account Access: Read` to use this strategy.\n\n### Authentication\n\nDotloop uses OAuth2 for authentication (https://dotloop.github.io/public-api/#authentication).\n\n```ruby\n  require 'dotloop-ruby'\n\n  dotloop_auth = Dotloop::Authenticate.new(\n    app_id: ENV['DOTLOOP_APP_ID'],\n    app_secret: ENV['DOTLOOP_APP_SECRET'],\n    application: 'dotloop'\n  )\n\n  dotloop_auth.url_for_authentication(callback_url, { redirect_on_deny: true })\n\n  # callback_url = The url that Dotloop will redirect the user to when the account is authenticated.\n\n  # It will return code on successfully authenticated.\n\n  code = params[:code]\n\n  access_and_refresh_token = dotloop_auth.acquire_access_and_refresh_token(code, { redirect_uri: callback_url })\n\n    {\n      \"access_token\": \"0b043f2f-2abe-4c9d-844a-3eb008dcba67\",\n      \"token_type\": \"Bearer\",\n      \"refresh_token\": \"19bfda68-ca62-480c-9c62-2ba408458fc7\",\n      \"expires_in\": 43145,\n      \"scope\": \"account:read, profile:*, loop:*, contact:*, template:read\"\n    }\n\n  # refresh access token - https://dotloop.github.io/public-api/#refreshing-access-token-after-expiration\n\n  response = dotloop_auth.refresh_access_token(refresh_token)\n\n    {\n      \"access_token\": \"86609772-aa95-4071-ad7f-25ad2d0be295\",\n      \"token_type\": \"Bearer\",\n      \"refresh_token\": \"19bfda68-ca62-480c-9c62-2ba408458fc7\",\n      \"expires_in\": 43199,\n      \"scope\": \"account:read, profile:*, loop:*, contact:*, template:read\"\n    }\n\n  # revoke access - https://dotloop.github.io/public-api/#access-revocation\n\n  dotloop_auth.revoke_access(access_token)\n\n```\n\n### Usage\n\n**Initialize**\n```ruby\n  require 'dotloop-ruby'\n\n  dotloop_client = Dotloop::Client.new(access_token: access_token)\n```\n\n**Account Details**\n```ruby\n  #=\u003e get account details\n  account = dotloop_client.account\n```\n\n**Profiles**\n```ruby\n  #=\u003e get list of profiles\n  profiles = dotloop_client.Profile.all\n\n  #=\u003e get single profile\n  profile = dotloop_client.Profile.find(profile_id: '1234')\n\n  #=\u003e get list of loops for profile\n  loops = dotloop_client.Profile.find(profile_id: '1234').loops\n\n  #=\u003e create new loop in profile\n  loops = dotloop_client.Profile.find(profile_id: '1234').create(data)\n    data = {\n      \"name\": \"Atturo Garay, 3059 Main, Chicago, IL 60614\",\n      \"status\": \"PRE_LISTING\",\n      \"transactionType\": \"LISTING_FOR_SALE\"\n    }\n\n  #=\u003e create new loop in profile using `loop-it`\n  loops = dotloop_client.Profile.find(profile_id: '1234').loop_it(data)\n    data = {\n      \"name\": \"Brian Erwin\",\n      \"transactionType\": \"PURCHASE_OFFER\",\n      \"status\": \"PRE_OFFER\",\n      \"streetName\": \"Waterview Dr\",\n      \"streetNumber\": \"2100\",\n      \"unit\": \"12\",\n      \"city\": \"San Francisco\",\n      \"zipCode\": \"94114\",\n      \"state\": \"CA\",\n      \"country\": \"US\",\n      \"participants\": [\n        {\n          \"fullName\": \"Brian Erwin\",\n          \"email\": \"brianerwin@newkyhome.com\",\n          \"role\": \"BUYER\"\n        },\n        {\n          \"fullName\": \"Allen Agent\",\n          \"email\": \"allen.agent@gmail.com\",\n          \"role\": \"LISTING_AGENT\"\n        },\n        {\n          \"fullName\": \"Sean Seller\",\n          \"email\": \"sean.seller@yahoo.com\",\n          \"role\": \"SELLER\"\n        }\n      ],\n      \"templateId\": 1424,\n      \"mlsPropertyId\": \"43FSB8\",\n      \"mlsId\": \"789\",\n      \"mlsAgentId\": \"123456789\"\n    }\n```\n\n**Profile Loops**\n```ruby\n  #=\u003e get list of loops for profile\n  loops = dotloop_client.Loop.all(options)\n    options = {\n      profile_id: '1234',\n      *batch_number: 1,\n      *batch_size: 50\n    }\n\n  #=\u003e get single loop\n  loop = dotloop_client.Loop.find(profile_id: 1234, loop_id: 34308)\n\n  #=\u003e create new loop\n  loop = dotloop_client.Loop.create(profile_id: 1234, params: params)\n    params = {\n      \"name\": \"Atturo Garay, 3059 Main, Chicago, IL 60614\",\n      \"status\": \"PRE_LISTING\",\n      \"transactionType\": \"LISTING_FOR_SALE\"\n    }\n\n  #=\u003e update loop\n  loop = dotloop_client.Loop.update(profile_id: 1234, loop_id: 34308, params: data)\n  OR\n  loop = dotloop_client.Loop.find(profile_id: 1234, loop_id: 34308).update(data: data)\n    data = {\n      \"status\": \"SOLD\"\n    }\n```\n\n**Loop Details**\n```ruby\n  #=\u003e get single loop details\n  loop_details = dotloop_client.Loop.detail(profile_id: 1234, loop_id: 34308)\n  OR\n  loop_details = dotloop_client.Loop.find(profile_id: 1234, loop_id: 34308).detail\n\n  #=\u003e update single loop details\n  loop_details = dotloop_client.Loop.update_details(profile_id: 1234, loop_id: 34308, data: data)\n  OR\n  loop_details = dotloop_client.Loop.find(profile_id: 1234, loop_id: 34308).update_details(params: data)\n    data = {\n      # https://dotloop.github.io/public-api/#parameters-12\n    }\n```\n\n**Loop Folders**\n```ruby\n  #=\u003e get list of folders for loop\n  folders = dotloop_client.Folder.all(options)\n    options = {\n      profile_id: '1234',\n      loop_id: '34308'\n    }\n\n  #=\u003e get single folder\n  folder = dotloop_client.Folder.find(profile_id: 1234, loop_id: 34308, folder_id: 423424)\n\n  #=\u003e create new folder\n  folder = dotloop_client.Folder.create(profile_id: 1234 loop_id: 34308, params: params)\n    params = {\n      \"name\": \"Disclosures\"\n    }\n\n  #=\u003e update folder\n  folder = dotloop_client.Folder.update(profile_id: 1234, loop_id: 34308, folder_id: 423424, params: data)\n    data = {\n      \"name\": \"Disclosures (renamed)\"\n    }\n```\n\n**Loop Documents**\n```ruby\n  #=\u003e get list of documents for folder\n  documents = dotloop_client.Document.all(options)\n    options = {\n      profile_id: '1234',\n      loop_id: '34308',\n      folder_id: '423424'\n    }\n\n  #=\u003e get single document\n  document = dotloop_client.Document.find(\n    profile_id: '1234',\n    loop_id: '34308',\n    folder_id: '423424',\n    document_id: '561621'\n  )\n\n  #=\u003e upload new document\n  document = dotloop_api.Document.upload(\n    profile_id: '1234',\n    loop_id: '34308',\n    folder_id: '423424',\n    params: { \"file_name\" =\u003e file_name, \"file_content\" =\u003e file_content }\n  )\n\n  #=\u003e dowload a document - Retrieve an individual document (binary)\n  document = dotloop_api.Document.get(\n    profile_id: '1234',\n    loop_id: '34308',\n    folder_id: '423424',\n    document_id: '561621'\n  )\n```\n\n**Loop Participants**\n```ruby\n  #=\u003e get list of participants for loop\n  participants = dotloop_client.Participant.all(options)\n    options = {\n      profile_id: '1234',\n      loop_id: '34308'\n    }\n\n  #=\u003e get single participant\n  participant = dotloop_client.Participant.find(\n    profile_id: '1234',\n    loop_id: '34308',\n    participant_id: '24743'\n  )\n\n  #=\u003e create participant for loop\n  participant = dotloop_client.Participant.create(\n    profile_id: '1234',\n    loop_id: '34308',\n    params: params\n  )\n    params = {\n      \"fullName\": \"Brian Erwin\",\n      \"email\": \"brian@gmail.com\",\n      \"role\": \"BUYER\",\n      \"Street Name\": \"123\",\n      \"Street Number\": \"Main St.\",\n      \"City\": \"Cincinnati\",\n      \"Zip/Postal Code\": \"45123\",\n      \"Country\":  \"USA\",\n      \"Phone\": \"(555) 555-5555\",\n      \"Cell Phone\": \"(555) 555-4444\",\n      \"Company Name\":  \"Buyer's Company\"\n    }\n\n  #=\u003e update participant\n  participant = dotloop_client.Participant.update(\n    profile_id: '1234',\n    loop_id: '34308',\n    participant_id: '24743',\n    params: params\n  )\n    params = {\n      \"email\": \"brian@gmail.com\"\n    }\n\n  #=\u003e delete participant\n  participant = dotloop_client.Participant.delete(\n    profile_id: '1234',\n    loop_id: '34308',\n    participant_id: '24743'\n  )\n```\n\n**Loop Templates**\n```ruby\n  #=\u003e get list of loop templates for profile\n  loop_templates = dotloop_client.Loop.all(profile_id: '1234')\n\n  #=\u003e get single loop template\n  loop = dotloop_client.Loop.find(profile_id: '1234', loop_template_id: '423')\n```\n\n**Loop Tasks**\n```ruby\n  #=\u003e get list of tasklists for loop\n  tasklists = dotloop_client.Tasklist.all(profile_id: '1234', loop_id: '34308')\n\n  #=\u003e get single tasklist\n  tasklist = dotloop_client.Tasklist.find(\n    profile_id: '1234',\n    loop_id: '34308',\n    task_list_id: '12345'\n  )\n\n  #=\u003e get list of task for loop\n  tasklists = dotloop_client.Task.all(\n    profile_id: '1234',\n    loop_id: '34308',\n    task_list_id: '12345'\n  )\n\n  #=\u003e get single task\n  tasklist = dotloop_client.Task.find(\n    profile_id: '1234',\n    loop_id: '34308',\n    task_list_id: '12345'\n    task_id: '125736485'\n  )\n\n```\n\n**Contacts**\n```ruby\n  #=\u003e get list of contacts\n  contacts = dotloop_client.Contact.all(options)\n    options = {\n      *batch_number: 1,\n      *batch_size: 50\n    }\n\n  #=\u003e get single contact\n  contact = dotloop_client.Contact.find(contact_id: '3603862')\n\n  #=\u003e create new contact\n  contact = dotloop_client.Contact.create(params: params)\n    params = {\n      \"firstName\": \"Brian\",\n      \"lastName\": \"Erwin\",\n      \"email\": \"brianerwin@newkyhome.com\",\n      \"home\": \"(415) 8936 332\",\n      \"office\": \"(415) 1213 656\",\n      \"fax\": \"(415) 8655 686\",\n      \"address\": \"2100 Waterview Dr\",\n      \"city\": \"San Francisco\",\n      \"zipCode\": \"94114\",\n      \"state\": \"CA\",\n      \"country\": \"US\"\n    }\n\n  #=\u003e update contact\n  contact = dotloop_client.Contact.update(\n    contact_id: '3603862',\n    params: params\n  )\n    params = {\n      \"home\": \"(415) 888 8888\"\n    }\n\n  #=\u003e delete contact\n  dotloop_client.Contact.delete(contact_id: '3603862')\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/sampatbadhe/dotloop-ruby.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Statement\n`dotloop-ruby` part of reference [Loft47/dotloop](https://github.com/Loft47/dotloop) project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampatbadhe%2Fdotloop-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsampatbadhe%2Fdotloop-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampatbadhe%2Fdotloop-ruby/lists"}