gofamilysearch

package module
v0.0.0-...-2707a33 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2014 License: MIT Imports: 13 Imported by: 0

README

This is an in-progress SDK for FamilySearch written in go (golang). It includes functions for most of the read calls but none of the update calls. I plan to eventually add functions for most of the update calls, though I don't intend to include every function like the familysearch-javascript-sdk does - just the ones I use.

This is my first large-ish go project, so it may not be idiomatic go. If you notice something that could be improved, please post an issue or a pull request.

If you'd like to help develop, please do so!

Documentation

GoDoc.org

Example

Here's how you might use the SDK

  package main
  
  import (
     "github.com/rootsdev/gofamilysearch"
     "log"
     "net/http"
  )
  
  func main() {
      // Context can be shared among go-routines
     ctx := &gofamilysearch.Context{
        Environment: "sandbox",
     }
     // Client is specific to a user
     c := &gofamilysearch.Client{
        Context: ctx,
        AccessToken: "access token for the requesting user goes here",
        // if running on app engine, pass in &urlfetch.Transport{Context: appengine.NewContext(request)}
        Transport: DefaultTransport,
     }
  
     user, err := c.GetCurrentUser()
     if err != nil {
        log.Panic(err)
     }
     log.Printf("ID=%s personID=%s treeUserID=%s\n", user.ID, user.PersonID, user.TreeUserID)
  }      

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID        string          `json:"id"`
	Names     []*AgentName    `json:"names"`
	Accounts  []*AgentAccount `json:"accounts"`
	Emails    []*AgentEmail   `json:"emails"`
	Phones    []*AgentPhone   `json:"phones"`
	Addresses []*AgentAddress `json:"addresses"`
}

Agent contains information about another user (not to be confused with User)

type AgentAccount

type AgentAccount struct {
	AccountName string `json:"accountName"`
}

AgentAccount contains the agent's account name

type AgentAddress

type AgentAddress struct {
	Value string `json:"value"`
}

AgentAddress contains the agent's address

type AgentEmail

type AgentEmail struct {
	Resource string `json:"resource"`
}

AgentEmail contains the agent's email

type AgentName

type AgentName struct {
	Value string `json:"value"`
	Type  string `json:"type"`
}

AgentName contains the agent's name in Value

type AgentPhone

type AgentPhone struct {
	Resource string `json:"resource"`
}

AgentPhone contains the agent's phone

type ArtifactMetadata

type ArtifactMetadata struct {
	Filename     string `json:"filename"`
	ArtifactType string `json:"artifactType"`
	Width        int    `json:"width"`
	Height       int    `json:"height"`
}

ArtifactMetadata contains information about an artifact

type Attribution

type Attribution struct {
	Modified      int         `json:"modified"`
	ChangeMessage string      `json:"changeMessage"`
	Contributor   ResourceRef `json:"contributor"`
}

Attribution contains information about a modification

type Change

type Change struct {
	ID           string               `json:"id"`
	Updated      int                  `json:"updated"`
	Title        string               `json:"title"`
	Links        map[string]*FSHref   `json:"links"`
	Contributors []*ChangeContributor `json:"contributors"`
	ChangeInfo   []*ChangeInfo        `json:"changeInfo"`
}

Change contains a change-history entry

type ChangeContributor

type ChangeContributor struct {
	Name string `json:"name"`
	URI  string `json:"uri"` // Agent URL
}

ChangeContributor contains information about the user making the change

type ChangeInfo

type ChangeInfo struct {
	Operation      string      `json:"operation"`
	ObjectType     string      `json:"objectType"`
	ObjectModifier string      `json:"objectModifier"`
	Reason         string      `json:"reason"`
	Resulting      ResourceRef `json:"resulting"`
	Original       ResourceRef `json:"original"`
}

ChangeInfo contains information about the change

type ChildAndParentsRelationship

type ChildAndParentsRelationship struct {
	ID          string             `json:"id"`
	Links       map[string]*FSHref `json:"links"`
	FatherFacts []*Fact            `json:"fatherFacts"`
	MotherFacts []*Fact            `json:"motherFacts"`
	Father      ResourceRef        `json:"father"`
	Mother      ResourceRef        `json:"mother"`
	Child       ResourceRef        `json:"child"`
}

ChildAndParentsRelationship contains information about a child and parents relationship

type Client

type Client struct {
	Context     *Context
	AccessToken string
	Transport   http.RoundTripper
}

