Retrieve
Retrieve a project by name
client.Projects.Get(ctx, query) (*ConfigRepostringDisplayNamestringObjectProjectObjectOrgstringSlugstringTargetsarrayProject, error)
get/v0/projects/{project}
Retrieve a project by name
Parameters
queryProjectfieldProjectGetParams
Returns
ConfigRepostringDisplayNamestringObjectProjectObjectOrgstringSlugstringTargetsarrayProject
package main
import (
"context"
"fmt"
"github.com/stainless-api/stainless-api-go"
"github.com/stainless-api/stainless-api-go/option"
)
func main() {
client := stainless.NewClient(
option.WithAPIKey("My API Key"),
)
project, err := client.Projects.Get(context.TODO(), stainless.ProjectGetParams{
Project: stainless.String("project"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", project.ConfigRepo)
}
200 Example
{
"config_repo": "config_repo",
"display_name": "display_name",
"object": "project",
"org": "org",
"slug": "slug",
"targets": [
"node"
]
}