Documentation
¶
Index ¶
- Variables
- func BaseURL(useSandboxEnv bool) string
- type AddOption
- type Client
- func (c *Client) AddChild(ctx context.Context, profileId string, opts ...AddOption) (*ProfileResponse, error)
- func (c *Client) AddChildToUnion(ctx context.Context, unionId string, opts ...AddOption) (*ProfileResponse, error)
- func (c *Client) AddDocumentComment(ctx context.Context, documentId, text, title string) (*CommentBulkResponse, error)
- func (c *Client) AddDocumentToProject(ctx context.Context, docimentId, projectId string) (*DocumentBulkResponse, error)
- func (c *Client) AddPartner(ctx context.Context, profileId string) (*ProfileResponse, error)
- func (c *Client) AddPartnerToUnion(ctx context.Context, unionId string) (*ProfileResponse, error)
- func (c *Client) AddProfileToProject(ctx context.Context, profileId, projectId string) (*ProfileResponse, error)
- func (c *Client) AddSibling(ctx context.Context, profileId string, opts ...AddOption) (*ProfileResponse, error)
- func (c *Client) CreateDocument(ctx context.Context, request *DocumentRequest) (*DocumentResponse, error)
- func (c *Client) CreateProfile(ctx context.Context, request *ProfileRequest) (*ProfileResponse, error)
- func (c *Client) DeleteDocument(ctx context.Context, documentId string) error
- func (c *Client) DeleteProfile(ctx context.Context, profileId string) error
- func (c *Client) GetAncestors(ctx context.Context, profileId string, opts ...TreeOption) (*FamilyResponse, error)
- func (c *Client) GetDocument(ctx context.Context, documentId string) (*DocumentResponse, error)
- func (c *Client) GetDocumentComments(ctx context.Context, documentId string, page int) (*CommentBulkResponse, error)
- func (c *Client) GetDocumentProjects(ctx context.Context, documentId string, page int) (*ProjectBulkResponse, error)
- func (c *Client) GetDocuments(ctx context.Context, documentIds []string) (*DocumentBulkResponse, error)
- func (c *Client) GetImmediateFamily(ctx context.Context, profileId string) (*FamilyResponse, error)
- func (c *Client) GetManagedProfiles(ctx context.Context, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetPathTo(ctx context.Context, fromId, toId string, opts ...TreeOption) (*PathToResponse, error)
- func (c *Client) GetProfile(ctx context.Context, profileId string) (*ProfileResponse, error)
- func (c *Client) GetProfiles(ctx context.Context, profileIds []string) (*ProfileBulkResponse, error)
- func (c *Client) GetProject(ctx context.Context, projectId string) (*ProjectResponse, error)
- func (c *Client) GetProjectCollaborators(ctx context.Context, projectId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetProjectFollowers(ctx context.Context, projectId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetProjectProfiles(ctx context.Context, projectId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetUnion(ctx context.Context, unionId string) (*UnionResponse, error)
- func (c *Client) GetUnions(ctx context.Context, unionIds []string) (*UnionBulkResponse, error)
- func (c *Client) GetUploadedDocuments(ctx context.Context, page int) (*DocumentBulkResponse, error)
- func (c *Client) MergeProfiles(ctx context.Context, profile1Id, profile2Id string) error
- func (c *Client) SearchProfiles(ctx context.Context, names string, page int) (*ProfileBulkResponse, error)
- func (c *Client) TagDocument(ctx context.Context, documentId, profileId string) (*ProfileBulkResponse, error)
- func (c *Client) UntagDocument(ctx context.Context, documentId, profileId string) (*ProfileBulkResponse, error)
- func (c *Client) UpdateDocument(ctx context.Context, documentId string, request *DocumentRequest) (*DocumentResponse, error)
- func (c *Client) UpdateProfile(ctx context.Context, profileId string, request *ProfileRequest) (*ProfileResponse, error)
- func (c *Client) UpdateUnion(ctx context.Context, unionId string, request *UnionRequest) (*UnionResponse, error)
- func (c *Client) WipeEventDates(ctx context.Context, resourceId string, eventKeys []string) error
- type Comment
- type CommentBulkResponse
- type DateElement
- type DetailsString
- type DocumentBulkResponse
- type DocumentRequest
- type DocumentResponse
- type EventElement
- type FamilyNodes
- type FamilyResponse
- type LocationElement
- type NameElement
- type PathRelation
- type PathStatus
- type PathToResponse
- type PathType
- type ProfileBulkResponse
- type ProfileRequest
- type ProfileResponse
- type ProjectBulkResponse
- type ProjectResponse
- type ResultResponse
- type TreeOption
- type UnionBulkResponse
- type UnionRequest
- type UnionResponse
Constants ¶
This section is empty.
Variables ¶
var ErrAccessDenied = fmt.Errorf("access denied")
var ErrResourceNotFound = fmt.Errorf("resource not found")
Functions ¶
Types ¶
type AddOption ¶
AddOption modifies an outgoing request for the profile/union add-* endpoints (add-child, add-sibling, add-partner).
func WithModifier ¶
WithModifier sets the relationship_modifier query parameter. An empty value is a no-op.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddChildToUnion ¶ added in v0.4.0
func (c *Client) AddChildToUnion(ctx context.Context, unionId string, opts ...AddOption) (*ProfileResponse, error)
AddChildToUnion adds a new child profile to an existing union and returns the newly-created profile. WithModifier selects "adopt" or "foster" to record an adopted/foster relationship — the modifier is stored on the union (in `adopted_children` / `foster_children`), so refetch via Client.GetUnion to confirm it took effect.
func (*Client) AddDocumentComment ¶ added in v0.5.0
func (c *Client) AddDocumentComment(ctx context.Context, documentId, text, title string) (*CommentBulkResponse, error)
AddDocumentComment posts a new comment on a document. text is the comment body and is required by Geni; title is optional and may be the empty string. The response is a CommentBulkResponse — the updated paginated comment list.
func (*Client) AddDocumentToProject ¶
func (*Client) AddPartner ¶
func (*Client) AddPartnerToUnion ¶ added in v0.4.0
AddPartnerToUnion adds a new partner profile to an existing union and returns the newly-created profile. Geni's public docs describe the response as a union, but the live API returns the new partner profile (mirroring the profile-scoped Client.AddPartner); refetch the union via Client.GetUnion if you need the updated partner list.
func (*Client) AddProfileToProject ¶
func (*Client) AddSibling ¶
func (*Client) CreateDocument ¶
func (c *Client) CreateDocument(ctx context.Context, request *DocumentRequest) (*DocumentResponse, error)
func (*Client) CreateProfile ¶
func (c *Client) CreateProfile(ctx context.Context, request *ProfileRequest) (*ProfileResponse, error)
func (*Client) DeleteDocument ¶
func (*Client) DeleteProfile ¶
func (*Client) GetAncestors ¶ added in v0.2.0
func (c *Client) GetAncestors(ctx context.Context, profileId string, opts ...TreeOption) (*FamilyResponse, error)
GetAncestors fetches the ancestor graph rooted at profileId. WithGenerations controls depth; the Geni-documented maximum is 20 generations and values above that are clamped client-side.
Observed behavior on the Geni sandbox (test account, 2026-05-14):
- 403 (surfaced as ErrAccessDenied) for freshly-created profiles, managed profiles, and hand-built parent→child chains.
- `me` as the path id returns 500 ("No action responded to me").
- Sibling endpoints (GetImmediateFamily, GetPathTo) succeed against the same token on the same profiles.
The public docs do not describe an access rule for this endpoint, and Geni publishes no OAuth scope catalog beyond a `read_profile, write_profile` example in /platform/developer/help/oauth_intro. See test/acceptance/ancestors_drill_test.go for the experiment log.
func (*Client) GetDocument ¶
func (*Client) GetDocumentComments ¶ added in v0.5.0
func (c *Client) GetDocumentComments(ctx context.Context, documentId string, page int) (*CommentBulkResponse, error)
GetDocumentComments returns the paginated list of comments on a document. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 comments per page.
func (*Client) GetDocumentProjects ¶ added in v0.5.0
func (c *Client) GetDocumentProjects(ctx context.Context, documentId string, page int) (*ProjectBulkResponse, error)
GetDocumentProjects returns the paginated list of projects a document belongs to. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 projects per page.
func (*Client) GetDocuments ¶
func (*Client) GetImmediateFamily ¶ added in v0.2.0
GetImmediateFamily fetches the one-hop family graph around profileId (parents, partners, children, siblings) as a FamilyResponse. The response's Nodes map is heterogeneous — use FamilyNodes.Profile and FamilyNodes.Union to decode individual entries.
func (*Client) GetManagedProfiles ¶
func (*Client) GetPathTo ¶ added in v0.2.0
func (c *Client) GetPathTo(ctx context.Context, fromId, toId string, opts ...TreeOption) (*PathToResponse, error)
GetPathTo fetches the kinship path between fromId and toId. The call is asynchronous on Geni's side: a PathStatusPending response means the server is still computing and the caller should back off and re-issue. Geni's path-to also has side effects (email + on-site notifications) unless suppressed via WithSkipEmail / WithSkipNotify.
func (*Client) GetProfile ¶
func (*Client) GetProfiles ¶
func (*Client) GetProject ¶
func (*Client) GetProjectCollaborators ¶ added in v0.6.0
func (c *Client) GetProjectCollaborators(ctx context.Context, projectId string, page int) (*ProfileBulkResponse, error)
GetProjectCollaborators returns the paginated list of users who collaborate on a project. The response is shaped as a ProfileBulkResponse; 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) GetProjectFollowers ¶ added in v0.6.0
func (c *Client) GetProjectFollowers(ctx context.Context, projectId string, page int) (*ProfileBulkResponse, error)
GetProjectFollowers returns the paginated list of users following a project. The response is shaped as a ProfileBulkResponse; 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) GetProjectProfiles ¶ added in v0.6.0
func (c *Client) GetProjectProfiles(ctx context.Context, projectId string, page int) (*ProfileBulkResponse, error)
GetProjectProfiles 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.
func (*Client) GetUploadedDocuments ¶
func (*Client) MergeProfiles ¶
func (*Client) SearchProfiles ¶ added in v0.3.0
func (c *Client) SearchProfiles(ctx context.Context, names string, page int) (*ProfileBulkResponse, error)
SearchProfiles performs a name-based profile search against Geni's /profile/search endpoint. The names argument is the free-text query Geni matches against profile names (passed to the upstream `names` query parameter); pass an empty string to omit it. page is 1-indexed and selects which page of results to return — values ≤0 omit the parameter (Geni defaults to page 1).
The response is a ProfileBulkResponse; its Results, Page, NextPage, and PrevPage fields describe the current page and how to navigate forward/backward.
func (*Client) TagDocument ¶
func (*Client) UntagDocument ¶
func (*Client) UpdateDocument ¶
func (c *Client) UpdateDocument(ctx context.Context, documentId string, request *DocumentRequest) (*DocumentResponse, error)
func (*Client) UpdateProfile ¶
func (c *Client) UpdateProfile(ctx context.Context, profileId string, request *ProfileRequest) (*ProfileResponse, error)
func (*Client) UpdateUnion ¶
func (c *Client) UpdateUnion(ctx context.Context, unionId string, request *UnionRequest) (*UnionResponse, error)
func (*Client) WipeEventDates ¶
WipeEventDates issues a targeted PATCH against /api/<resourceId>/update that nulls only the `date` sub-object of each named event (e.g. `birth`, `baptism`, `death`, `burial` on a profile; `marriage` or `divorce` on a union). Geni's API deep-merges nested objects per-key, which means sending `"end_month": null` inside an otherwise-populated `date` is a no-op — the only way to clear individual date sub-fields is to first wipe the whole `date` and then re-PATCH the desired subset (#94).
The request body is hand-crafted to touch only the named events' `date` keys; it deliberately omits `location`, `name`, and `description` to avoid accidentally clearing those alongside the date.
type Comment ¶ added in v0.5.0
type Comment struct {
// Id is the comment's identifier. Not described on the public
// schema page but reliably present in real responses; defensively
// captured so callers can reference individual comments.
Id string `json:"id,omitempty"`
// Comment is the free-text content of the comment.
Comment string `json:"comment,omitempty"`
// Title is the comment's optional title.
Title string `json:"title,omitempty"`
// CreatedAt is the comment's creation timestamp.
CreatedAt string `json:"created_at,omitempty"`
}
Comment is Geni's Comment resource — the body of a single comment returned by document/photo/video comment-listing endpoints.
type CommentBulkResponse ¶ added in v0.5.0
type CommentBulkResponse struct {
Results []Comment `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
CommentBulkResponse is the paginated envelope returned by the `*/comments` and `*/comment` endpoints (document.comments, document.comment, photo.comments, etc.).
type DateElement ¶
type DateElement struct {
// Circa is a boolean that indicates whether the date is approximate
Circa *bool `json:"circa"`
// Day is the day of the month
Day *int32 `json:"day"`
// Month is the month of the year
Month *int32 `json:"month"`
// Year is the year
Year *int32 `json:"year"`
// EndCirca is a boolean that indicates whether the end date is approximate
EndCirca *bool `json:"end_circa"`
// EndDay is the end day of the month (only valid if range is between)
EndDay *int32 `json:"end_day"`
// EndMonth is the end month of the year (only valid if range is between)
EndMonth *int32 `json:"end_month"`
// EndYear is the end year (only valid if range is between)
EndYear *int32 `json:"end_year"`
// Range is the range (before, after, or between)
Range *string `json:"range"`
}
DateElement is the response for a date.
type DetailsString ¶
type DetailsString struct {
// AboutMe is the profile's about me section
AboutMe *string `json:"about_me"`
}
type DocumentBulkResponse ¶
type DocumentBulkResponse struct {
Results []DocumentResponse `json:"results,omitempty"`
Page int `json:"page,omitempty"`
TotalCount int `json:"total_count,omitempty"`
}
type DocumentRequest ¶
type DocumentRequest struct {
// Title is the document's title
Title string `json:"title,omitempty"`
// Description is the document's description
Description *string `json:"description,omitempty"`
// ContentType is the document's content type
ContentType *string `json:"content_type,omitempty"`
// Date is the document's date
Date *DateElement `json:"date,omitempty"`
// Location is the document's location
Location *LocationElement `json:"location,omitempty"`
// Labels is the document's comma separated labels
Labels *string `json:"labels,omitempty"`
// File is the Base64 encoded file to create a document from
File *string `json:"file,omitempty"`
// FileName is the name of the file, required if the file is provided
FileName *string `json:"file_name,omitempty"`
// SourceUrl is the source URL for the document
SourceUrl *string `json:"source_url,omitempty"`
// Text is the text to create a document from
Text *string `json:"text,omitempty"`
}
type DocumentResponse ¶
type DocumentResponse struct {
// Id is the document's id
Id string `json:"id,omitempty"`
// Title is the document's title
Title string `json:"title,omitempty"`
// Description is the document's description
Description *string `json:"description"`
// SourceUrl is the document's source URL
SourceUrl *string `json:"source_url"`
// ContentType is the document's content type
ContentType *string `json:"content_type"`
// Date is the document's date
Date *DateElement `json:"date"`
// Location is the document's location
Location *LocationElement `json:"location,omitempty"`
// Profiles is the list of profiles tagged in the document
Tags []string `json:"tags"`
// Labels is the list of labels associated with the document
Labels []string `json:"labels"`
// UpdatedAt is the timestamp of when the document was last updated
UpdatedAt string `json:"updated_at"`
// CreatedAt is the timestamp of when the document was created
CreatedAt string `json:"created_at"`
}
type EventElement ¶
type EventElement struct {
Date *DateElement `json:"date"`
Description *string `json:"description,omitempty"`
Location *LocationElement `json:"location"`
Name string `json:"name,omitempty"`
}
EventElement is the response for an event.
type FamilyNodes ¶ added in v0.2.0
type FamilyNodes map[string]json.RawMessage
FamilyNodes is the heterogeneous map of related entities returned by Geni's family-graph endpoints (immediate-family, ancestors). Keys are Geni-prefixed ids: "profile-..." or "union-...". Values are stored as raw JSON so callers decode lazily into ProfileResponse or UnionResponse via the accessor methods — this also leaves room for future node kinds (event-, document-, ...) without breaking the map.
func (FamilyNodes) Profile ¶ added in v0.2.0
func (n FamilyNodes) Profile(id string) (*ProfileResponse, error)
Profile decodes the node at id into a ProfileResponse. It errors if id does not name a profile node in the map.
func (FamilyNodes) ProfileIds ¶ added in v0.2.0
func (n FamilyNodes) ProfileIds() []string
ProfileIds returns every map key with the "profile-" prefix.
func (FamilyNodes) Union ¶ added in v0.2.0
func (n FamilyNodes) Union(id string) (*UnionResponse, error)
Union decodes the node at id into a UnionResponse. It errors if id does not name a union node in the map.
func (FamilyNodes) UnionIds ¶ added in v0.2.0
func (n FamilyNodes) UnionIds() []string
UnionIds returns every map key with the "union-" prefix.
type FamilyResponse ¶ added in v0.2.0
type FamilyResponse struct {
Focus *ProfileResponse `json:"focus,omitempty"`
Nodes FamilyNodes `json:"nodes,omitempty"`
}
FamilyResponse is the shape returned by Geni's family-graph endpoints (immediate-family, ancestors). Focus is the profile the call was anchored on, embedded inline by the server. Related profiles and unions live in Nodes.
type LocationElement ¶
type LocationElement struct {
// City is the city name
City *string `json:"city"`
// Country is the country name
Country *string `json:"country"`
// County is the county name
County *string `json:"county"`
// Latitude is the latitude
Latitude *float64 `json:"latitude,omitempty"`
// Longitude is the longitude
Longitude *float64 `json:"longitude,omitempty"`
// PlaceName is the place name
PlaceName *string `json:"place_name"`
// State is the state name
State *string `json:"state"`
// StreetAddress1 is the street address line 1
StreetAddress1 *string `json:"street_address1"`
// StreetAddress2 is the street address line 2
StreetAddress2 *string `json:"street_address2"`
// StreetAddress3 is the street address line 3
StreetAddress3 *string `json:"street_address3"`
}
LocationElement is the response for a location.
type NameElement ¶
type NameElement struct {
// FirstName is the profile's first name
FirstName *string `json:"first_name"`
// LastName is the profile's last name
LastName *string `json:"last_name"`
// MiddleName is the profile's middle name
MiddleName *string `json:"middle_name"`
// MaidenName is the profile's maiden name
MaidenName *string `json:"maiden_name"`
// DisplayName is the profile's display name
DisplayName *string `json:"display_name"`
// Nicknames is the profile's comma-separated list of nicknames
Nicknames *string `json:"nicknames"`
}
NameElement is the response for a name.
type PathRelation ¶ added in v0.2.0
type PathRelation struct {
Id string `json:"id,omitempty"`
Relation string `json:"relation,omitempty"`
NextId string `json:"next_id,omitempty"`
}
PathRelation is one hop along a path-to result.
type PathStatus ¶ added in v0.2.0
type PathStatus string
PathStatus is the server-side computation status of a path-to call. Geni's path-to endpoint may return PathStatusPending for paths that have not been computed yet; the caller is expected to back off and re-issue the same request.
const ( PathStatusPending PathStatus = "pending" PathStatusDone PathStatus = "done" PathStatusOverloaded PathStatus = "overloaded" PathStatusNotFound PathStatus = "not found" )
type PathToResponse ¶ added in v0.2.0
type PathToResponse struct {
Relations []PathRelation `json:"relations,omitempty"`
Relationship string `json:"relationship,omitempty"`
Status PathStatus `json:"status,omitempty"`
}
PathToResponse is the shape returned by Client.GetPathTo. Status must be inspected before treating Relations as authoritative — a PathStatusPending response carries no relations.
type PathType ¶ added in v0.2.0
type PathType string
PathType is the value of the path_type query parameter on Client.GetPathTo.
type ProfileBulkResponse ¶
type ProfileBulkResponse struct {
Results []ProfileResponse `json:"results,omitempty"`
Page int `json:"page,omitempty"`
TotalCount int `json:"total_count,omitempty"`
// NextPage / PrevPage are populated by paginated endpoints
// (search, managed-profiles, …) when more pages are available.
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
type ProfileRequest ¶
type ProfileRequest struct {
// DisplayName is the profile's display name
DisplayName *string `json:"display_name,omitempty"`
// Nicknames is the profile's nicknames
Nicknames []string `json:"nicknames,omitempty"`
// Gender is the profile's gender
Gender *string `json:"gender,omitempty"`
// Names is the name info
Names map[string]NameElement `json:"names,omitempty"`
// Birth is the birth event info
Birth *EventElement `json:"birth,omitempty"`
// Baptism is the baptism event info
Baptism *EventElement `json:"baptism,omitempty"`
// Death is the death event info
Death *EventElement `json:"death,omitempty"`
// CauseOfDeath is the cause of death
CauseOfDeath *string `json:"cause_of_death"`
// Burial is the burial event info
Burial *EventElement `json:"burial,omitempty"`
// IsAlive is a boolean that indicates whether the profile is living
IsAlive bool `json:"is_alive"`
// Title is the profile's name title. Sent without omitempty so that an
// empty string clears any previously-set value (Geni accepts "" as a
// clear sentinel for flat scalar fields).
Title string `json:"title"`
// CurrentResidence is the profile's current residence
CurrentResidence *LocationElement `json:"current_residence"`
// AboutMe is the profile's about me section
AboutMe *string `json:"about_me"`
// DetailStrings are nested maps of locales to details fields (e.g.
// about me) to values. Tagged with omitempty: the Geni API crashes
// (500, Ruby NoMethodError on nil) when a request body contains
// "detail_strings": null. Callers who want to clear all details
// must send an explicit empty map.
DetailStrings map[string]DetailsString `json:"detail_strings,omitempty"`
// Occupation is the profile's occupation. Sent without omitempty — see Title.
Occupation string `json:"occupation"`
// Suffix is the profile's suffix. Sent without omitempty — see Title.
Suffix string `json:"suffix"`
// Public is a boolean that indicates whether the profile is public
Public bool `json:"public"`
// Locked is a boolean that indicates whether the profile is locked down by a curator
Locked bool `json:"locked"`
// MergeNote is the note explaining the profile's merge status
MergeNote []string `json:"merge_note,omitempty"`
}
type ProfileResponse ¶
type ProfileResponse struct {
// Id is the profile's node id
Id string `json:"id,omitempty"`
// Guid is the profile's globally unique identifier
Guid string `json:"guid,omitempty"`
// FirstName is the profile's first name
FirstName *string `json:"first_name,omitempty"`
// LastName is the profile's last name
LastName *string `json:"last_name,omitempty"`
// MiddleName is the profile's middle name
MiddleName *string `json:"middle_name,omitempty"`
// MaidenName is the profile's maiden name
MaidenName *string `json:"maiden_name,omitempty"`
// DisplayName is the profile's display name
DisplayName *string `json:"display_name,omitempty"`
// Nicknames is the profile's nicknames
Nicknames []string `json:"nicknames,omitempty"`
// Gender is the profile's gender
Gender *string `json:"gender,omitempty"`
// Names is the name info
Names map[string]NameElement `json:"names,omitempty"`
// Birth is the birth event info
Birth *EventElement `json:"birth,omitempty"`
// Baptism is the baptism event info
Baptism *EventElement `json:"baptism,omitempty"`
// Death is the death event info
Death *EventElement `json:"death,omitempty"`
// CauseOfDeath is the cause of death
CauseOfDeath *string `json:"cause_of_death,omitempty"`
// Burial is the burial event info
Burial *EventElement `json:"burial,omitempty"`
// Events is the events associated with this profile
Events []EventElement `json:"events,omitempty"`
// IsAlive is a boolean that indicates whether the profile is living
IsAlive bool `json:"is_alive"`
// Title is the profile's name title
Title string `json:"title,omitempty"`
// CurrentResidence is the profile's current residence
CurrentResidence *LocationElement `json:"current_residence"`
// AboutMe is the profile's about me section
AboutMe *string `json:"about_me,omitempty"`
// DetailStrings are nested maps of locales to details fields (e.g. about me) to values
DetailStrings map[string]DetailsString `json:"detail_strings,omitempty"`
// Occupation is the profile's occupation
Occupation string `json:"occupation,omitempty"`
// Suffix is the profile's suffix
Suffix string `json:"suffix,omitempty"`
// Public is a boolean that indicates whether the profile is public
Public bool `json:"public"`
// Locked is a boolean that indicates whether the profile is locked down by a curator
Locked bool `json:"locked"`
// Language is the profile's language
Language string `json:"language,omitempty"`
// ProfileUrl is the URL to access profile in a browser
ProfileUrl string `json:"profile_url,omitempty"`
// MergePending is a boolean that indicates whether the profile has a pending merge
MergePending bool `json:"merge_pending,omitempty"`
// MergedInto is the ID of the profile this profile is currently merged into
MergedInto string `json:"merged_into,omitempty"`
// MergeNote is the note explaining the profile's merge status
MergeNote []string `json:"merge_note,omitempty"`
// Url is the URL to access profile through the API
Url string `json:"url,omitempty"`
// Unions is the URLs to unions
Unions []string `json:"unions,omitempty"`
// Projects are the IDs of projects this profile is a member of
Projects []string `json:"project_ids,omitempty"`
// Deleted is a boolean that indicates whether the profile is deleted
Deleted bool `json:"deleted"`
// UpdatedAt is the timestamp of when the profile was last updated
UpdatedAt string `json:"updated_at,omitempty"`
// CreatedAt is the timestamp of when the profile was created
CreatedAt string `json:"created_at,omitempty"`
}
type ProjectBulkResponse ¶
type ProjectBulkResponse struct {
Results []ProjectResponse `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
type ProjectResponse ¶
type ProjectResponse struct {
// The project's id
Id string `json:"id,omitempty"`
// The project's name
Name string `json:"name,omitempty"`
// 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"`
}
type ResultResponse ¶
type ResultResponse struct {
Result string `json:"result,omitempty"`
}
type TreeOption ¶ added in v0.2.0
TreeOption customises an outgoing request for the family-graph and path-to endpoints. Options only set the parameters they understand; passing an option to a method that doesn't honor it is harmless.
func WithGenerations ¶ added in v0.2.0
func WithGenerations(n int) TreeOption
WithGenerations sets the generations query parameter on Client.GetAncestors. Values ≤0 are a no-op; values >20 are clamped to 20 (the Geni-documented maximum).
func WithPathType ¶ added in v0.2.0
func WithPathType(t PathType) TreeOption
WithPathType sets the path_type query parameter on Client.GetPathTo. An empty value is a no-op (Geni defaults to "closest").
func WithRefresh ¶ added in v0.2.0
func WithRefresh(v bool) TreeOption
WithRefresh forces a recomputation of a path-to result. The flag is only emitted when v is true.
func WithSearch ¶ added in v0.2.0
func WithSearch(v bool) TreeOption
WithSearch toggles the path-to search behavior. Geni defaults to true, so the parameter is only emitted when v is false (i.e. to opt out).
func WithSkipEmail ¶ added in v0.2.0
func WithSkipEmail(v bool) TreeOption
WithSkipEmail suppresses the email notification path-to would otherwise send. Only emitted when v is true.
func WithSkipNotify ¶ added in v0.2.0
func WithSkipNotify(v bool) TreeOption
WithSkipNotify suppresses the on-site notification path-to would otherwise send. Only emitted when v is true.
type UnionBulkResponse ¶
type UnionBulkResponse struct {
Results []UnionResponse `json:"results,omitempty"`
}
type UnionRequest ¶
type UnionRequest struct {
// Marriage date and location
Marriage *EventElement `json:"marriage,omitempty"`
// Divorce date and location
Divorce *EventElement `json:"divorce,omitempty"`
}
type UnionResponse ¶
type UnionResponse struct {
// The union's id
Id string `json:"id,omitempty"`
// AdoptedChildren is a subset of the children array, indicating which children are adopted
AdoptedChildren []string `json:"adopted_children,omitempty"`
// Children is an array of children in the union (urls or ids, if requested)
Children []string `json:"children,omitempty"`
// FosterChildren is a subset of the children array, indicating which children are foster
FosterChildren []string `json:"foster_children,omitempty"`
// Partners is an array of partners in the union (urls or ids, if requested)
Partners []string `json:"partners,omitempty"`
// Marriage date and location
Marriage *EventElement `json:"marriage,omitempty"`
// Divorce date and location
Divorce *EventElement `json:"divorce,omitempty"`
// Status of the union (spouse|ex_spouse)
Status string `json:"status,omitempty"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
getprofile
command
Command getprofile is a minimal smoke example that constructs a go-geni Client against the sandbox and fetches a single profile.
|
Command getprofile is a minimal smoke example that constructs a go-geni Client against the sandbox and fetches a single profile. |