Client is specific to a user pass in http-client to allow running on appengine

func (*Client) Get

func (c *Client) Get(u *url.URL, params map[string]string, headers map[string]string, target interface{}) error

Get fetches the contents of the URL into the target

func (*Client) GetChildAndParentsNotes

func (c *Client) GetChildAndParentsNotes(caprid string) ([]*Note, error)

GetChildAndParentsNotes https://familysearch.org/developers/docs/api/tree/Child-and-Parents_Relationship_Notes_resource

func (*Client) GetDiscussionComments

func (c *Client) GetDiscussionComments(did string) ([]*Comment, error)

GetDiscussionComments https://familysearch.org/developers/docs/api/discussions/Comments_resource

func (*Client) GetHistoricalRecord

func (c *Client) GetHistoricalRecord(id string) (*HistoricalRecord, error)

GetHistoricalRecord reads the historical record with the specified id

func (*Client) GetOrdinanceAccess

func (c *Client) GetOrdinanceAccess() (bool, error)

GetOrdinanceAccess https://familysearch.org/developers/docs/api/ordinances/Ordinances_resource

func (*Client) GetPersonChanges

func (c *Client) GetPersonChanges(pid string, count int, from string) ([]*Change, error)

GetPersonChanges https://familysearch.org/developers/docs/api/tree/Person_Change_History_resource

func (*Client) GetPersonMatches

func (c *Client) GetPersonMatches(pid string, collection string, confidence int, count int) ([]*SearchMatchResult, error)

GetPersonMatches https://familysearch.org/developers/docs/api/tree/Person_Matches_resource

func (*Client) GetPersonMemories

func (c *Client) GetPersonMemories(pid string, start int, count int) ([]*Memory, error)

GetPersonMemories https://familysearch.org/developers/docs/api/tree/Person_Memories_Query_resource

func (*Client) GetPersonMemoryPersonaRefs

func (c *Client) GetPersonMemoryPersonaRefs(pid string) ([]*MemoryPersonaRef, error)

GetPersonMemoryPersonaRefs https://familysearch.org/developers/docs/api/tree/Person_Memory_References_resource

func (*Client) GetPersonNotes

func (c *Client) GetPersonNotes(pid string) ([]*Note, error)

GetPersonNotes https://familysearch.org/developers/docs/api/tree/Person_Notes_resource

func (*Client) GetPersonPortraitURL

func (c *Client) GetPersonPortraitURL(pid string) (string, error)

GetPersonPortraitURL returns the URL of the person portrait or the empty string

func (*Client) GetPreferredParentsID

func (c *Client) GetPreferredParentsID(tuid, pid string) (string, error)

GetPreferredParentsID returns the ID of the preferred parent relationship for the specified user.TreeUserID and personID or the empty string if no parents are preferred

func (*Client) GetRecordCollection

func (c *Client) GetRecordCollection(id string) (*RecordCollection, error)

GetRecordCollection reads the record collection with the specified id

func (*Client) GetURL

func (c *Client) GetURL(key string, params map[string]string) (*url.URL, error)

GetURL constructs the url for the key and params from the discovery resource

func (*Client) HTTP

func (c *Client) HTTP(method string, u *url.URL, headers map[string]string) (*http.Response, error)

HTTP is a low-level call. It adds a header for the access token and retries in case of throttling or transient read error. It is the caller's responsibility to close the response body

type Comment

type Comment struct {
	ID          string      `json:"id"`
	Text        string      `json:"text"`
	Created     int         `json:"created"`
	Contributor ResourceRef `json:"contributor"`
}

Comment contains information about a comment

type Context

type Context struct {
	Environment string
	// contains filtered or unexported fields
}

The Context can be shared among go-routines

type Date

type Date struct {
	Original   string     `json:"original"`
	Formal     string     `json:"formal"`
	Normalized []*FSValue `json:"normalized"`
}

Date contains a date

type Discussion

type Discussion struct {
	ID               string      `json:"id"`
	Title            string      `json:"title"`
	Details          string      `json:"details"`
	Created          int         `json:"created"`
	Modified         int         `json:"modified"`
	NumberOfComments int         `json:"numberOfComments"`
	Contributor      ResourceRef `json:"contributor"`
}

Discussion contains information about a discussion

type DiscussionRef

