Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dkerwin committed Jan 16, 2015
1 parent fee63f2 commit 2d8cca6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ api.login(username: 'me@example.com', password: 'secret')
```ruby
doc = api.upload('/tmp/my_doc.pdf')
# => Gini::Api::Document
fh = File.open('/tmp/scan.pdf', 'r')
doc = api.upload(fh)
# => Gini::Api::Document
doc.id
# => "123456789-abcd-ef12-000000000000"
doc.progress
Expand Down
4 changes: 2 additions & 2 deletions lib/gini-api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def request(verb, resource, options = {})

# Upload a document
#
# @param [String] file path of the document to upload
# @param [String] file path or open filehandle of the document to upload
# @param [Float] interval Interval to poll progress
#
# @return [Gini::Api::Document] Return Gini::Api::Document object for uploaded document
Expand Down Expand Up @@ -307,7 +307,7 @@ def upload_connection

# Helper to upload document
#
# @param [String] file location of document to be uploaded
# @param [String] file location of document or open filehandle to be uploaded
#
# @return [Faraday::Response] Response object from upload
#
Expand Down

0 comments on commit 2d8cca6

Please sign in to comment.