AlbaApi

<back to all web services

ScriptTrackerReq

The following routes are available for this service:
GET/script
GET/script/{Sprint}
GET/script/{Sprint}/{Country}/{Language}/{Section}/{Element}
GET/script/{Sprint}/{Country}/{Language}/{Section}/{ItemCode}/{Element}
import Foundation
import ServiceStack

public class ScriptTrackerReq : Codable
{
    public var sprint:String?
    public var country:String?
    public var language:String?
    public var section:String?
    public var itemCode:String?
    public var element:String?

    required public init(){}
}

public class ScriptTracker : Entity
{
    public var sprint:String?
    public var country:String?
    public var language:String?
    public var section:String?
    public var itemCode:String?
    public var element:String?
    public var value:String?
    public var isFromMerge:Bool?

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case sprint
        case country
        case language
        case section
        case itemCode
        case element
        case value
        case isFromMerge
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        sprint = try container.decodeIfPresent(String.self, forKey: .sprint)
        country = try container.decodeIfPresent(String.self, forKey: .country)
        language = try container.decodeIfPresent(String.self, forKey: .language)
        section = try container.decodeIfPresent(String.self, forKey: .section)
        itemCode = try container.decodeIfPresent(String.self, forKey: .itemCode)
        element = try container.decodeIfPresent(String.self, forKey: .element)
        value = try container.decodeIfPresent(String.self, forKey: .value)
        isFromMerge = try container.decodeIfPresent(Bool.self, forKey: .isFromMerge)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if sprint != nil { try container.encode(sprint, forKey: .sprint) }
        if country != nil { try container.encode(country, forKey: .country) }
        if language != nil { try container.encode(language, forKey: .language) }
        if section != nil { try container.encode(section, forKey: .section) }
        if itemCode != nil { try container.encode(itemCode, forKey: .itemCode) }
        if element != nil { try container.encode(element, forKey: .element) }
        if value != nil { try container.encode(value, forKey: .value) }
        if isFromMerge != nil { try container.encode(isFromMerge, forKey: .isFromMerge) }
    }
}

public class Entity : IEntity, Codable
{
    public var id:String?

    required public init(){}
}


Swift ScriptTrackerReq DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /script HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ScriptTracker xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
  <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id>
  <Country>String</Country>
  <Element>String</Element>
  <IsFromMerge>false</IsFromMerge>
  <ItemCode>String</ItemCode>
  <Language>String</Language>
  <Section>String</Section>
  <Sprint>String</Sprint>
  <Value>String</Value>
</ScriptTracker>