type DiscussionRef struct {
	ID               string      `json:"id"`
	ResourceID       string      `json:"resourceId"`
	Resource         string      `json:"resource"`
	Attribution      Attribution `json:"attribution"`
	Details          string      `json:"details"`
	Created          int         `json:"created"`
	Modified         int         `json:"modified"`
	NumberOfComments int         `json:"numberOfComments"`
	Contributor      ResourceRef `json:"contributor"`
}

DiscussionRef contains a reference to a discussion; ResourceID is the discussion ID

type FSDescription

type FSDescription struct {
	Description string `json:"description"`
}

FSDescription contains a single element -- Description

type FSHref

type FSHref struct {
	Href string `json:"href"`
}

A FSHref contains a single element as far as I know -- Href

type FSText

type FSText struct {
	Text string `json:"text"`
}

FSText contains a single element as far as I know -- Text

type FSValue

type FSValue struct {
	Value string `json:"value"`
	Lang  string `json:"lang"`
}

FSValue contains a value, and occasionally a lang (e.g., "en-US")

type Fact

type Fact struct {
	ID          string           `json:"id"`
	Type        string           `json:"type"`
	Value       string           `json:"value"`
	Attribution Attribution      `json:"attribution"`
	Date        Date             `json:"date"`
	Place       Place            `json:"place"`
	Qualifiers  []*FactQualifier `json:"qualifiers"`
}

Fact contains information about a fact

type FactQualifier

type FactQualifier struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

FactQualifier contains a Name of http://familysearch.org/v1/Event and a Value of false if this is a custom non-event (i.e., fact)

type Gender

type Gender struct {
	ID          string      `json:"id"`
	Type        string      `json:"type"`
	Attribution Attribution `json:"attribution"`
}

Gender contains the gender assertion

type HistoricalRecord

type HistoricalRecord struct {
	ID                 string                               `json:"id"`
	Description        string                               `json:"description"`
	SourceDescriptions []*HistoricalRecordSourceDescription `json:"sourceDescriptions"`
	Relationships      []*HistoricalRecordRelationship      `json:"relationships"`
	Persons            []*HistoricalRecordPerson            `json:"persons"`
	Fields             []*HistoricalRecordField             `json:"fields"`
}

HistoricalRecord contains information about a historical record

type HistoricalRecordCoverage

type HistoricalRecordCoverage struct {
	RecordType string                           `json:"recordType"`
	Temporal   HistoricalRecordTemporalCoverage `json:"temporal"`
	Spatial    HistoricalRecordSpatialCoverage  `json:"spatial"`
}

HistoricalRecordCoverage contains coverage information

type HistoricalRecordDate

type HistoricalRecordDate struct {
	Date
	Fields []*HistoricalRecordField `json:"fields"`
}

HistoricalRecordDate adds Fields to Date

type HistoricalRecordFact

type HistoricalRecordFact struct {
	Type    string                   `json:"type"`
	Value   string                   `json:"value"`
	Date    HistoricalRecordDate     `json:"date"`
	Place   HistoricalRecordPlace    `json:"place"`
	Primary bool                     `json:"primary"`
	Fields  []*HistoricalRecordField `json:"fields"`
}

HistoricalRecordFact adds Primary and Fields to Fact

type HistoricalRecordField

type HistoricalRecordField struct {
	Values []*HistoricalRecordFieldValue `json:"values"`
	Type   string                        `json:"type"`
}

HistoricalRecordField contains information about a field

type HistoricalRecordFieldValue

type HistoricalRecordFieldValue struct {
	Text     string `json:"text"`
	LabelID  string `json:"labelId"`
	Type     string `json:"type"`
	Resource string `json:"resource"`
}

HistoricalRecordFieldValue contains a field value

type HistoricalRecordGender

type HistoricalRecordGender struct {
	Type   string                   `json:"type"`
	Fields []*HistoricalRecordField `json:"fields"`
}

HistoricalRecordGender adds Fields to Gender

type HistoricalRecordName

type HistoricalRecordName struct {
	Type      string                      `json:"type"`
	NameForms []*HistoricalRecordNameForm `json:"nameForms"`
}

HistoricalRecordName contains a Name for historical records

type HistoricalRecordNameForm

type HistoricalRecordNameForm struct {
	FullText string                      `json:"fullText"`
	Parts    []*HistoricalRecordNamePart `json:"parts"`
	Fields   []*HistoricalRecordField    `json:"fields"`
}

HistoricalRecordNameForm contains a NameForm for historical records

type HistoricalRecordNamePart

