Class: Mediaflux::TestAssetCreateRequest

Inherits:
Request
  • Object
show all
Defined in:
app/models/mediaflux/test_asset_create_request.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#session_token

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

build_post_request, default_xml_namespace, default_xml_namespace_uri, #error?, find_or_create_http_client, format_date_for_mediaflux, request_path, #resolve, #resolved?, #response_body, #response_error, #response_xml, uri, #xml_payload, #xtoshell_xml

Constructor Details

#initialize(session_token:, parent_id:, count: 1, pattern: nil) ⇒ TestAssetCreateRequest

Constructor

Parameters:

  • session_token (String)

    the API token for the authenticated session

  • parent_id (Integer)

    nid of namespace or collection to create the test assets in

  • count (Integer) (defaults to: 1)

    Number of assets to create (default 1)

  • pattern (String) (defaults to: nil)

    Optional base name of the assets to create



11
12
13
14
15
16
# File 'app/models/mediaflux/test_asset_create_request.rb', line 11

def initialize(session_token:, parent_id:, count: 1, pattern: nil)
  super(session_token: session_token)
  @parent_id = parent_id
  @count = count
  @pattern = pattern
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



4
5
6
# File 'app/models/mediaflux/test_asset_create_request.rb', line 4

def count
  @count
end

#parent_idObject (readonly)

Returns the value of attribute parent_id.



4
5
6
# File 'app/models/mediaflux/test_asset_create_request.rb', line 4

def parent_id
  @parent_id
end

#patternObject (readonly)

Returns the value of attribute pattern.



4
5
6
# File 'app/models/mediaflux/test_asset_create_request.rb', line 4

def pattern
  @pattern
end

Class Method Details

.serviceString

Specifies the Mediaflux service to use when creating assets

Returns:

  • (String)


20
21
22
# File 'app/models/mediaflux/test_asset_create_request.rb', line 20

def self.service
  "asset.test.create"
end