Class: AdobeDocApi::Client
- Inherits:
-
Object
- Object
- AdobeDocApi::Client
- Defined in:
- lib/adobe_doc_api/client.rb
Constant Summary collapse
- OAUTH_URL =
"https://ims-na1.adobelogin.com/ims/token/v3".freeze
- API_ENDPOINT_URL =
"https://pdf-services-ue1.adobe.io/operation/documentgeneration"
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#location_url ⇒ Object
readonly
Returns the value of attribute location_url.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
Instance Method Summary collapse
-
#initialize(client_id: nil, client_secret: nil, scopes: nil) ⇒ Client
constructor
A new instance of Client.
- #submit(json:, template:, output:) ⇒ Object
Constructor Details
#initialize(client_id: nil, client_secret: nil, scopes: nil) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 18 |
# File 'lib/adobe_doc_api/client.rb', line 10 def initialize(client_id: nil, client_secret: nil, scopes: nil) @client_id = client_id || AdobeDocApi.configuration.client_id @client_secret = client_secret || AdobeDocApi.configuration.client_secret @scopes = scopes || AdobeDocApi.configuration.scopes @location_url = nil @output_file_path = nil @raw_response = nil @access_token = get_access_token end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
8 9 10 |
# File 'lib/adobe_doc_api/client.rb', line 8 def client_id @client_id end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
8 9 10 |
# File 'lib/adobe_doc_api/client.rb', line 8 def client_secret @client_secret end |
#location_url ⇒ Object (readonly)
Returns the value of attribute location_url.
8 9 10 |
# File 'lib/adobe_doc_api/client.rb', line 8 def location_url @location_url end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
8 9 10 |
# File 'lib/adobe_doc_api/client.rb', line 8 def raw_response @raw_response end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
8 9 10 |
# File 'lib/adobe_doc_api/client.rb', line 8 def scopes @scopes end |
Instance Method Details
#submit(json:, template:, output:) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/adobe_doc_api/client.rb', line 20 def submit(json:, template:, output:) @output = output @asset_id, upload_uri = upload_presigned_uri upload_asset(upload_uri, template: template) document_generation(json: json) end |