CollectionBuilder

class CollectionBuilder

Collection 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 
   Collection.build {

    // define workspace resource
    workspace {
        // Workspace resource DSL is available here
    }

    // define apiSpec resource
    apiSpec {
        // ApiSpec resource DSL is available here
    }

    // define baseEnvironment resource
    baseEnvironment {
        // BaseEnvironment resource DSL is available here
    }

    // add request group resource
    requestGroup {
        // RequestGroup resource DSL is available here
    }

    // add request resource
    request {
        // Request resource DSL is available here
    }
} 
   //sampleEnd
}

Constructors

Link copied to clipboard
fun CollectionBuilder()

Functions

Link copied to clipboard
fun apiSpec(configure: ApiSpecBuilder.() -> Unit = {}): CollectionBuilder
Link copied to clipboard
fun baseEnvironment(configure: BaseEnvironmentBuilder.() -> Unit = {}): CollectionBuilder
Link copied to clipboard
fun build(): Collection
Link copied to clipboard
fun request(configure: RequestBuilder.() -> Unit): CollectionBuilder
Link copied to clipboard
fun requestGroup(configure: RequestGroupBuilder.() -> Unit): CollectionBuilder
Link copied to clipboard
fun workspace(configure: WorkspaceBuilder.() -> Unit = {}): CollectionBuilder

Properties

Link copied to clipboard
val environments: MutableList<Environment>
Link copied to clipboard
val requestGroups: MutableList<RequestGroup>
Link copied to clipboard
val requests: MutableList<Request>