Class: HubSpotSDK::Resources::Cms::SourceCode
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::SourceCode
- Defined in:
- lib/hubspot_sdk/resources/cms/source_code.rb
Instance Method Summary collapse
-
#extract_async(path:, request_options: {}) ⇒ HubSpotSDK::Models::TaskLocator
Extract a zip file in the developer file system.
-
#get_extraction_status(task_id, request_options: {}) ⇒ HubSpotSDK::Models::ActionResponse
Get the status of an extraction by the ‘taskId` returned from the initial `extract/async` request.
-
#initialize(client:) ⇒ SourceCode
constructor
private
A new instance of SourceCode.
Constructor Details
#initialize(client:) ⇒ SourceCode
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SourceCode.
53 54 55 |
# File 'lib/hubspot_sdk/resources/cms/source_code.rb', line 53 def initialize(client:) @client = client end |
Instance Method Details
#extract_async(path:, request_options: {}) ⇒ HubSpotSDK::Models::TaskLocator
Extract a zip file in the developer file system. Extraction status can be checked with the ‘/extract/async/tasks/taskId/status` endpoint below.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/hubspot_sdk/resources/cms/source_code.rb', line 19 def extract_async(params) parsed, = HubSpotSDK::Cms::SourceCodeExtractAsyncParams.dump_request(params) @client.request( method: :post, path: "cms/source-code/2026-03/extract/async", body: parsed, model: HubSpotSDK::TaskLocator, options: ) end |
#get_extraction_status(task_id, request_options: {}) ⇒ HubSpotSDK::Models::ActionResponse
Get the status of an extraction by the ‘taskId` returned from the initial `extract/async` request.
41 42 43 44 45 46 47 48 |
# File 'lib/hubspot_sdk/resources/cms/source_code.rb', line 41 def get_extraction_status(task_id, params = {}) @client.request( method: :get, path: ["cms/source-code/2026-03/extract/async/tasks/%1$s/status", task_id], model: HubSpotSDK::ActionResponse, options: params[:request_options] ) end |