Class DesignController
The Design 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/Design
Methods
Create(PI.SDK.Models.DesignModel)
Creates a new design.
Declaration
public JsonResult Create(PI.SDK.Models.DesignModel model)
Parameters
| Type | Name | Description |
|---|---|---|
| PI.SDK.Models.DesignModel | model | The model of the design to create. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | A Json encoded string containing the id of the newly created design. |
Delete(Guid)
Delete a design.
Declaration
public JsonResult Delete(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | id | The ID of the design to delete. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | A Json encoded boolean. true if the delete succeeded, else false. |
Get(Guid)
Gets all properties of a given design.
Declaration
public JsonResult Get(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | id | ID of the design. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | Model of the design corresponding to the Design ID. |
GetAdditionalInformation(Guid)
Get Additional Information such as MD5 sum, Created Date, Last Modified Date corresponding to the design
Declaration
public JsonResult GetAdditionalInformation(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | id | ID of the design. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | A model containing values of MD5sum, Created Date, Last Modified Date, File Name |
Search(String, Int32)
Searches all designs.
Declaration
public JsonResult Search(string term, int limit = 25)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | term | Term to search. |
| System.Int32 | limit |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | Models of all the results that match the search term. |
Update(Nullable<Guid>, Nullable<Guid>, String, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, String, String, String, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, String, Nullable<Guid>, Nullable<Guid>, Guid[], Nullable<Int32>, Nullable<Guid>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, String, String, String, String, String, String, Nullable<Guid>, Nullable<DateTime>, Nullable<DateTime>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)
Update the specified design.
Only the ID of the design and the fields to be updated need to be specified.
It is also possible to send a whole instance of the
Declaration
public JsonResult Update(Guid? id, Guid? designID, string name, Guid? advertiserID, Guid? brandID, Guid? contentTypeID, string code, string barCode, string description, Guid? mediaTypeID, Guid? MediaTypeGroupID, Guid? materialID, Guid? faceSizeID, string note, Guid? designTypeID, Guid? contentCategoryID, Guid[] contentCategoryIDs, int? volumePercent, Guid? associatedDesignID, bool? isLive, bool? canBeUsedAsFiller, bool? enableExternalAdditionalFiles, string externalAdditionalFilesFolderName, string externalAdditionalFilesFtpServer, string externalAdditionalFilesFtpDirectory, string externalAdditionalFilesFtpUsername, string externalAdditionalFilesFtpPassword, string externalAdditionalFilesFtpPasswordConfirmation, Guid? approvalStatus, DateTime? validFromUtc, DateTime? validUntilUtc, bool? doNotPlay, int? durationInMilliseconds, int? widthInPixels, int? heightInPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.Guid> | id | The id of the design to update. |
| System.Nullable<System.Guid> | designID | The id of the design to update. Can be used as an alternate to the |
| System.String | name | The new name of the design. |
| System.Nullable<System.Guid> | advertiserID | The new advertiser of the design. |
| System.Nullable<System.Guid> | brandID | The new brand of the design. |
| System.Nullable<System.Guid> | contentTypeID | The new Content Type (Advertising / Editorial / Filler). |
| System.String | code | The new code for the design. |
| System.String | barCode | The new bar code for the design. |
| System.String | description | The new description for the design. |
| System.Nullable<System.Guid> | mediaTypeID | The new media the for the design. |
| System.Nullable<System.Guid> | MediaTypeGroupID | |
| System.Nullable<System.Guid> | materialID | The new material for the design. |
| System.Nullable<System.Guid> | faceSizeID | The new face size for the design. |
| System.String | note | The new note for the design. |
| System.Nullable<System.Guid> | designTypeID | The new design type for the design. |
| System.Nullable<System.Guid> | contentCategoryID | The new content category for the design. This parameter is deprecated, please use the |
| System.Guid[] | contentCategoryIDs | The new content categories for the design. |
| System.Nullable<System.Int32> | volumePercent | The new volume for the design. |
| System.Nullable<System.Guid> | associatedDesignID | The new associated design. |
| System.Nullable<System.Boolean> | isLive | The new value for the "IsLive" property. |
| System.Nullable<System.Boolean> | canBeUsedAsFiller | The new value for the "CanBeUsedAsFiller" property. |
| System.Nullable<System.Boolean> | enableExternalAdditionalFiles | The new value for the "EnableExternalAdditionalFiles" property. |
| System.String | externalAdditionalFilesFolderName | The new value for the "ExternalAdditionalFilesFolderName" property. |
| System.String | externalAdditionalFilesFtpServer | The new value for the "ExternalAdditionalFilesFTPServer" property. |
| System.String | externalAdditionalFilesFtpDirectory | The new value for the "ExternalAdditionalFilesFTPDirectory" property. |
| System.String | externalAdditionalFilesFtpUsername | The new value for the "ExternalAdditionalFilesFTPUsername" property. |
| System.String | externalAdditionalFilesFtpPassword | The new value for the "ExternalAdditionalFilesFTPPassword" property. |
| System.String | externalAdditionalFilesFtpPasswordConfirmation | The new value for the "ExternalAdditionalFilesFTPPasswordConfirmation" property. |
| System.Nullable<System.Guid> | approvalStatus | Whether the design is Approved, RequiresApproval, or is disaproved |
| System.Nullable<System.DateTime> | validFromUtc | The new "ValidFromUtc" date for the design. |
| System.Nullable<System.DateTime> | validUntilUtc | The new "ValidUntilUtc" date for the design. |
| System.Nullable<System.Boolean> | doNotPlay | The new value for "DoNotPlay" property of the design. |
| System.Nullable<System.Int32> | durationInMilliseconds | The new value for "DurationInMilliseconds" property of the design. |
| System.Nullable<System.Int32> | widthInPixels | The new value for "WidthInPixels" property of the design. |
| System.Nullable<System.Int32> | heightInPixels | The new value for "HeightInPixels" property of the design. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | A Json encoded boolean. true if the update succeeded, else false. |