Git Product home page Git Product logo

iformbuilderapi-v60's Introduction

iFormBuilder api Version 6 (v60)

Coverage Status

PHP library to interact with iFormBuilder api v60 resources

  • Start interacting with api quickly (includes generating access tokens)
  • Provides familiar ORM layer for mapping iFormBuidler resources
  • Utilize v60 features

Getting Started

Add credentials to Auth interfaces

Auth.php

interface Auth {
    /**
     * client key
     */
    CONST CLIENT = "";
    /**
     * secret key
     */
    CONST SECRET = "";
    /**
     * Oauth endpoint
     */
    CONST OAUTH = "https://yourserver.iformbuilder.com/exzact/api/oauth/token";
}

Profile.php

interface Profile {
    /**
     * client id : profile id assigned in api apps
     */
    CONST ID = "111111";
    /**
     * server :  "https://YOURCOMPANYSERVER.iformbuilder.com/"
     */
    CONST SERVER = "https://server.iformbuilder.com/";
}

Usage

Use zerion_autoload.php. If using composer, include composer autoload.php

require_once 'zerion_autoload.php';

Loading resources via container

use Iform\Resources\IformResource;

$pageResource = IformResource::page();
$optionListResource = IformResource::optionList();
$profileResource = IformResource::profile();
$userResource = IformResource::user();

Following will require a parent identifier

use Iform\Resources\IformResource;

$pageId = 123123;
$recordResource = IformResource::record($pageId);
$elementsResource = IformResource::elements($pageId);

$optionListId = 12312345;
$optionsResource = IformResource::options($optionListId);

##Interacting with API single resource methods

use Iform\Resources\IformResource;
$pageResource = IformResource::page()

//single page
$pageId = 123123;
$page = $pageResource->fetch($pageId);

//update
$values = ['name' => 'new_test'];
$pageResource->update($pageId, $values);

//delete
$pageResource->delete($pageId);

//create page
$values = ['name' => 'test', 'label' => 'This is a test'];
$nid = $pageResource->create($values);

//all methods consist for attributes
$values = [
        "language_code"=> "es",
        "label"=> "inspección de la construcción"
];

$pageResource->localizations($pageId)->create($values);

collection methods

//collection of all pages in profile
$pageResource->fetchAll();

//filter pages by type
$pageResource->where('data_type(="7")')->fetchAll();

//return first 25 pages 
$pageResource->first(25)->fetchAll();

//require all fields
$pageResource->withAllFields()->fetchAll();

//fetch all email alerts for page
$pageId = 123123;
$pageResource->alerts($pageId)->fetchAll();

//fetch all callbacks for page
$pageId = 123123;
$pageResource->http($pageId)->fetchAll();

//fetch all localizations for page
$pageId = 123123;
$pageResource->localizations($pageId)->fetchAll();

//fetch assignments for page
$pageId = 123123;
$pageResource->assignments($pageId)->fetchAll();

iformbuilderapi-v60's People

Contributors

kgarber avatar

Stargazers

Tony Ruth avatar

Watchers

James Cloos avatar  avatar Seth Salinas avatar Tony Ruth avatar  avatar  avatar  avatar  avatar

Forkers

trendycom truth3

iformbuilderapi-v60's Issues

Updating Numeric Element

When updating record with a Numeric element using API it would not allow to update to blank it always defaults to 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.