Giter Club home page Giter Club logo

oda_api's Introduction

ODA_API

Full project

WEB client (Html, Jquery, Jquery Mobile) + REST API (Php)

##Install 1- Get all the sources in ./yourProject/API/

2- Create json conf (ex : in API/install/Scripts/exemple.config.api.oda.json)

3- Run cmd (ex : python API/install/Scripts/script_ODA_API.py yourPath/yourfile.config.api.oda.json install)

4- Config (include/config.js and include/config.php)

##Update Run cmd (ex : python API/install/Scripts/script_ODA_API.py yourPath/yourfile.config.api.oda.json update)

Composer

(For use the php class, WEB REST feature) https://packagist.org/packages/happykiller/oda_api

Ex : file.php

/**
 * CONFIG PART
 */
$config = \Oda\SimpleObject\OdaConfig::getInstance();
$config->domaine = "http://localhost/project/";

//for bd engine
$config->BD_ENGINE->base = 'base';
$config->BD_ENGINE->mdp = 'pass';

/**
 * BUILD INTERFACE
 */
$params = new \Oda\SimpleObject\OdaPrepareInterface();
$params->arrayInput = array("param_name");
$ODA_INTERFACE = new \Oda\OdaLibInterface($params);

/**
 * USE BD
 */
//Build query
$params = new \Oda\SimpleObject\OdaPrepareReqSql();
$params->sql = "SELECT *
    FROM `api_tab_parametres` a
    WHERE 1=1
    AND a.`param_name` = :param_name
;";
$params->bindsValue = [
    "param_name" => $ODA_INTERFACE->inputs["param_name"]
];
$params->typeSQL = \Oda\OdaLibBd::SQL_GET_ONE;
$retour = $ODA_INTERFACE->BD_ENGINE->reqODASQL($params);

//Add result to interface
$params = new \stdClass();
$params->label = "resultat_get_one";
$params->retourSql = $retour;
$ODA_INTERFACE->addDataReqSQL($params);

oda_api's People

Contributors

happykiller avatar

Watchers

James Cloos avatar  avatar

oda_api's Issues

Monter en version de la base pour l'api

A l'init on met le numéro de révision et on touche pas à int_data.sql, et init_struct.sql.

Pour faire évoluer le modèle, on appliquer les patch > API_REV_INIT

API\deploy\install\API\Rxxx\

Et on met à jour API_REV

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.