<commit_before>// Copyright 2014 <NAME>. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package buildkite

import "fmt"

// OrganizationsService handles communication with the organization related
// methods of the buildkite API.
//
// buildkite API docs: https://buildkite.com/docs/api/organizations
type OrganizationsService struct {
	client *Client
}

// Organization represents a buildkite organization.
type Organization struct {
	ID          *string    `json:"id,omitempty"`
	URL         *string    `json:"url,omitempty"`
	Name        *string    `json:"name,omitempty"`
	Slug        *string    `json:"slug,omitempty"`
	Repository  *string    `json:"repository,omitempty"`
	ProjectsURL *string    `json:"projects_url,omitempty"`
	AgentsURL   *string    `json:"agents_url,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

// OrganizationListOptions specifies the optional parameters to the
// OrganizationsService.List method.
type OrganizationListOptions struct {
	ListOptions
}

// List the organizations for the current user.
//
// buildkite API docs: https://buildkite.com/docs/api/organizations#list-organizations
func (os *OrganizationsService) List(opt *OrganizationListOptions) ([]Organization, *Response, error) {
	var u string<commit_msg>Add missing WebURL field to Organization struct<commit_after>// Copyright 2014 <NAME>. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package buildkite

import "fmt"

// OrganizationsService handles communication with the organization related
// methods of the buildkite API.
//
// buildkite API docs: https://buildkite.com/docs/api/organizations
type OrganizationsService struct {
	client *Client
}

// Organization represents a buildkite organization.
type Organization struct {
	ID          *string    `json:"id,omitempty"`
	URL         *string    `json:"url,omitempty"`
	WebURL      *string    `json:"web_url,omitempty"`
	Name        *string    `json:"name,omitempty"`
	Slug        *string    `json:"slug,omitempty"`
	Repository  *string    `json:"repository,omitempty"`
	ProjectsURL *string    `json:"projects_url,omitempty"`
	AgentsURL   *string    `json:"agents_url,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

// OrganizationListOptions specifies the optional parameters to the
// OrganizationsService.List method.
type OrganizationListOptions struct {
	ListOptions
}

// List the organizations for the current user.
//
// buildkite API docs: https://buildkite.com/docs/api/organizations#list-organizations
func (os *OrganizationsService) List(opt *OrganizationListOptions) ([]Organization, *Response, error) {
	var u string
{'fraction_non_alphanumeric': 0.10211393765675385, 'fraction_numerical': 0.002866356144750985, 'mean_word_length': 4.160813308687615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2235702', 'n_tokens_mistral': 773, 'n_tokens_neox': 758, 'n_words': 244}