ToGhostString() public static method

public static ToGhostString ( ContentStatus status ) : string
status ContentStatus
return string
Example #1
0
 public IPosts GetPosts(uint page = 1, uint limit = 15, ContentStatus status = ContentStatus.All, bool withStaticPages = false)
 {
     return(Cmd("/posts/")
            .WithParameter("page", page)
            .WithParameter("limit", limit)
            .WithParameter("status", ContentStatusHelper.ToGhostString(status))
            .WithParameter("staticPages", withStaticPages.ToString().ToLower())
            .Execute().To <Posts>(JsonHelper.CheckResponseForError));
 }
Example #2
0
 public IPost GetPost(int id)
 {
     return(Cmd("/posts/" + id + "/")
            .WithParameter("status", ContentStatusHelper.ToGhostString(ContentStatus.All))
            .Execute().To <Post>(JsonHelper.CheckResponseForError));
 }