{"id":19818806,"url":"https://github.com/sloppycoder/convertlabsdk","last_synced_at":"2026-06-11T00:31:33.252Z","repository":{"id":90083527,"uuid":"58696410","full_name":"sloppycoder/convertlabsdk","owner":"sloppycoder","description":"Ruby SDK for accessing convertlab online APIs","archived":false,"fork":false,"pushed_at":"2017-12-22T03:39:14.000Z","size":381,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T20:01:57.104Z","etag":null,"topics":["resque","rest-api","ruby","yardoc"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sloppycoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-05-13T03:31:37.000Z","updated_at":"2017-08-17T05:29:16.000Z","dependencies_parsed_at":"2023-03-13T18:00:01.917Z","dependency_job_id":null,"html_url":"https://github.com/sloppycoder/convertlabsdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sloppycoder/convertlabsdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloppycoder%2Fconvertlabsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloppycoder%2Fconvertlabsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloppycoder%2Fconvertlabsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloppycoder%2Fconvertlabsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloppycoder","download_url":"https://codeload.github.com/sloppycoder/convertlabsdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloppycoder%2Fconvertlabsdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34177445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["resque","rest-api","ruby","yardoc"],"created_at":"2024-11-12T10:16:56.418Z","updated_at":"2026-06-11T00:31:33.019Z","avatar_url":"https://github.com/sloppycoder.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ConvertLab SDK\n\nLibrary to facilitate synchronizing your application object with ConvertLab cloud services. A very simple use case looks like the following:\n\n```\nActiveRecord::Base.establish_connection\n\napp_client = ConvertLab::AppClient.new\nclab_id = app_client.customer.find(mobile: '13911223366')['records'].first['id']\n\n# this is the customer record in local applicaiton that we want to synchronize to ConvertLab\next_customer_info = { ext_channel: 'MY_SUPER_STORE', ext_type: 'customer',\n                      ext_id: 'my_customer_id', clab_id: clab_id }\nclab_customer = map_ext_customer_to_clab(ext_customer_info)\nConvertLab::SyncedCustomer.sync app_client.customer, clab_customer, ext_customer_info\n\n```\n\nFor more details, generate API documentation and look around.\n\n```\ngit clone \u003curl_of_this_repo\u003e\ncd convertlabsdk\nbundle install\nrake yard\nopen doc/index.html\n```\n\n\n### Running the test \n\n```\n# clone the repo first\n\n# set CLAB APPID and SECRET in envronment variables\nexport CLAB_APPID=\u003cappid\u003e\nexport CLAB_SECRET=\u003csecret\u003e\n\n# run test with VCR cassettes\nrake test\n\n# bypass VCR and send request to servers and log request/response to the console\nNO_VCR=1 RESTCLIENT_LOG=stdout rake test \n\n# run the tests and display slowest 10 test cases\nNO_VCR=1 ruby test/test_convertlabsdk.rb --profile\n\n# to get coverage report\nCOVERAGE=1 rake test\ncd coverage\nopen index.html\n\n# the test cases nromally does cleanup after themselves. In some cases, the test case execution is \n# interrupted# eitehr due to test failure or user intervention, the test data remaining in the \n# system can cause next test execution to fail. When this happens, run this script to cleanup \n# the data, then run the test cases again\n\nruby test/cleanup_testdata.rb\n\n# to run individual test case files\nruby test/test_\u003cwhatever\u003e.rb\n\n# to start the web conosle \nrackup\nopen http://localhost:9292/syncer\n\n```\n\nSee this [sync customer example](examples/sync_customer) for how to use the API in real world application.\n\n### TODO\n* review SycnedObject implementation for concurrency\n* add filter entry/reset for console\n* (low) add async submit and forget support?\n* (hold) implement sync_down and test cases (conflict with ext fields validation!)\n* (hold) add caching to rest-client layer\n\n### Fix sqlite crash on Mac OS Sierra\n```\ngem uninstall sqlite3\nbundle config build.sqlite3-ruby \"--with-sqlite3-include=/usr/local/Cellar/sqlite/3.15.2/include/ --with-sqlite3-lib=/usr/local/Cellar/sqlite/3.15.2/lib\"\nbundle install\n```\n:wq\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloppycoder%2Fconvertlabsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloppycoder%2Fconvertlabsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloppycoder%2Fconvertlabsdk/lists"}