type HistoricalRecordNamePart struct {
	NamePart
	Fields []*HistoricalRecordField `json:"fields"`
}

HistoricalRecordNamePart adds Fields to NamePart

type HistoricalRecordPerson

type HistoricalRecordPerson struct {
	ID          string                   `json:"id"`
	Extracted   bool                     `json:"extracted"`
	Principal   bool                     `json:"principal"`
	Gender      HistoricalRecordGender   `json:"gender"`
	Names       []*HistoricalRecordName  `json:"names"`
	Facts       []*HistoricalRecordFact  `json:"facts"`
	Links       map[string]*FSHref       `json:"links"`
	Identifiers map[string][]string      `json:"identifiers"`
	Fields      []*HistoricalRecordField `json:"fields"`
}

HistoricalRecordPerson contains a Person for historical records

type HistoricalRecordPlace

type HistoricalRecordPlace struct {
	Place
	Fields []*HistoricalRecordField `json:"fields"`
}

HistoricalRecordPlace adds Fields to Place

type HistoricalRecordRelationship

type HistoricalRecordRelationship struct {
	ID      string                  `json:"id"`
	Type    string                  `json:"type"`
	Facts   []*HistoricalRecordFact `json:"facts"`
	Person1 ResourceRef             `json:"person1"`
	Person2 ResourceRef             `json:"person2"`
}

HistoricalRecordRelationship contains a Relationship for historical records

type HistoricalRecordSourceDescription

type HistoricalRecordSourceDescription struct {
	ID           string                      `json:"id"`
	About        string                      `json:"about"`
	ResourceType string                      `json:"resourceType"`
	Created      int                         `json:"created"`
	Modified     int                         `json:"modified"`
	Citations    []*FSValue                  `json:"citations"`
	Titles       []*FSValue                  `json:"titles"`
	Identifiers  map[string][]string         `json:"identifiers"`
	ComponentOf  FSDescription               `json:"componentOf"`
	Sources      []*FSDescription            `json:"sources"`
	Coverage     []*HistoricalRecordCoverage `json:"coverage"`
}

HistoricalRecordSourceDescription contains a SourceDescription for historical records

type HistoricalRecordSpatialCoverage

type HistoricalRecordSpatialCoverage struct {
	Original string `json:"original"`
}

HistoricalRecordSpatialCoverage contains places coverage

type HistoricalRecordTemporalCoverage

type HistoricalRecordTemporalCoverage struct {
	Formal   string `json:"formal"`
	Original string `json:"original"`
}

HistoricalRecordTemporalCoverage contains time coverage

type MatchInfo

type MatchInfo struct {
	Collection string `json:"collection"`
	Status     string `json:"status"`
}

