TechStacks!

<back to all web services

UpdatePost

Posts
Requires Authentication
The following routes are available for this service:
PUT/posts/{Id}
namespace TechStacks.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type UpdatePostResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set

    type PostType =
        | Announcement = 0
        | Post = 1
        | Showcase = 2
        | Question = 3
        | Request = 4

    [<AllowNullLiteral>]
    type UpdatePost() = 
        interface IPut
        member val Id:Int64 = new Int64() with get,set
        member val OrganizationId:Int32 = new Int32() with get,set
        member val Type:PostType = new PostType() with get,set
        member val CategoryId:Int32 = new Int32() with get,set
        member val Title:String = null with get,set
        member val Url:String = null with get,set
        member val ImageUrl:String = null with get,set
        member val Content:String = null with get,set
        member val Lock:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val TechnologyIds:Int32[] = null with get,set
        member val Labels:String[] = null with get,set
        member val FromDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val ToDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val MetaType:String = null with get,set
        member val Meta:String = null with get,set

F# UpdatePost DTOs

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

HTTP + OTHER

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

PUT /posts/{Id} HTTP/1.1 
Host: techstacks.io 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"organizationId":0,"type":"Announcement","categoryId":0,"title":"String","url":"String","imageUrl":"String","content":"String","lock":false,"technologyIds":[0],"labels":["String"],"fromDate":"0001-01-01T00:00:00.0000000","toDate":"0001-01-01T00:00:00.0000000","metaType":"String","meta":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}