Create a new project.
Parameters
Returns
Create project
package main
import (
"context"
"fmt"
"github.com/stainless-api/stainless-api-go"
"github.com/stainless-api/stainless-api-go/option"
"github.com/stainless-api/stainless-api-go/shared"
)
func main() {
client := stainless.NewClient(
option.WithAPIKey("My API Key"),
)
project, err := client.Projects.New(context.TODO(), stainless.ProjectNewParams{
DisplayName: "display_name",
Org: "org",
Revision: map[string]shared.FileInputUnionParam{
"foo": shared.FileInputUnionParam{
OfFileInputContent: &shared.FileInputContentParam{
Content: "content",
},
},
},
Slug: "slug",
Targets: []shared.Target{shared.TargetNode},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", project.ConfigRepo)
}
{
"config_repo": "config_repo",
"display_name": "display_name",
"object": "project",
"org": "org",
"slug": "slug",
"targets": [
"node"
]
}
Returns Examples
{
"config_repo": "config_repo",
"display_name": "display_name",
"object": "project",
"org": "org",
"slug": "slug",
"targets": [
"node"
]
}