MatchInfo contains the collection (e.g., https://familysearch.org/platform/collections/records) and status (e.g., http://familysearch.org/v1/Pending)

type MediaQualifier

type MediaQualifier struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

MediaQualifier contains a Name (e.g., http://gedcomx.org/RectangleRegion) and a Value (e.g., 0, 0, 1, 1)

type MediaRef

type MediaRef struct {
	ID          string            `json:"id"`
	Qualifiers  []*MediaQualifier `json:"qualifiers"`
	Description string            `json:"description"`
}

MediaRef contains a link to the memory and qualifiers; Description is the URL of the memory

type Memory

type Memory struct {
	ID               string              `json:"id"`
	MediaType        string              `json:"mediaType"`
	ResourceType     string              `json:"resourceType"`
	About            string              `json:"about"`
	ArtifactMetadata []*ArtifactMetadata `json:"artifactMetadata"`
	Created          int                 `json:"created"`
	Titles           []*FSValue          `json:"titles"`
	Descriptions     []*FSValue          `json:"descriptions"`
	Links            map[string]*FSHref  `json:"links"`
}

Memory contains information about a memory, including the URL (About) and image/icon/thumbnail Links

type MemoryPersona

type MemoryPersona struct {
	ID      string               `json:"id"`
	Media   []*MediaRef          `json:"media"`
	Names   []*MemoryPersonaName `json:"names"`
	Display MemoryPersonaDisplay `json:"display"`
}

MemoryPersona contains information about a memory persona

type MemoryPersonaDisplay

type MemoryPersonaDisplay struct {
	Name string `json:"name"`
}

MemoryPersonaDisplay contains information about the memory persona in ready-to-display form

type MemoryPersonaName

type MemoryPersonaName struct {
	NameForms []*MemoryPersonaNameForm `json:"nameForms"`
}

MemoryPersonaName contains (possubly multiple) fulltext names

type MemoryPersonaNameForm

type MemoryPersonaNameForm struct {
	FullText string `json:"fullText"`
}

MemoryPersonaNameForm contains a fulltext name

type MemoryPersonaRef

type MemoryPersonaRef struct {
	ID         string `json:"id"`
	Resource   string `json:"resource"`
	ResourceID string `json:"resourceId"`
}

MemoryPersonaRef links persons to memory personas; ResourceID is the memory persona ID

type Name

type Name struct {
	ID          string      `json:"id"`
	Type        string      `json:"type"`
	Preferred   bool        `json:"preferred"`
	Attribution Attribution `json:"attribution"`
	NameForms   []*NameForm `json:"nameForms"`
}

Name contains a name assertion

type NameForm

type NameForm struct {
	Lang     string      `json:"lang"`
	FullText string      `json:"fullText"`
	Parts    []*NamePart `json:"parts"`
}

NameForm contains a language-specific name form

type NamePart

type NamePart struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

NamePart contains types of http://gedcomx.org/Prefix, Given, Surname, and Suffix

type Note

type Note struct {
	ID          string      `json:"id"`
	Subject     string      `json:"subject"`
	Text        string      `json:"text"`
	Attribution Attribution `json:"attribution"`
}

Note contains information about a note

type Person

type Person struct {
	ID          string              `json:"id"`
	Living      bool                `json:"living"`
	Display     PersonDisplay       `json:"display"`
	Identifiers map[string][]string `json:"identifiers"`
	Gender      Gender              `json:"gender"`
	Attribution Attribution         `json:"attribution"`
	Facts       []*Fact             `json:"facts"`
	Names       []*Name             `json:"names"`
	Links       map[string]*FSHref  `json:"links"`
}

Person contains information about a person

type PersonDisplay

type PersonDisplay struct {
	BirthDate  string `json:"birthDate"`
	BirthPlace string `json:"birthPlace"`
	DeathDate  string `json:"deathDate"`
	DeathPlace string `json:"deathPlace"`
	Gender     string `json:"gender"`
	LifeSpan   string `json:"lifespan"`
	Name       string `json:"name"`
}

PersonDisplay contains various person attributes in ready-to-display format

type PersonWithRelationships

type PersonWithRelationships struct {
	Persons                      []*Person                      `json:"persons"`
	ChildAndParentsRelationships []*ChildAndParentsRelationship `json:"childAndParentsRelationships"`
	Relationships                []*Relationship                `json:"relationships"`
}

PersonWithRelationships is the GetPersonWithRelationships response

func (*PersonWithRelationships) GetChildRelationships

func (pwr *PersonWithRelationships) GetChildRelationships(id string) []*ChildAndParentsRelationship

GetChildRelationships gets the ChildAndParentRelationships where id is a parent

func (*PersonWithRelationships) GetParentRelationships

func (pwr *PersonWithRelationships) GetParentRelationships(id string) []*ChildAndParentsRelationship

GetParentRelationships gets the ChildAndParentsRelationships where id is a child

func (*PersonWithRelationships) GetPerson

func (pwr *PersonWithRelationships) GetPerson(id string) *Person

GetPerson get the person with id

func (*PersonWithRelationships) GetSpouseRelationships

func (pwr *PersonWithRelationships) GetSpouseRelationships() []*Relationship

GetSpouseRelationships gets the Relationships that are couple relationships

type Place

type Place struct {
	Original    string     `json:"original"`
	Description string     `json:"description"`
	Normalized  []*FSValue `json:"normalized"`
}

Place contains a place

type RecordCollection

type RecordCollection struct {
	SourceDescriptions []*RecordCollectionSourceDescription `json:"sourceDescriptions"`
	Collections        []*RecordCollectionCollection        `json:"collections"`
	RecordDescriptors  []*RecordCollectionRecordDescriptor  `json:"recordDescriptors"`
	Description        string                               `json:"description"`
}

RecordCollection describes a collection of (historical) records

type RecordCollectionCollection

type RecordCollectionCollection struct {
	Lang    string                     `json:"lang"`
	Content []*RecordCollectionContent `json:"content"`
	Title   string                     `json:"title"`
	Size    int                        `json:"size"`
}

RecordCollectionCollection contains information about the collection

type RecordCollectionContent

type RecordCollectionContent struct {
	ResourceType string  `json:"resourceType"`
	Count        int     `json:"count"`
	Completeness float32 `json:"completeness"`
}

RecordCollectionContent contains information about the collection type and extent

type RecordCollectionField

type RecordCollectionField struct {
	Values []*RecordCollectionFieldValue `json:"values"`
}

RecordCollectionField contains a list of values

type RecordCollectionFieldValue

type RecordCollectionFieldValue struct {
	LabelID string     `json:"labelId"`
	Type    string     `json:"type"`
	Labels  []*FSValue `json:"labels"`
}

RecordCollectionFieldValue contains language-specific labels for the field

type RecordCollectionRecordDescriptor

type RecordCollectionRecordDescriptor struct {
	ID     string                   `json:"id"`
	Fields []*RecordCollectionField `json:"fields"`
}

RecordCollectionRecordDescriptor contains information for displaying record collection fields

type RecordCollectionSourceDescription

type RecordCollectionSourceDescription struct {
	ID           string                      `json:"id"`
	Citations    []*FSValue                  `json:"citations"`
	About        string                      `json:"about"`
	ComponentOf  FSDescription               `json:"componentOf"`
	Titles       []*FSValue                  `json:"titles"`
	ResourceType string                      `json:"resourceType"`
	Rights       []string                    `json:"rights"`
	Descriptions []*FSValue                  `json:"descriptions"`
	Identifiers  map[string][]string         `json:"identifiers"`
	Coverage     []*HistoricalRecordCoverage `json:"coverage"`
}

RecordCollectionSourceDescription contains a SourceDescription for a collection

type Relationship

type Relationship struct {
	ID      string             `json:"id"`
	Type    string             `json:"type"`
	Links   map[string]*FSHref `json:"links"`
	Facts   []*Fact            `json:"facts"`
	Person1 ResourceRef        `json:"person1"`
	Person2 ResourceRef        `json:"person2"`
}

Relationship contains information about a couple or a parent-child relationship

type ResourceRef

type ResourceRef struct {
	ResourceID string `json:"resourceId"`
	Resource   string `json:"resource"`
}

ResourceRef contains information about a resource -- the ID and URL

type SearchMatchResult

type SearchMatchResult struct {
	ID         string             `json:"id"`
	Score      float32            `json:"score"`
	Confidence int                `json:"confidence"`
	Links      map[string]*FSHref `json:"links"`
	Published  int                `json:"published"`
	Title      string             `json:"title"`
	MatchInfo  []*MatchInfo       `json:"matchInfo"`
}

SearchMatchResult contains information about a search or match result

type SourceDescription

type SourceDescription struct {
	ID          string      `json:"id"`
	About       string      `json:"about"`
	Attribution Attribution `json:"attribution"`
	Citations   []*FSValue  `json:"citations"`
	Titles      []*FSValue  `json:"titles"`
	Notes       []*FSText   `json:"notes"`
}

SourceDescription contains information about a source description

type SourceRef

type SourceRef struct {
	ID          string      `json:"id"`
	Attribution Attribution `json:"attribution"`
	Description string      `json:"description"`
	Tags        []*Tag      `json:"tags"`
}

SourceRef contains a reference to a SourceDescription; Description is the link to the SourceDescription

type Sources

type Sources struct {
	Refs         []*SourceRef         `json:"sources"`
	Descriptions []*SourceDescription `json:"sourceDescriptions"`
}

Sources contains SourceRefs and SourceDescriptions attached to a person, couple, or child-and-parents relationship

func (*Sources) GetSourceDescription

func (sources *Sources) GetSourceDescription(description string) *SourceDescription

GetSourceDescription returns the SourceDescription for the specified SourceRef.Description

type Tag

type Tag struct {
	Resource string `json:"resource"`
}

Tag contains a Resource that is http://gedcomx.org/Name, Gender, Birth, Christening, Death, or Burial

type User

type User struct {
	ID                string `json:"id"`
	PersonID          string `json:"personId"`
	TreeUserID        string `json:"treeUserId"`
	ContactName       string `json:"contactName"`
	DisplayName       string `json:"displayName"`
	GivenName         string `json:"givenName"`
	FamilyName        string `json:"familyName"`
	Gender            string `json:"gender"`
	Email             string `json:"email"`
	PreferredLanguage string `json:"preferredLanguage"`
}

User contains information about the current user (not to be confused with an Agent)

Jump to

Keyboard shortcuts

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