Class BundleController
The Bundle 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/Bundle
Methods
AddDesign(BundleDesignModel)
Adds a design to the specified bundle.
Declaration
public JsonResult AddDesign(BundleDesignModel model)
Parameters
Type | Name | Description |
---|---|---|
BundleDesignModel | model | The model of the bundle design association to create. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded string containing the id of the newly created association. |
Create(BundleModel)
Creates a new bundle.
Declaration
public JsonResult Create(BundleModel model)
Parameters
Type | Name | Description |
---|---|---|
BundleModel | model | The model of the bundle to create. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded string containing the id of the newly created bundle. |
Delete(Guid)
Delete a bundle.
Declaration
public JsonResult Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The id of the bundle 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 bundle.
Declaration
public JsonResult Get(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the bundle. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | Model of the bundle corresponding to the bundle ID. |
GetBundlesForDesign(Guid)
Gets all bundle/design associations for a specified design.
Declaration
public JsonResult GetBundlesForDesign(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the bundle. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded array containing instances of the |
GetByName(String)
Returns all bundles that have a corresponding name.
Declaration
public JsonResult GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the bundle. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded arrayu containing instances of the |
GetDesign(Guid)
Gets all properties of a given bundle/design association.
Declaration
public JsonResult GetDesign(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the bundle/design association. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | Model of the bundle corresponding to the bundle/design association ID. |
GetDesigns(Guid)
Gets all bundle/design associations for a specified bundle.
Declaration
public JsonResult GetDesigns(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the bundle. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded array containing instances of the |
RemoveDesign(Guid)
Removes a design from a bundle.
Declaration
public JsonResult RemoveDesign(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The id of the bundle/design association to delete. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded boolean. true if the removal succeeded, else false. |
Update(Nullable<Guid>, Nullable<Guid>, String, String, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Boolean>, Nullable<StretchMode>, Nullable<Int32>, Nullable<Int32>, Nullable<Guid>, Nullable<Boolean>)
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? bundleID, string name, string description, Guid? advertiserID, Guid? contentTypeID, Guid? advertiserCategoryID, bool? playToEnd, StretchMode? stretch, int? widthInPixels, int? heightInPixels, Guid? triggeredByBundleID, bool? filterDesignsByAspectRatio)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | id | The id of the design to update. |
System.Nullable<System.Guid> | bundleID | The id of the bundle to update. Can be used as an alternative to the |
System.String | name | The new name of the bundle. |
System.String | description | The new description for the design. |
System.Nullable<System.Guid> | advertiserID | The new advertiser of the bundle. |
System.Nullable<System.Guid> | contentTypeID | The new Content Type (Advertising / Editorial / Filler). |
System.Nullable<System.Guid> | advertiserCategoryID | The new advertiser category for the bundle. |
System.Nullable<System.Boolean> | playToEnd | The new value for ther "play to end" field. |
System.Nullable<StretchMode> | stretch | The new value for the "stretch mode" field. |
System.Nullable<System.Int32> | widthInPixels | The new width of the bundle. |
System.Nullable<System.Int32> | heightInPixels | The new height of the bundle. |
System.Nullable<System.Guid> | triggeredByBundleID | The new new triggering bundle. |
System.Nullable<System.Boolean> | filterDesignsByAspectRatio |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded boolean. true if the update succeeded, else false. |
UpdateDesign(Nullable<Guid>, Nullable<Guid>, Int32, Int32)
Updates the information for a bundle/design association.
Declaration
public JsonResult UpdateDesign(Guid? id, Guid? bundleDesignID, int orderInBundle, int saturation)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | id | The id of the design to update. |
System.Nullable<System.Guid> | bundleDesignID | The id of the bundle/design association to update. Can be used as an alternate to the |
System.Int32 | orderInBundle | The new order of the design in the bundle. |
System.Int32 | saturation | The new saturation of the design. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | A Json encoded boolean. true if the update succeeded, else false. |