doccy-api 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -19,7 +19,7 @@ Or install it yourself as:
19
19
 
20
20
  Create a doccy_api.rb file in your config/initializers folder and add the following
21
21
 
22
- Doccy::Config.mode = :production" # OPTIONAL defaults to staging.
22
+ Doccy::Config.mode = :production # OPTIONAL defaults to staging.
23
23
  Doccy::Config.app_key = "YOUR-PARTNER-KEY" #OPTIONAL you only need this to create client accounts.
24
24
 
25
25
 
@@ -55,7 +55,15 @@ Returns a specific Template
55
55
 
56
56
 
57
57
  Uploads a Teamplate to Doccy
58
-
58
+
59
+ - Method: `post`
60
+ - Request Params:
61
+ - template[name]: Name of template in Doccy * Required
62
+ - template[description]: Optional
63
+ - template[document_template]: Template file to upload * Required
64
+
65
+ - Request Example: no request content
66
+
59
67
  Doccy::Templates.upload(auth_token, template_params)
60
68
 
61
69
 
@@ -63,7 +71,13 @@ Uploads a Teamplate to Doccy
63
71
 
64
72
  Creates a Document from Template
65
73
 
66
- Doccy::Documents.create(auth_token, template_id, document_params)
74
+ - Method: `post`
75
+ - Request Params:
76
+ - document[name]: Name of document * Required
77
+ - document[content][:placeholder]: Placeholde should be replaced by the values returned from template show action
78
+
79
+ Doccy::Documents.create(auth_token, template_id, document_params)
80
+
67
81
 
68
82
  Returns a specific Document
69
83
 
@@ -72,8 +86,9 @@ Returns a specific Document
72
86
 
73
87
  Downloads a Document
74
88
 
75
- Doccy::Documents.download(auth_token, template_id, document_id)
89
+ Doccy::Documents.download(auth_token, template_id, document_id, original=nil)
76
90
 
91
+ - if you past through original=true as a param if will return the document in the original format with the merges rather then in PDF.
77
92
 
78
93
  ## <a name="emails"> Emails </a>
79
94
 
data/doccy-api.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Sentia Australia Pty Ltd"]
10
10
  spec.email = ["support@doccyapp.com"]
11
11
  spec.summary = "Ruby wrapper around Doccy API"
12
- spec.description = "Ruby wrapper around Doccy API for creating, sending and sharing documents. This api can be used if your a Doccy partner or just want to use Doccy in your app."
12
+ spec.description = "Ruby wrapper around Doccy API for creating, sending and sharing documents. This api can be used if you're a Doccy partner or just want to use Doccy in your app."
13
13
  spec.homepage = "https://www.doccyapp.com"
14
14
  spec.license = "MIT"
15
15
 
@@ -14,8 +14,12 @@ module Doccy
14
14
  response = HTTParty.get("#{Doccy::Config.url}/templates/#{template_id}/documents/#{document_id}.json", options)
15
15
  end
16
16
 
17
- def self.download(auth_token, template_id, document_id)
18
- options = { query: { auth_token: auth_token} }
17
+ def self.download(auth_token, template_id, document_id, original=nil)
18
+ if original
19
+ options = { query: { auth_token: auth_token, original: true} }
20
+ else
21
+ options = { query: { auth_token: auth_token} }
22
+ end
19
23
 
20
24
  response = HTTParty.get("#{Doccy::Config.url}/templates/#{template_id}/documents/#{document_id}/download.json", options)
21
25
  end
data/lib/doccy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doccy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doccy-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-06 00:00:00.000000000 Z
12
+ date: 2013-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -92,7 +92,8 @@ dependencies:
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  description: Ruby wrapper around Doccy API for creating, sending and sharing documents.
95
- This api can be used if your a Doccy partner or just want to use Doccy in your app.
95
+ This api can be used if you're a Doccy partner or just want to use Doccy in your
96
+ app.
96
97
  email:
97
98
  - support@doccyapp.com
98
99
  executables: []
@@ -137,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
138
  version: '0'
138
139
  segments:
139
140
  - 0
140
- hash: -80846182938457042
141
+ hash: 3458260510351561532
141
142
  required_rubygems_version: !ruby/object:Gem::Requirement
142
143
  none: false
143
144
  requirements:
@@ -146,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
147
  version: '0'
147
148
  segments:
148
149
  - 0
149
- hash: -80846182938457042
150
+ hash: 3458260510351561532
150
151
  requirements: []
151
152
  rubyforge_project:
152
153
  rubygems_version: 1.8.25