WorkspaceBuilder

class WorkspaceBuilder : IResourceBuilder<Workspace>

Workspace resource builder

Samples

import com.yamilovs.insomnia.exporter.model.*
import com.yamilovs.insomnia.exporter.model.Collection
import com.yamilovs.insomnia.exporter.model.request.FollowRedirect
import com.yamilovs.insomnia.exporter.model.request.Method
import com.yamilovs.insomnia.exporter.model.request.authentication.EmptyAuthentication
import com.yamilovs.insomnia.exporter.model.request.body.EmptyBody
import com.yamilovs.insomnia.exporter.model.request.header.Header
import com.yamilovs.insomnia.exporter.model.request.parameter.Parameter
import java.net.URL
fun main() { 
   //sampleStart 
   Workspace.build {

    // setting up workspace name
    // next function call will rewrite previous value
    name("Workspace name")
    name { "Workspace name" }

    // setting up workspace description
    // next function call will rewrite previous value
    description("About workspace")
    description { "About workspace" }
} 
   //sampleEnd
}

Constructors

Link copied to clipboard
fun WorkspaceBuilder()

Functions

Link copied to clipboard
open override fun build(): Workspace
Link copied to clipboard
fun description(init: () -> String): WorkspaceBuilder
fun description(description: String): WorkspaceBuilder
Link copied to clipboard
fun name(init: () -> String): WorkspaceBuilder
fun name(name: String): WorkspaceBuilder