2017 © Pedro Peláez
 

library editora-extractor

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

image

omatech/editora-extractor

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  • Monday, July 30, 2018
  • by aponscat
  • Repository
  • 3 Watchers
  • 0 Stars
  • 584 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 4 % Grown

The README.md

Editora-Extractor

Utilities for extracting info from omatech Editora using GraphQL or a simplified array structure, (*1)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system., (*2)

Require in composer omatech/editora-extractor and you are get to go, (*3)

Review the package omatech/editora-laravel-connector for easy Laravel integration, (*4)

Prerequisites

You need a valid connection to an editora database using Doctrine/DBAL, (*5)

Usage

Instance

Get the instance information with the needed relations., (*6)

For example fetch the inst_id=1 (Home) and get the relations called "carrousel", "news" and "people"., (*7)

$params = [ 'id' => '1' , 'lang' => 'ca' , 'debug' => true , 'metadata' => true ];, (*8)

$query='query FetchHomeQuery ($id:Int, $lang:String, $debug:Boolean) { instance(id: $id, lang: $lang, debug: $debug) { id nom_intern link publishing_begins status creation_date class_name class_tag class_id update_timestamp all_values_even_null (filter: "small") {atri_tag text_val}, (*9)

relation1 (tag: "carrousel", limit:2, alias: "mycarrousel")
    {
      id tag direction limit
        instances {
            id nom_intern link publishing_begins status creation_date class_name class_tag class_id update_timestamp
            all_values_even_null (filter: "fields:title|subtitle_t") {atri_tag text_val}
        }
    }

relation2 (tag: "news", limit: 5)
    {
      id tag direction limit
        instances {
          id nom_intern link
            all_values_even_null (filter: "small") {atri_tag, text_val}
        }
    }

relation3 (tag: "people", limit:10)
    {
      id tag direction limit
        instances {
          id nom_intern link publishing_begins status creation_date
            all_values_even_null {atri_tag text_val}
        }
    }

} }';, (*10)

$extractor=new Extractor($conn); $res=$extractor->extract($query, $params, 'array', false); // $res now contains an array with the tree of the content, (*11)

Call to extractor

$res=$extractor->extract($query, $params, $format, $ferretizer);, (*12)

$query: is the GraphQL query $params: array of valid params (see params array section) $format: ('array' | 'json') Output format. Default 'array' $ferretizer: (true | false) select if you want to simplify the result using the ferretizer post-processor, usually true. Default true, (*13)

Params Array

The available params include:, (*14)

id: inst_id lang: language of the extraction, two letter language code or ALL ('ALL' | 'ca' | 'es' |...) class_id: class you want to extract the instances from tag: tag of the class that you want to extract the instance from metadata: true if you want to extract extra metadata for each object, false otherwise, default false. preview: true if you want to extract pending objects, false otherwise, default false. debug: true if you want to get debug information on the extraction, false otherwise, default false. $extractor->debug_messages keeps the debug information, (*15)

Installing

TBD, (*16)

Contributing

TBD, (*17)

Versioning

TBD, (*18)

Authors

Agusti Pons Christian Bohollo Javier Mogollon, (*19)

License

This project is licensed under the MIT License, (*20)

The Versions

30/07 2018

dev-master

9999999-dev

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

17/10 2016

v1.1.2

1.1.2.0

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

17/10 2016

v1.1.1

1.1.1.0

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

17/10 2016

v1.1

1.1.0.0

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

29/09 2016

dev-refactoring/change_app_make

dev-refactoring/change_app_make

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

15/09 2016

dev-new-graphql

dev-new-graphql

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

15/09 2016

v0.9

0.9.0.0

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

24/06 2016

dev-origin/master

dev-origin/master

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires

 

The Development Requires

22/06 2016

v1.0

1.0.0.0

Extract information from Editora in powerful and misterious ways using Facebook GraphQL

  Sources   Download

The Requires