Blazor Diffusion

<back to all web services

UpdateAlbum

Albums
Requires Authentication
"use strict";
export class AuditBase {
    /** @param {{createdDate?:string,createdBy?:string,modifiedDate?:string,modifiedBy?:string,deletedDate?:string,deletedBy?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    createdDate;
    /** @type {string} */
    createdBy;
    /** @type {string} */
    modifiedDate;
    /** @type {string} */
    modifiedBy;
    /** @type {?string} */
    deletedDate;
    /** @type {string} */
    deletedBy;
}
export class Artifact extends AuditBase {
    /** @param {{id?:number,creativeId?:number,fileName?:string,filePath?:string,contentType?:string,contentLength?:number,width?:number,height?:number,seed?:number,prompt?:string,nsfw?:boolean,averageHash?:number,perceptualHash?:number,differenceHash?:number,background?:string,lqip?:string,quality?:number,likesCount?:number,albumsCount?:number,downloadsCount?:number,searchCount?:number,temporalScore?:number,score?:number,rank?:number,refId?:string,versions?:{ [index:string]: string; },createdDate?:string,createdBy?:string,modifiedDate?:string,modifiedBy?:string,deletedDate?:string,deletedBy?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {number} */
    creativeId;
    /** @type {string} */
    fileName;
    /** @type {string} */
    filePath;
    /** @type {string} */
    contentType;
    /** @type {number} */
    contentLength;
    /** @type {number} */
    width;
    /** @type {number} */
    height;
    /** @type {number} */
    seed;
    /** @type {string} */
    prompt;
    /** @type {?boolean} */
    nsfw;
    /** @type {?number} */
    averageHash;
    /** @type {?number} */
    perceptualHash;
    /** @type {?number} */
    differenceHash;
    /** @type {?string} */
    background;
    /** @type {?string} */
    lqip;
    /** @type {number} */
    quality;
    /** @type {number} */
    likesCount;
    /** @type {number} */
    albumsCount;
    /** @type {number} */
    downloadsCount;
    /** @type {number} */
    searchCount;
    /** @type {number} */
    temporalScore;
    /** @type {number} */
    score;
    /** @type {number} */
    rank;
    /** @type {string} */
    refId;
    /** @type {{ [index:string]: string; }} */
    versions = {};
}
export class AlbumArtifact {
    /** @param {{id?:number,albumId?:number,artifactId?:number,description?:string,createdDate?:string,modifiedDate?:string,artifact?:Artifact}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {number} */
    albumId;
    /** @type {number} */
    artifactId;
    /** @type {?string} */
    description;
    /** @type {string} */
    createdDate;
    /** @type {string} */
    modifiedDate;
    /** @type {?Artifact} */
    artifact;
}
export class Album extends AuditBase {
    /** @param {{id?:number,name?:string,description?:string,slug?:string,tags?:string[],refId?:string,ownerId?:number,ownerRef?:string,primaryArtifactId?:number,private?:boolean,rating?:number,likesCount?:number,downloadsCount?:number,searchCount?:number,score?:number,rank?:number,prefColumns?:number,artifacts?:AlbumArtifact[],createdDate?:string,createdBy?:string,modifiedDate?:string,modifiedBy?:string,deletedDate?:string,deletedBy?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {?string} */
    name;
    /** @type {string} */
    description;
    /** @type {string} */
    slug;
    /** @type {string[]} */
    tags = [];
    /** @type {string} */
    refId;
    /** @type {number} */
    ownerId;
    /** @type {string} */
    ownerRef;
    /** @type {?number} */
    primaryArtifactId;
    /** @type {boolean} */
    private;
    /** @type {?number} */
    rating;
    /** @type {number} */
    likesCount;
    /** @type {number} */
    downloadsCount;
    /** @type {number} */
    searchCount;
    /** @type {number} */
    score;
    /** @type {number} */
    rank;
    /** @type {?number} */
    prefColumns;
    /** @type {AlbumArtifact[]} */
    artifacts = [];
}
export class UpdateAlbum {
    /** @param {{id?:number,name?:string,description?:string,slug?:string,tags?:string[],primaryArtifactId?:number,unpinPrimaryArtifact?:boolean,addArtifactIds?:number[],removeArtifactIds?:number[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {?string} */
    name;
    /** @type {?string} */
    description;
    /** @type {?string} */
    slug;
    /** @type {?string[]} */
    tags;
    /** @type {?number} */
    primaryArtifactId;
    /** @type {?boolean} */
    unpinPrimaryArtifact;
    /** @type {?number[]} */
    addArtifactIds;
    /** @type {?number[]} */
    removeArtifactIds;
}

