Class MediaTypeController
The MediaType Controller is a controller that allows data to be retrieved and updated within the Ayuda Platform.
Namespace: Ayuda.BMS.Splash.Areas.Pi.Controllers
Remarks
This web service can be accessed using an address similar to the following: https://[AYUDA DEPLOYMENT URL]/Juice/Pi/MediaType
Methods
AreLocalizableFieldsBeingUpdated(NameValueCollection)
Declaration
protected bool AreLocalizableFieldsBeingUpdated(NameValueCollection requestData)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NameValueCollection | requestData |
Returns
Type | Description |
---|---|
System.Boolean |
Create(MediaTypeModel)
Creates a new Media Type using the specified parameters.
Declaration
public JsonResult Create(MediaTypeModel model)
Parameters
Type | Name | Description |
---|---|---|
MediaTypeModel | model | Model of the Media Type to be created. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The ID associated with the new Media Type if successfully created. |
Delete(Guid)
Deletes the Media Type as specified by the id.
Declaration
public JsonResult Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the MediaType to be deleted. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|
GetAll()
Gets all MediaTypes
Declaration
public JsonResult GetAll()
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | All mediaTypes. |
GetByCode(String)
Gets the MediaType by Code.
Declaration
public JsonResult GetByCode(string code)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | Code of the MediaType |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The MediaType if found. |
Update(Guid, String, String, String, String, Nullable<Guid>, Nullable<Boolean>)
Updates the Media Type with the specified parameters.
Declaration
public JsonResult Update(Guid id, string culture, string code, string name, string description, Guid? mediaTypeGroupID, bool? isLive)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the Media Type to be updated. |
System.String | culture | Language to update (if updating localizable fields). |
System.String | code | Code of the Media Type. |
System.String | name | Name of the Media Type. Localizable. |
System.String | description | Description of the Media Type. Localizable. |
System.Nullable<System.Guid> | mediaTypeGroupID | ID of the Media Type Group to which the Media Type belongs. |
System.Nullable<System.Boolean> | isLive | True if the Media Type is available and usable. False if it is archived. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|