README.md in docusign_rest-0.0.2 vs README.md in docusign_rest-0.0.3
- old
+ new
@@ -52,12 +52,27 @@
DocusignRest.configure do |config|
config.username = 'someone@gmail.com'
config.password = 'p@ssw0rd1'
config.integrator_key = 'KEYS-19ddd1cc-cb56-4ca6-87ec-38db47d14b32'
config.account_id = '123456'
+ #config.endpoint = 'https://docusign.net'
+ #config.api_version = 'v1'
end
+
+### Config Options
+
+There are several other configuration options available but the two most likely to be needed are:
+
+```ruby
+config.endpoint = 'https://docusign.net'
+config.api_version = 'v1'
+```
+
+The above options allow you to change the endpoint (to be able to hit the production DocuSign API, for instance) and to modify the API version you wish to use. If there is a big change in the API it's likely that this gem will need to be updated to leverage changes on the DocuSign side. However, it doesn't hurt to provide the option in case there are several minor updates that do not break functionality but would otherwise require a new gem release. These config options have existed since the gem was created, but in v0.0.3 and above, the options are auto-generated in the config file as comments to make them easier to discover.
+
+
## Usage
The docusign\_rest gem makes creating multipart POST (aka file upload) requests to the DocuSign REST API dead simple. It's built on top of Net:HTTP and utilizes the [multipart-post](https://github.com/nicksieger/multipart-post) gem to assist with formatting the multipart requests. The DocuSign REST API requires that all files be embedded as JSON directly in the request body (not the body\_stream like multipart-post does by default) so the docusign\_rest gem takes care of [setting that up for you](https://github.com/j2fly/docusign_rest/blob/master/lib/docusign_rest/client.rb#L397).
This gem also monkey patches one small part of multipart-post to inject some header values and formatting that DocuSign requires. If you would like to see the monkey patched code please take a look at [lib/multipart-post/parts.rb](https://github.com/j2fly/docusign_rest/blob/master/lib/multipart_post/parts.rb). It's only re-opening one method, but feel free to make sure you understand that monkey patch if it concerns you.
@@ -103,10 +118,9 @@
{path: 'test2.pdf', name: 'test2.pdf'}
],
status: 'sent'
)
response = JSON.parse(response.body)
-response["status"].must_equal "sent"
```
**Creating a template:**