JavaScript UpdateAlbum 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.

POST /xml/reply/UpdateAlbum HTTP/1.1 
Host: blazordiffusion.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateAlbum xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BlazorDiffusion.ServiceModel">
  <AddArtifactIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </AddArtifactIds>
  <Description>String</Description>
  <Id>0</Id>
  <Name>String</Name>
  <PrimaryArtifactId>0</PrimaryArtifactId>
  <RemoveArtifactIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </RemoveArtifactIds>
  <Slug>String</Slug>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Tags>
  <UnpinPrimaryArtifact>false</UnpinPrimaryArtifact>
</UpdateAlbum>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Album xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BlazorDiffusion.ServiceModel">
  <CreatedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</CreatedDate>
  <CreatedBy xmlns="http://schemas.servicestack.net/types">String</CreatedBy>
  <ModifiedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</ModifiedDate>
  <ModifiedBy xmlns="http://schemas.servicestack.net/types">String</ModifiedBy>
  <DeletedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</DeletedDate>
  <DeletedBy xmlns="http://schemas.servicestack.net/types">String</DeletedBy>
  <Artifacts>
    <AlbumArtifact>
      <AlbumId>0</AlbumId>
      <Artifact>
        <CreatedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</CreatedDate>
        <CreatedBy xmlns="http://schemas.servicestack.net/types">String</CreatedBy>
        <ModifiedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</ModifiedDate>
        <ModifiedBy xmlns="http://schemas.servicestack.net/types">String</ModifiedBy>
        <DeletedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</DeletedDate>
        <DeletedBy xmlns="http://schemas.servicestack.net/types">String</DeletedBy>
        <AlbumsCount>0</AlbumsCount>
        <AverageHash>0</AverageHash>
        <Background>String</Background>
        <ContentLength>0</ContentLength>
        <ContentType>String</ContentType>
        <CreativeId>0</CreativeId>
        <DifferenceHash>0</DifferenceHash>
        <DownloadsCount>0</DownloadsCount>
        <FileName>String</FileName>
        <FilePath>String</FilePath>
        <Height>0</Height>
        <Id>0</Id>
        <LikesCount>0</LikesCount>
        <Lqip>String</Lqip>
        <Nsfw>false</Nsfw>
        <PerceptualHash>0</PerceptualHash>
        <Prompt>String</Prompt>
        <Quality>0</Quality>
        <Rank>0</Rank>
        <RefId>String</RefId>
        <Score>0</Score>
        <SearchCount>0</SearchCount>
        <Seed>0</Seed>
        <TemporalScore>0</TemporalScore>
        <Versions xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Versions>
        <Width>0</Width>
      </Artifact>
      <ArtifactId>0</ArtifactId>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <Description>String</Description>
      <Id>0</Id>
      <ModifiedDate>0001-01-01T00:00:00</ModifiedDate>
    </AlbumArtifact>
  </Artifacts>
  <Description>String</Description>
  <DownloadsCount>0</DownloadsCount>
  <Id>0</Id>
  <LikesCount>0</LikesCount>
  <Name>String</Name>
  <OwnerId>0</OwnerId>
  <OwnerRef>String</OwnerRef>
  <PrefColumns>0</PrefColumns>
  <PrimaryArtifactId>0</PrimaryArtifactId>
  <Private>false</Private>
  <Rank>0</Rank>
  <Rating>0</Rating>
  <RefId>String</RefId>
  <Score>0</Score>
  <SearchCount>0</SearchCount>
  <Slug>String</Slug>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Tags>
</Album>