2017 © Pedro Peláez
 

library genealogy

Picturae webkitchen genealogy

image

picturae/genealogy

Picturae webkitchen genealogy

  • Friday, December 23, 2016
  • by mech7
  • Repository
  • 21 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 7 % Grown

The README.md

Build Status Coverage Status Dependency Status, (*1)

Picturae webkitchen genealogy client

Introduction

The genealogy client library is released for third parties who want to integrate a serverside fallback for the genealogy component. This can be used to improve SEO ranking (or) and sharing on social networks as facebook, twitter which do not support javascript., (*2)

Currently there is only a PHP implementation but it can serve as an example for implementation in other languages as Javascript / C# / Java etc., (*3)

Installation

composer require picturae/genealogy

Usage

See below the code example for the client, (*4)

$client = new \Picturae\Genealogy\Client('api-key');

// Get a deed
$deed = $client->getDeed($id);
$person = $client->getPerson($id);
$register = $client->getRegister($id);

// Get a result list of deeds
// all parameters are optional
$deed = $client->getDeeds([
    'q' => 'something', // search query
    'rows' => 100,      // amount of rows to return
    'page' => 1,        // page to return
    'facetFields' => [  // facet's to return
        'search_s_place'
    ],
    'fq' => [
        'search_s_place: "Amsterdam"' // apply filter query
    ],
    'sort' => 'search_s_place asc'   // sort result set (default by relevance)
]);

// Get a result list of registers
// all parameters are optional
$deed = $client->getRegisters([
    'q' => 'something', // search query
    'rows' => 100,      // amount of rows to return
    'page' => 1,        // page to return
    'facetFields' => [  // facet's to return
        'search_s_place'
    ],
    'fq' => [
        'search_s_place: "Amsterdam"' // apply filter query
    ],
    'sort' => 'search_s_place asc'   // sort result set (default by relevance)
]);

// Get a result list of persons
// all parameters are optional
$deed = $client->getPersons([
    'q' => 'something', // search query
    'rows' => 100,      // amount of rows to return
    'page' => 1,        // page to return
    'facetFields' => [  // facet's to return
        'search_s_place'
    ],
    'fq' => [
        'search_s_place: "Amsterdam"' // apply filter query
    ],
    'sort' => 'search_s_place asc'   // sort result set (default by relevance)
]);

Serverside fallback

Full example, (*5)

// If you do not provide a url the current url is used
$url = new \Picturae\Genealogy\URL();

// Check if we are on a permalink of a deed
if ($url->isDeedDetail()) {

    // Get the id for the deed from the URL
    $id = $url->getDeedUUID();

    // Instantiate the client with your API key
    $client = new \Picturae\Genealogy\Client('api-key');

    // Fetch the deed
    $deed = $client->getDeed($id);

    // Check if the deed is returned
    if (!empty($deed) {

        // Add your logic for the fallback
        // e.g add opengraph tags for facebook / twitter
        // or provide a html fallback

    }
}

Sitemap

It's recommended to create a sitemap and submit it to google to improve crawling In the examples folder is a demo how you could implement this., (*6)

Full example, (*7)

The Versions

23/12 2016

dev-develop

dev-develop

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

23/12 2016

dev-master

9999999-dev

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

23/12 2016

0.2.1

0.2.1.0

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

23/12 2016

0.2.0

0.2.0.0

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

26/08 2015

0.1.3

0.1.3.0

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

26/08 2015

0.1.2

0.1.2.0

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

25/08 2015

0.1.1

0.1.1.0

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae

25/08 2015

0.1.0

0.1.0.0

Picturae webkitchen genealogy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Picturae