Skip to content

egeorgel/Fleur

Repository files navigation

Build Status

Ƒ|eµℝ

An API request tool for developpers, our main goal is to create a unify request language for all the APIs.

Tech

Ƒ|eµℝ uses a number of open source projects to work properly:

Getting Started

Prerequisities

  • Install Boost
  • Install Curl
  • Install Readline
  • Install Gumbo

Installing

  • Download the repo
    git clone https://github.com/egeorgel/Fleur.git
    cd Fleur/
    git submodule update --init --recursive --remote
  • Init Cmake
    mkdir cmake && cd cmake
    cmake -DCMAKE_BUILD_TYPE=Release ..
  • Build and/or install Fleur's static library
    make fleur_static
    # Files will be in Fleur/build/lib
    
    make fleur_static-install
    # Files will be in /usr/local/include/fleur.h and /usr/local/include/libfleur.a
  • Build and/or install Fleur's Command Line
    make fleur_cli
    # File will be in Fleur/build/bin
    
    make fleur_cli-install
    # File will be in /usr/local/bin/fleur
  • Uninstall
     make fleur_cli-uninstall
     make fleur_static-uninstall

Fleur Query Language Documentation

Fleur comprend différent module en plus des fonctionnalité du module de base. Chaque module comporte quelques spécificité syntaxique que vous pouvez trouver ci-dessous.

HTTP Module

The syntax is SQL like in order to be easy to take in charge

  • SELECT + html/* or json or xml + Optional: (css selector) + FROM + url or name of your ressource + Optional: GET/POST/Header (param1=val1, param2=val2)
    use http;  
    SELECT html FROM "http://httpbin.org/html";
    SELECT html (title) FROM "http://www.dynsim.fr";
    
    select json from "http://denis.fr" get (name=denis, age=12, date=12/12/12) header (tokenID=E223DEF, time=4);
    select html (p) from "http://denis.fr" get (name=denis, age=12, date=12/12/12) header (tokenID=E223DEF, time=4);

###Twitter Module In order to start the Twitter Module you have to type:

    use twitter;
    (_consumerKey, _consumerSecret, _tokenKey, _tokenSecret);
  • syntax : GET + */tweets or mention or trends + from twitter/. or anyother personn + Optional : limit to X
get tweets from twitter;                           #Get all your tweet from twitter limit to 200
get * from .;                                               #Same request
get tweets from ProductHunt limit 2;    #Get the 2 first tweets from ProductHunt   
get * from ProductHunt limit 2;              #Same request
  • syntax: SEARCH + text + FROM + twitter
    search Java from wiki;            #Search all article with the key word Java
    search "text" from * limit 2;   #Same request but only take the 2 first
  • syntax: POST + text
    post "new tweet";
  • syntax: DELETE + post_id
   delete 934839843522;

###Wikipedia Module In order to start the Twitter Module you have to type:

    use wikipedia;
  • syntax: GET + (html or header or txt) article_name + FROM + wikipedia + Optional: limit to X
    get (header) java from wiki;     #get the first part of the java article 
    get (html) java from wiki;          #get the full html of the java arcticle
    get java from wiki;                     #same as HTML
    get (txt) java from wiki;             #retreive the full content of the article in text format
  • syntax: SEARCH + article_name + FROM + wikipedia + Optional: limit to X
    search Java from wiki;              #Get all article id, name, header from the Java search
    search Java from wiki limit 4;  #Get the 4 first result of the previous search

###WolframeAlpha Module In order to start the WolframeAlpha Module you have to type:

    use wolframealpha;
    appId;
  • syntax : evaluate + string_to_evaluate_in_walframe_alpha;
    evaluate x + 3 = 4;
    evaluate string to search in Walframe Alpha

How to use the CLI

    fleur -h or fleur --help
    fleur -v or fleur --version
    fleur -e QUERY or fleur --execute QUERY
    INPUT | fleur

Contributing

Feel free to add any new component to this project.

Authors

Edgar Georgel - Valentin Mercier - Philippe Dupart - Arthur Busser - Anthony Da Mota

About

An API request tool for developpers, our main goal is to create a unify request language for all the APIs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •