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) AddParent(ctx context.Context, profileId string, request *ProfileRequest, ...) (*ProfileResponse, 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) AddPhotoComment(ctx context.Context, photoId, text, title string) (*CommentBulkResponse, error)
- func (c *Client) AddProfileDocument(ctx context.Context, profileId string, request *DocumentRequest) (*DocumentResponse, error)
- func (c *Client) AddProfileMugshot(ctx context.Context, profileId string, request *MugshotRequest) (*PhotoResponse, error)
- func (c *Client) AddProfilePhoto(ctx context.Context, profileId string, request *PhotoRequest) (*PhotoResponse, error)
- func (c *Client) AddProfileToProject(ctx context.Context, profileId, projectId string) (*ProfileResponse, error)
- func (c *Client) AddProfileVideo(ctx context.Context, profileId string, request *VideoRequest) (*VideoResponse, error)
- func (c *Client) AddSibling(ctx context.Context, profileId string, opts ...AddOption) (*ProfileResponse, error)
- func (c *Client) AddVideoComment(ctx context.Context, videoId, text, title string) (*CommentBulkResponse, error)
- func (c *Client) CompareProfiles(ctx context.Context, profile1Id, profile2Id string) (*ProfileComparison, error)
- func (c *Client) CreateDocument(ctx context.Context, request *DocumentRequest) (*DocumentResponse, error)
- func (c *Client) CreatePhoto(ctx context.Context, title, fileName string, file io.Reader, ...) (*PhotoResponse, error)
- func (c *Client) CreateProfile(ctx context.Context, request *ProfileRequest) (*ProfileResponse, error)
- func (c *Client) CreateVideo(ctx context.Context, title, fileName string, file io.Reader, ...) (*VideoResponse, error)
- func (c *Client) DeleteDocument(ctx context.Context, documentId string) error
- func (c *Client) DeletePhoto(ctx context.Context, photoId string) error
- func (c *Client) DeleteProfile(ctx context.Context, profileId string) error
- func (c *Client) DeleteVideo(ctx context.Context, videoId string) error
- func (c *Client) FollowProfile(ctx context.Context, profileId string) (*ProfileResponse, 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) GetDocumentTags(ctx context.Context, documentId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetDocuments(ctx context.Context, documentIds []string) (*DocumentBulkResponse, error)
- func (c *Client) GetFollowedDocuments(ctx context.Context, page int) (*DocumentBulkResponse, error)
- func (c *Client) GetFollowedProfiles(ctx context.Context, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetFollowedProjects(ctx context.Context, page int) (*ProjectBulkResponse, error)
- func (c *Client) GetFollowedSurnames(ctx context.Context, page int) (*SurnameBulkResponse, 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) GetMaxFamily(ctx context.Context, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetMetadata(ctx context.Context, userIds ...string) (*Metadata, error)
- func (c *Client) GetMyAlbums(ctx context.Context, page int) (*PhotoAlbumBulkResponse, error)
- func (c *Client) GetMyLabels(ctx context.Context, page int) (*LabelsResponse, error)
- func (c *Client) GetPathTo(ctx context.Context, fromId, toId string, opts ...TreeOption) (*PathToResponse, error)
- func (c *Client) GetPhoto(ctx context.Context, photoId string) (*PhotoResponse, error)
- func (c *Client) GetPhotoComments(ctx context.Context, photoId string, page int) (*CommentBulkResponse, error)
- func (c *Client) GetPhotoTags(ctx context.Context, photoId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetPhotos(ctx context.Context, photoIds []string) (*PhotoBulkResponse, error)
- func (c *Client) GetProfile(ctx context.Context, profileId string) (*ProfileResponse, error)
- func (c *Client) GetProfileDocuments(ctx context.Context, profileId string, page int) (*DocumentBulkResponse, error)
- func (c *Client) GetProfilePhotos(ctx context.Context, profileId string, page int) (*PhotoBulkResponse, 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) GetRevision(ctx context.Context, revisionId string) (*Revision, error)
- func (c *Client) GetRevisions(ctx context.Context, revisionIds []string) (*RevisionBulkResponse, error)
- func (c *Client) GetStats(ctx context.Context) (*StatsResponse, error)
- func (c *Client) GetSurname(ctx context.Context, surnameId string) (*Surname, error)
- func (c *Client) GetSurnameFollowers(ctx context.Context, surnameId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetSurnameProfiles(ctx context.Context, surnameId 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) GetUploadedPhotos(ctx context.Context, page int) (*PhotoBulkResponse, error)
- func (c *Client) GetUploadedVideos(ctx context.Context, page int) (*VideoBulkResponse, error)
- func (c *Client) GetUser(ctx context.Context) (*User, error)
- func (c *Client) GetVideo(ctx context.Context, videoId string) (*VideoResponse, error)
- func (c *Client) GetVideoComments(ctx context.Context, videoId string, page int) (*CommentBulkResponse, error)
- func (c *Client) GetVideoTags(ctx context.Context, videoId string, page int) (*ProfileBulkResponse, error)
- func (c *Client) GetVideos(ctx context.Context, videoIds []string) (*VideoBulkResponse, 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) TagPhoto(ctx context.Context, photoId, profileId string) (*PhotoResponse, error)
- func (c *Client) TagVideo(ctx context.Context, videoId, profileId string) (*VideoResponse, error)
- func (c *Client) UnfollowProfile(ctx context.Context, profileId string) (*ProfileResponse, error)
- func (c *Client) UntagDocument(ctx context.Context, documentId, profileId string) (*ProfileBulkResponse, error)
- func (c *Client) UntagPhoto(ctx context.Context, photoId, profileId string) (*PhotoResponse, error)
- func (c *Client) UntagVideo(ctx context.Context, videoId, profileId string) (*VideoResponse, error)
- func (c *Client) UpdateDocument(ctx context.Context, documentId string, request *DocumentRequest) (*DocumentResponse, error)
- func (c *Client) UpdateMetadata(ctx context.Context, data json.RawMessage) (*Metadata, error)
- func (c *Client) UpdatePhoto(ctx context.Context, photoId string, request *PhotoRequest) (*PhotoResponse, error)
- func (c *Client) UpdateProfile(ctx context.Context, profileId string, request *ProfileRequest) (*ProfileResponse, error)
- func (c *Client) UpdateProfileBasics(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) UpdateVideo(ctx context.Context, videoId string, request *VideoRequest) (*VideoResponse, error)
- func (c *Client) WipeEventDates(ctx context.Context, resourceId string, eventKeys []string) error
- type Comment
- type CommentBulkResponse
- type CreatePhotoOption
- type CreateVideoOption
- type DateElement
- type DetailsString
- type DocumentBulkResponse
- type DocumentRequest
- type DocumentResponse
- type EventElement
- type FamilyNodes
- type FamilyResponse
- type LabelsResponse
- type LocationElement
- type Metadata
- type MugshotRequest
- type NameElement
- type PathRelation
- type PathStatus
- type PathToResponse
- type PathType
- type PhotoAlbum
- type PhotoAlbumBulkResponse
- type PhotoBulkResponse
- type PhotoRequest
- type PhotoResponse
- type ProfileBulkResponse
- type ProfileComparison
- type ProfileRequest
- type ProfileResponse
- type ProjectBulkResponse
- type ProjectResponse
- type ResultResponse
- type Revision
- type RevisionBulkResponse
- type StatsResponse
- type Surname
- type SurnameBulkResponse
- type TreeOption
- type UnionBulkResponse
- type UnionRequest
- type UnionResponse
- type User
- type VideoBulkResponse
- type VideoRequest
- type VideoResponse
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) AddParent ¶ added in v0.14.0
func (c *Client) AddParent(ctx context.Context, profileId string, request *ProfileRequest, opts ...AddOption) (*ProfileResponse, error)
AddParent creates and attaches a new parent profile to the named profile. The request body is the same shape as CreateProfile — names, gender, birth, death, etc. WithModifier("adopt" | "foster") records an adopted or foster relationship.
Counterpart to AddChild / AddPartner / AddSibling.
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) AddPhotoComment ¶ added in v0.7.0
func (c *Client) AddPhotoComment(ctx context.Context, photoId, text, title string) (*CommentBulkResponse, error)
AddPhotoComment posts a new comment on a photo. text is required by Geni; title is optional. The response is a CommentBulkResponse — the updated paginated comment list (sandbox behaviour varies: see the analogous note on AddDocumentComment).
func (*Client) AddProfileDocument ¶ added in v0.14.0
func (c *Client) AddProfileDocument(ctx context.Context, profileId string, request *DocumentRequest) (*DocumentResponse, error)
AddProfileDocument attaches a new document to a profile. Returns the created Document. Accepts the same DocumentRequest used by Client.CreateDocument — text/file/source_url are mutually exclusive content sources.
func (*Client) AddProfileMugshot ¶ added in v0.14.0
func (c *Client) AddProfileMugshot(ctx context.Context, profileId string, request *MugshotRequest) (*PhotoResponse, error)
AddProfileMugshot sets a profile's mugshot — either by uploading a new image (MugshotRequest.File, Base64) or by reusing an existing photo (MugshotRequest.PhotoId).
func (*Client) AddProfilePhoto ¶ added in v0.14.0
func (c *Client) AddProfilePhoto(ctx context.Context, profileId string, request *PhotoRequest) (*PhotoResponse, error)
AddProfilePhoto attaches a new photo to a profile. Returns the created Photo. Unlike Client.CreatePhoto (which uses multipart/form-data), this endpoint takes a JSON body with the file encoded as Base64 in PhotoRequest.File.
func (*Client) AddProfileToProject ¶
func (*Client) AddProfileVideo ¶ added in v0.14.0
func (c *Client) AddProfileVideo(ctx context.Context, profileId string, request *VideoRequest) (*VideoResponse, error)
AddProfileVideo attaches a new video to a profile. Returns the created Video. Unlike Client.CreateVideo (which uses multipart/form-data), this endpoint takes a JSON body with the file encoded as Base64 in VideoRequest.File.
func (*Client) AddSibling ¶
func (*Client) AddVideoComment ¶ added in v0.11.0
func (c *Client) AddVideoComment(ctx context.Context, videoId, text, title string) (*CommentBulkResponse, error)
AddVideoComment posts a new comment on a video. Mirrors Client.AddPhotoComment.
func (*Client) CompareProfiles ¶ added in v0.14.0
func (c *Client) CompareProfiles(ctx context.Context, profile1Id, profile2Id string) (*ProfileComparison, error)
CompareProfiles fetches the immediate-family graphs of both profiles in a single call. The returned Results slice has two entries, one per profile, in the order they were requested.
func (*Client) CreateDocument ¶
func (c *Client) CreateDocument(ctx context.Context, request *DocumentRequest) (*DocumentResponse, error)
func (*Client) CreatePhoto ¶ added in v0.7.0
func (c *Client) CreatePhoto(ctx context.Context, title, fileName string, file io.Reader, opts ...CreatePhotoOption) (*PhotoResponse, error)
CreatePhoto uploads an image to Geni and returns the resulting photo's metadata. The endpoint requires multipart/form-data; the client builds the body from the supplied io.Reader and filename so callers can stream large files without first buffering them as base64 or strings.
Both title and a non-nil file are required by Geni; passing an empty title or nil file is rejected client-side before the request is sent.
func (*Client) CreateProfile ¶
func (c *Client) CreateProfile(ctx context.Context, request *ProfileRequest) (*ProfileResponse, error)
func (*Client) CreateVideo ¶ added in v0.11.0
func (c *Client) CreateVideo(ctx context.Context, title, fileName string, file io.Reader, opts ...CreateVideoOption) (*VideoResponse, error)
CreateVideo uploads a new video to Geni. The endpoint expects multipart/form-data; the client builds the body from the supplied io.Reader and filename so callers can stream large files.
Sandbox observation (contradicting the public docs, which list `file` as optional): /video/add rejects requests without a file part with `400 {"message":"key not found: file"}`, and the server runs the uploaded bytes through ffmpeg to validate the format — arbitrary byte payloads get rejected with a 500 ApiException ("Could not get the duration"). In practice you need a real encoded video file. `title` is required by Geni and is enforced client-side; `file` and `fileName` may be nil/empty but expect the server to reject the call.
func (*Client) DeleteDocument ¶
func (*Client) DeletePhoto ¶ added in v0.7.0
DeletePhoto deletes a photo by id.
func (*Client) DeleteProfile ¶
func (*Client) DeleteVideo ¶ added in v0.11.0
DeleteVideo deletes a video by id.
func (*Client) FollowProfile ¶ added in v0.14.0
FollowProfile makes the calling user follow the named profile. Returns the followed profile.
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) GetDocumentTags ¶ added in v0.16.0
func (c *Client) GetDocumentTags(ctx context.Context, documentId string, page int) (*ProfileBulkResponse, error)
GetDocumentTags returns the paginated list of profiles tagged in a document. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 tags per page. Symmetric with Client.GetPhotoTags.
func (*Client) GetDocuments ¶
func (*Client) GetFollowedDocuments ¶ added in v0.15.0
GetFollowedDocuments returns the paginated list of documents the authenticated user follows.
func (*Client) GetFollowedProfiles ¶ added in v0.15.0
GetFollowedProfiles returns the paginated list of profiles the authenticated user follows. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 per page.
func (*Client) GetFollowedProjects ¶ added in v0.15.0
GetFollowedProjects returns the paginated list of projects the authenticated user follows.
func (*Client) GetFollowedSurnames ¶ added in v0.15.0
GetFollowedSurnames returns the paginated list of surnames the authenticated user follows.
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) GetMaxFamily ¶ added in v0.15.0
GetMaxFamily returns the paginated list of profiles in the user's "max family" — Geni's term for the set of relatives the user can see at maximum depth.
func (*Client) GetMetadata ¶ added in v0.15.0
GetMetadata returns the authenticated user's application-specific metadata (the JSON blob previously stored via UpdateMetadata).
If userIds is non-empty, the call requests metadata for those user ids instead of the calling user — Geni's docs describe the ids parameter as "Comma separated list of ids of users you would like to get metadata for".
func (*Client) GetMyAlbums ¶ added in v0.15.0
GetMyAlbums returns the paginated list of the authenticated user's photo albums.
func (*Client) GetMyLabels ¶ added in v0.15.0
GetMyLabels returns the paginated list of label strings the authenticated user has applied to their tree.
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) GetPhotoComments ¶ added in v0.7.0
func (c *Client) GetPhotoComments(ctx context.Context, photoId string, page int) (*CommentBulkResponse, error)
GetPhotoComments returns the paginated list of comments on a photo. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 comments per page.
func (*Client) GetPhotoTags ¶ added in v0.7.0
func (c *Client) GetPhotoTags(ctx context.Context, photoId string, page int) (*ProfileBulkResponse, error)
GetPhotoTags returns the paginated list of profiles tagged in a photo. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 tags per page.
func (*Client) GetPhotos ¶ added in v0.7.0
GetPhotos fetches multiple photos in a single bulk request.
func (*Client) GetProfile ¶
func (*Client) GetProfileDocuments ¶ added in v0.9.0
func (c *Client) GetProfileDocuments(ctx context.Context, profileId string, page int) (*DocumentBulkResponse, error)
GetProfileDocuments returns the paginated list of documents attached to a profile. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 per page.
func (*Client) GetProfilePhotos ¶ added in v0.9.0
func (c *Client) GetProfilePhotos(ctx context.Context, profileId string, page int) (*PhotoBulkResponse, error)
GetProfilePhotos returns the paginated list of photos attached to a profile. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 per page.
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) GetRevision ¶ added in v0.12.0
GetRevision fetches a single revision by id.
func (*Client) GetRevisions ¶ added in v0.12.0
func (c *Client) GetRevisions(ctx context.Context, revisionIds []string) (*RevisionBulkResponse, error)
GetRevisions fetches multiple revisions in one call. Mirrors the single-id bulk fallback used by the other bulk Get* methods — when len(ids) == 1 the request goes through the singular GetRevision path so Geni's bulk dispatcher quirk doesn't return empty results.
func (*Client) GetStats ¶ added in v0.12.0
func (c *Client) GetStats(ctx context.Context) (*StatsResponse, error)
GetStats fetches the platform-wide statistics list. The shape of individual entries is opaque to the client — see StatsResponse.Stats.
func (*Client) GetSurname ¶ added in v0.12.0
GetSurname fetches a single surname by id.
func (*Client) GetSurnameFollowers ¶ added in v0.12.0
func (c *Client) GetSurnameFollowers(ctx context.Context, surnameId string, page int) (*ProfileBulkResponse, error)
GetSurnameFollowers returns the paginated list of profiles following a surname. page is 1-indexed; values ≤0 omit the parameter. Max 50 per page.
func (*Client) GetSurnameProfiles ¶ added in v0.12.0
func (c *Client) GetSurnameProfiles(ctx context.Context, surnameId string, page int) (*ProfileBulkResponse, error)
GetSurnameProfiles returns the paginated list of profiles associated with a surname. page is 1-indexed; values ≤0 omit the parameter. Max 50 per page.
func (*Client) GetUploadedDocuments ¶
func (*Client) GetUploadedPhotos ¶ added in v0.15.0
GetUploadedPhotos returns the paginated list of photos the authenticated user has uploaded.
func (*Client) GetUploadedVideos ¶ added in v0.15.0
GetUploadedVideos returns the paginated list of videos the authenticated user has uploaded.
func (*Client) GetUser ¶ added in v0.8.0
GetUser returns the authenticated user — the account behind the OAuth token. Use this to ground "me" in API workflows that need to know who's calling (e.g. to filter Client.GetManagedProfiles results to ones the calling user actually owns).
func (*Client) GetVideoComments ¶ added in v0.11.0
func (c *Client) GetVideoComments(ctx context.Context, videoId string, page int) (*CommentBulkResponse, error)
GetVideoComments returns the paginated list of comments on a video. Mirrors Client.GetPhotoComments.
func (*Client) GetVideoTags ¶ added in v0.11.0
func (c *Client) GetVideoTags(ctx context.Context, videoId string, page int) (*ProfileBulkResponse, error)
GetVideoTags returns the paginated list of profiles tagged in a video. Mirrors Client.GetPhotoTags.
func (*Client) GetVideos ¶ added in v0.11.0
GetVideos fetches multiple videos in a single bulk request.
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) TagPhoto ¶ added in v0.7.0
TagPhoto associates a profile with a photo. Returns the updated photo (its `tags` list will include profileId).
func (*Client) UnfollowProfile ¶ added in v0.14.0
UnfollowProfile reverses FollowProfile. Returns the unfollowed profile.
func (*Client) UntagDocument ¶
func (*Client) UntagPhoto ¶ added in v0.7.0
UntagPhoto removes a profile-tag from a photo. Returns the updated photo.
func (*Client) UntagVideo ¶ added in v0.11.0
UntagVideo removes a profile-tag from a video.
func (*Client) UpdateDocument ¶
func (c *Client) UpdateDocument(ctx context.Context, documentId string, request *DocumentRequest) (*DocumentResponse, error)
func (*Client) UpdateMetadata ¶ added in v0.15.0
UpdateMetadata replaces the authenticated user's application- specific metadata with the supplied JSON blob. The data is opaque to the client — Geni stores whatever the caller sends.
Wire detail: Geni's /user/update-metadata expects the `data` field as a JSON-encoded *string*, not as a nested object (sending it as an object returns a 500 "no implicit conversion of ActionController::Parameters into String"). The client serialises the supplied RawMessage to a string before sending.
func (*Client) UpdatePhoto ¶ added in v0.7.0
func (c *Client) UpdatePhoto(ctx context.Context, photoId string, request *PhotoRequest) (*PhotoResponse, error)
UpdatePhoto mutates the photo's title / description / date. Body is JSON-encoded the same way as profile / document / union update endpoints, and runs through escapeStringToUTF so non-ASCII text survives the API's UTF-8 handling.
func (*Client) UpdateProfile ¶
func (c *Client) UpdateProfile(ctx context.Context, profileId string, request *ProfileRequest) (*ProfileResponse, error)
func (*Client) UpdateProfileBasics ¶ added in v0.14.0
func (c *Client) UpdateProfileBasics(ctx context.Context, profileId string, request *ProfileRequest) (*ProfileResponse, error)
UpdateProfileBasics updates the "basics and about" subset of profile fields — a narrower target than UpdateProfile. The request body uses the same ProfileRequest shape but only fields in the basics/about scope take effect.
func (*Client) UpdateUnion ¶
func (c *Client) UpdateUnion(ctx context.Context, unionId string, request *UnionRequest) (*UnionResponse, error)
func (*Client) UpdateVideo ¶ added in v0.11.0
func (c *Client) UpdateVideo(ctx context.Context, videoId string, request *VideoRequest) (*VideoResponse, error)
UpdateVideo mutates the video's title / description / date. Body is JSON-encoded and run through escapeStringToUTF for UTF-8 safety, matching the other update endpoints in the package.
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 CreatePhotoOption ¶ added in v0.7.0
type CreatePhotoOption func(*createPhotoOptions)
CreatePhotoOption customises an outgoing CreatePhoto request.
func WithPhotoAlbum ¶ added in v0.7.0
func WithPhotoAlbum(albumId string) CreatePhotoOption
WithPhotoAlbum places the new photo in the specified album.
func WithPhotoDate ¶ added in v0.7.0
func WithPhotoDate(date string) CreatePhotoOption
WithPhotoDate sets the photo's date. Geni accepts a free-form date string here (the public docs describe it as "Date in JSON format" without specifying); callers should consult Geni's docs for the exact format they expect.
func WithPhotoDescription ¶ added in v0.7.0
func WithPhotoDescription(desc string) CreatePhotoOption
WithPhotoDescription sets the photo's description on upload.
type CreateVideoOption ¶ added in v0.11.0
type CreateVideoOption func(*createVideoOptions)
CreateVideoOption customises an outgoing CreateVideo request.
func WithVideoDate ¶ added in v0.11.0
func WithVideoDate(date string) CreateVideoOption
WithVideoDate sets the video's date. Geni accepts a free-form date string here (the public docs describe it as "Date in JSON form" without specifying); callers should consult Geni's docs for the exact format they expect.
func WithVideoDescription ¶ added in v0.11.0
func WithVideoDescription(desc string) CreateVideoOption
WithVideoDescription sets the video's description on upload.
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"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,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 LabelsResponse ¶ added in v0.15.0
type LabelsResponse struct {
Results []string `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
LabelsResponse is the paginated envelope returned by Client.GetMyLabels. Each result is a label string — Geni's docs describe my-labels' results as "Array of Strings".
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 Metadata ¶ added in v0.15.0
type Metadata struct {
Data json.RawMessage `json:"data,omitempty"`
}
Metadata is Geni's /user/metadata response. Data is the application-specific JSON blob the caller previously stored via Client.UpdateMetadata; the client leaves it as a raw message so callers can unmarshal into whatever structure their app uses.
type MugshotRequest ¶ added in v0.14.0
type MugshotRequest struct {
// File is the Base64-encoded image to upload as the mugshot.
// Mutually exclusive with PhotoId; required when PhotoId is not
// set.
File *string `json:"file,omitempty"`
// PhotoId reuses an existing photo as the mugshot. Mutually
// exclusive with File; required when File is not set.
PhotoId *string `json:"photo_id,omitempty"`
// Title, Description, Date, AlbumId are all optional.
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
Date *string `json:"date,omitempty"`
AlbumId *string `json:"album_id,omitempty"`
}
MugshotRequest is the JSON-encoded body for Client.AddProfileMugshot. Either File or PhotoId is required — File uploads a new image via Base64 (the JSON path; not the multipart one), PhotoId reuses an existing photo as the mugshot.
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 PhotoAlbum ¶ added in v0.15.0
type PhotoAlbum struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Url string `json:"url,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
PhotoAlbum is Geni's PhotoAlbum resource — a container for related photos. Currently used as the result type of Client.GetMyAlbums; the standalone PhotoAlbum CRUD endpoints (add/photos/update) are not yet implemented in this client. The fields below are the commonly-returned ones from the my-albums listing; the JSON decoder is permissive (extra fields are silently ignored) so a richer PhotoAlbum that ships later can extend the struct without breaking callers.
type PhotoAlbumBulkResponse ¶ added in v0.15.0
type PhotoAlbumBulkResponse struct {
Results []PhotoAlbum `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
PhotoAlbumBulkResponse is the paginated envelope returned by Client.GetMyAlbums.
type PhotoBulkResponse ¶ added in v0.7.0
type PhotoBulkResponse struct {
Results []PhotoResponse `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
PhotoBulkResponse is the envelope returned by Client.GetPhotos and the paginated `*/photos` listings (profile.photos, album.photos, etc.).
type PhotoRequest ¶ added in v0.7.0
type PhotoRequest struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Date string `json:"date,omitempty"`
File *string `json:"file,omitempty"`
}
PhotoRequest is the JSON-encoded body for Client.UpdatePhoto and Client.AddProfilePhoto. All fields are optional; omitted fields leave the existing value in place (for Update) or aren't sent at all (for AddProfilePhoto).
File is the Base64-encoded image content. It's only meaningful for AddProfilePhoto — UpdatePhoto ignores it. Note that the /photo/add multipart endpoint (Client.CreatePhoto) uses a streaming io.Reader instead; this struct's File field is only for the JSON-body /profile/{id}/add-photo path.
type PhotoResponse ¶ added in v0.7.0
type PhotoResponse struct {
// Id is the photo's identifier.
Id string `json:"id,omitempty"`
// Guid is the photo's legacy global identifier.
Guid string `json:"guid,omitempty"`
// AlbumId is the id of the album containing the photo.
AlbumId string `json:"album_id,omitempty"`
// Title is the photo's title.
Title string `json:"title,omitempty"`
// Description is the photo's description.
Description string `json:"description,omitempty"`
// Date is the photo's date, as returned by Geni (string format).
Date string `json:"date,omitempty"`
// Attribution is the photo's attribution string.
Attribution string `json:"attribution,omitempty"`
// ContentType is the original MIME type of the upload.
ContentType string `json:"content_type,omitempty"`
// Location is the photo's optional location.
Location *LocationElement `json:"location,omitempty"`
// Tags is the list of profiles tagged in the photo (urls or ids
// depending on the `only_ids` query parameter).
Tags []string `json:"tags,omitempty"`
// Sizes maps Geni-defined size names (e.g. "small", "medium",
// "large") to fully-qualified image URLs. The exact set of keys
// varies by upload.
Sizes map[string]string `json:"sizes,omitempty"`
// Url is the API URL for the photo.
Url string `json:"url,omitempty"`
// CreatedAt / UpdatedAt are the resource lifecycle timestamps.
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
PhotoResponse is Geni's Photo resource — a single uploaded image with metadata and tagging.
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 ProfileComparison ¶ added in v0.14.0
type ProfileComparison struct {
Results []FamilyResponse `json:"results,omitempty"`
}
ProfileComparison is the response shape of Client.CompareProfiles. Geni returns immediate-family graphs for both profiles in one call; each Results entry mirrors what GetImmediateFamily would return for one of the two profiles, in the order requested.
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 Revision ¶ added in v0.12.0
type Revision struct {
// Id is the revision's identifier.
Id string `json:"id,omitempty"`
// Guid is the revision's globally unique identifier.
Guid string `json:"guid,omitempty"`
// Action describes what the revision did.
Action string `json:"action,omitempty"`
// DateLocal is the date of the revision in the local timezone.
DateLocal string `json:"date_local,omitempty"`
// TimeLocal is the time of the revision in the local timezone.
TimeLocal string `json:"time_local,omitempty"`
// Timestamp is the server-time timestamp.
Timestamp string `json:"timestamp,omitempty"`
// Story is an HTML rendering of the full revision description.
Story string `json:"story,omitempty"`
}
Revision is Geni's Revision resource — a single edit in a profile or tree's history.
type RevisionBulkResponse ¶ added in v0.12.0
type RevisionBulkResponse struct {
Results []Revision `json:"results,omitempty"`
}
RevisionBulkResponse is the envelope returned by Client.GetRevisions.
type StatsResponse ¶ added in v0.12.0
type StatsResponse struct {
Stats []json.RawMessage `json:"stats,omitempty"`
}
StatsResponse is Geni's /stats response — an opaque list of "available statistics". The public docs describe the response as an array of hashes without enumerating fields, so each entry is kept as a raw JSON message; callers decode the specific stats they care about.
type Surname ¶ added in v0.12.0
type Surname struct {
// Id is the surname's identifier.
Id string `json:"id,omitempty"`
// Description is the surname's free-text description.
Description string `json:"description,omitempty"`
// SluggedName is the surname rendered as a URL-safe slug (e.g.
// "smith" for "Smith").
SluggedName string `json:"slugged_name,omitempty"`
// Url is the API URL for the surname.
Url string `json:"url,omitempty"`
}
Surname is Geni's Surname resource — a tag for a family name. Used as the parent for surname-scoped collections (followers, profiles).
type SurnameBulkResponse ¶ added in v0.15.0
type SurnameBulkResponse struct {
Results []Surname `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
SurnameBulkResponse is the paginated envelope returned by Client.GetFollowedSurnames (and a natural home for any future surname-bulk endpoints).
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"`
}
type User ¶ added in v0.8.0
type User struct {
// Id is the user's identifier.
Id string `json:"id,omitempty"`
// Guid is the user's globally unique identifier.
Guid string `json:"guid,omitempty"`
// Name is the user's display name.
Name string `json:"name,omitempty"`
// AccountType is the subscription tier: "basic", "plus", or "pro".
AccountType string `json:"account_type,omitempty"`
}
User is Geni's User resource — the authenticated user's account. Distinct from ProfileResponse (which describes a node in the tree); a single account may manage many profiles.
The public docs list only `name` and `account_type` on this object, and the sandbox returns exactly those two — Id and Guid below are captured defensively in case production differs, but you should not depend on them being populated. The JSON decoder is permissive (extra fields are silently ignored).
type VideoBulkResponse ¶ added in v0.11.0
type VideoBulkResponse struct {
Results []VideoResponse `json:"results,omitempty"`
}
VideoBulkResponse is the envelope returned by Client.GetVideos.
type VideoRequest ¶ added in v0.11.0
type VideoRequest struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Date string `json:"date,omitempty"`
File *string `json:"file,omitempty"`
}
VideoRequest is the JSON-encoded body for Client.UpdateVideo. All fields are optional; omitted fields leave the existing value in place. VideoRequest is the JSON-encoded body for Client.UpdateVideo and Client.AddProfileVideo. File is the Base64-encoded video content for AddProfileVideo only — the /video/add multipart endpoint (Client.CreateVideo) uses a streaming io.Reader instead.
type VideoResponse ¶ added in v0.11.0
type VideoResponse struct {
// Id is the video's identifier.
Id string `json:"id,omitempty"`
// Guid is the video's legacy global identifier.
Guid string `json:"guid,omitempty"`
// Title is the video's title.
Title string `json:"title,omitempty"`
// Description is the video's description.
Description string `json:"description,omitempty"`
// Date is the video's date, as returned by Geni (string format).
Date string `json:"date,omitempty"`
// Attribution is the video's attribution string.
Attribution string `json:"attribution,omitempty"`
// ContentType is the original MIME type of the upload.
ContentType string `json:"content_type,omitempty"`
// Location is the video's optional location.
Location *LocationElement `json:"location,omitempty"`
// Tags is the list of profiles tagged in the video (urls or ids
// depending on the `only_ids` query parameter).
Tags []string `json:"tags,omitempty"`
// Sizes maps Geni-defined size names to fully-qualified URLs.
Sizes map[string]string `json:"sizes,omitempty"`
// Url is the API URL for the video.
Url string `json:"url,omitempty"`
// CreatedAt / UpdatedAt are the resource lifecycle timestamps.
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
VideoResponse is Geni's Video resource — a single uploaded video (or a link to an externally-hosted video) with metadata and tagging.
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. |