project

package
v1.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package project carries the Project resource's wire types. Project API methods still live on github.com/dmalch/go-geni's root Client during the pre-1.0 reshape and migrate into this package in a later PR; this PR lifts only the types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkResponse

type BulkResponse struct {
	Results  []Project `json:"results,omitempty"`
	Page     int       `json:"page,omitempty"`
	NextPage string    `json:"next_page,omitempty"`
	PrevPage string    `json:"prev_page,omitempty"`
}

BulkResponse is the paginated envelope returned by project-bulk endpoints (followed-projects, document/{id}/projects, …).

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps a transport.Client with the project endpoints.

func NewClient

func NewClient(t *transport.Client) *Client

NewClient returns a project Client backed by the supplied transport.

func (*Client) AddProfile

func (c *Client) AddProfile(ctx context.Context, profileId, projectId string) (*profile.Profile, error)

AddProfile tags a profile into a project. Returns the updated profile (with the new project id in its project_ids list).

func (*Client) Collaborators

func (c *Client) Collaborators(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)

Collaborators returns the paginated list of users who collaborate on a project. The response is shaped as a profile.BulkResponse; each entry is a profile object representing the collaborator. page is 1-indexed; values ≤0 omit the parameter. Max 50 collaborators per page.

func (*Client) Followers

func (c *Client) Followers(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)

Followers returns the paginated list of users following a project. The response is shaped as a profile.BulkResponse; each entry is a profile object representing the follower. page is 1-indexed; values ≤0 omit the parameter. Max 50 followers per page.

func (*Client) Get

func (c *Client) Get(ctx context.Context, projectId string) (*Project, error)

Get fetches a single project by id.

func (*Client) Profiles

func (c *Client) Profiles(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)

Profiles returns the paginated list of profiles tagged to a project. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 profiles per page.

type Project

type Project struct {
	// ID is the project's id.
	ID string `json:"id,omitempty"`
	// Name is the project's name.
	Name string `json:"name,omitempty"`
	// Description is the project's description.
	Description *string `json:"description,omitempty"`
	// UpdatedAt is the timestamp of when the project was last updated.
	UpdatedAt string `json:"updated_at,omitempty"`
	// CreatedAt is the timestamp of when the project was created.
	CreatedAt string `json:"created_at,omitempty"`
}

Project is Geni's Project resource — a collaborative grouping (e.g. "Ancestors of …", "World War II Veterans").

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL