{"id":17239084,"url":"https://github.com/binarymuse/rforce-wrapper","last_synced_at":"2025-04-14T02:32:50.464Z","repository":{"id":66010567,"uuid":"1395433","full_name":"BinaryMuse/rforce-wrapper","owner":"BinaryMuse","description":"RForce-wrapper creates a wrapper around RForce that more clearly exposes the Web Services API","archived":false,"fork":false,"pushed_at":"2011-02-25T07:42:35.000Z","size":1816,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T02:42:34.230Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/BinaryMuse.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}},"created_at":"2011-02-22T00:04:36.000Z","updated_at":"2016-02-05T16:46:22.000Z","dependencies_parsed_at":"2023-02-19T21:05:18.502Z","dependency_job_id":null,"html_url":"https://github.com/BinaryMuse/rforce-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Frforce-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Frforce-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Frforce-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Frforce-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinaryMuse","download_url":"https://codeload.github.com/BinaryMuse/rforce-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248810883,"owners_count":21165195,"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":"2024-10-15T05:47:41.639Z","updated_at":"2025-04-14T02:32:50.433Z","avatar_url":"https://github.com/BinaryMuse.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"rforce-wrapper\n==============\n\nRForce-wrapper creates a concrete wrapper around RForce to make it more clear\nand easier to use. It currently supports **version 21.0** of the Salesforce\nWeb Services API.\n\n[RForce](https://github.com/undees/rforce) is a great binding to the\nSalesforce Web Services API. RForce transparently turns method calls into\nSOAP method calls against the Salesforce API. RForce-wrapper creates objects\nand methods that wrap RForce, providing a more concrete API against\nSalesforce's own SOAP API, and provides error checking and basic result\nparsing.\n\nDocumentation\n-------------\n\nDetailed API documentation can be found at\n[http://rubydoc.info/github/BinaryMuse/rforce-wrapper/frames](http://rubydoc.info/github/BinaryMuse/rforce-wrapper/frames).\n\nNotes\n-----\n\nRForce-wrapper tries to match the Salesforce Web Services API as closely\nas possible, matching method names and arguments. Most places where the \nSalesforce API allows an array for an argument, RForce-wrapper allows either\nan array or multiple arguments (via a splat).\n\nAll calls via RForce-wrapper have their results wrapped in an array. You can\ndisable this functionality by specifying the option `:wrap_results =\u003e false`\nin the constructor to your `RForce::Wrapper::Connection`.\n\nExamples\n--------\n\n### Overview\n\n    require 'rforce-wrapper'\n    \n    # Connect to our sandbox.\n    sf = RForce::Wrapper::Connection.new('email', 'password' + 'token', {:environment =\u003e :test})\n    \n    # Describe the sObject \"Account\" and get a list of fields.\n    account_description = sf.describeSObjects('Account').first\n    # Filter out any fields that are marked as deprecated and hidden.\n    fields = account_description[:fields].map do |field|\n      next if field[:deprecatedAndHidden] == \"true\"\n      field[:name]\n    end\n    \n    # Fetch some accounts.\n    # Note that although the official API takes an array of IDs as the last\n    # parameter (see http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_retrieve.htm),\n    # we're simply passing in additional parameters. An array would also have worked fine.\n    accounts = sf.retrieve fields.join(', '), 'Account', '001S000000MBfXAIA1', '001S000000QJAeZIAX'\n    \n    accounts.each do |account|\n      puts account[:IsPersonAccount] == \"true\" ? \"- Person Account\" : \"- Business Account\"\n      puts \"         ID: #{account[:Id]}\"\n      puts \"       View: #{account_description[:urlDetail].sub \"{ID}\", account[:Id]}\"\n      puts\n    \n      if account[:IsPersonAccount] == \"true\"\n        puts \" First Name: #{account[:FirstName]}\"\n        puts \"  Last Name: #{account[:LastName]}\"\n        puts \"      Phone: #{account[:PersonHomePhone]}\"\n        puts \"      Email: #{account[:PersonEmail]}\"\n      else\n        puts \"         ID: #{account[:Id]}\"\n        puts \"       Name: #{account[:Name]}\"\n        puts \"      Phone: #{account[:Phone]}\"\n      end\n      puts\n    end\n\nOutput:\n\n    - Person Account\n             ID: 001S000000MBfXAIA1\n           View: https://cs1.salesforce.com/001S000000MBfXAIA1\n    \n     First Name: Sample\n      Last Name: Person\n          Phone: (555) 555-1234\n          Email: sample.person@company.com\n    \n    - Business Account\n             ID: 001S000000QJAeZIAX\n           View: https://cs1.salesforce.com/001S000000QJAeZIAX\n    \n           Name: Sample Company\n          Phone: (555) 555-4321\n\n### Creating a Record\n\n    new_account = {\n      :type      =\u003e 'Account',\n      :firstName =\u003e 'John',\n      :lastName  =\u003e 'Smith'\n    }\n    puts sf.create(new_account).first\n\nLicense\n-------\n\nRForce-wrapper is licensed under the MIT license.\n\n    Copyright (c) 2011 Brandon Tilley\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarymuse%2Frforce-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarymuse%2Frforce-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarymuse%2Frforce-wrapper/lists"}