Git Product home page Git Product logo

api-explorer's Introduction

Welcome to the OBP API Explorer

ABOUT

This application is used to explore the OBP API and interact with the data and services in the context of the logged in user.

LICENSE

This project is licensed under the AGPL V3 (see NOTICE) and a commercial license from TESOBE.

SETUP

The project is using sbt or Maven 3 as a build tool. See build.scala or pom.xml respectively for the dependencies.


To compile and run jetty, cd into the root directory (where this file is) and run:

$ sbt ...

compile ~;container:start; container:reload /

(Note that you first have to start sbt and then on its console start jetty with the container:start task, otherwise it will exit immediately. More here: https://github.com/siasia/xsbt-web-plugin/wiki)

In OS X, sbt can be installed with $ sudo port install sbt


Alternatively, maven can also be used:

mvn jetty:run

Note: You may need to add the pluginGroup to the $HOME/.m2/settings.xml

... org.mortbay.jetty ...


To run with IntelliJ IDEA

  • Make sure you have the IntelliJ Scala plugin installed.

  • Create a new folder e.g. OpenBankProject and cd there

  • git clone https://github.com/OpenBankProject/API-Explorer.git

  • In IntelliJ IDEA do File -> New -> Project from existing sources, navigate to the folder and select pom.xml

  • Alternatively you can do File -> New -> Project from VCS and checkout the project directly from github.

  • Alternatively you can do File -> Open Folder and select the folder that contains pom.xml This is the currently recommended method

  • When / if prompted for SDK, choose Java 1.8 (and Scala 2.11) otherwise keep the defaults. Use the Maven options. Do not change the project name etc.

  • If you see a message about an unmanaged pom.xml, click the option to let Maven manage it.

  • Navigate to test/scala/RunWebApp. You may see a Setup Scala SDK link. Click this and check Scala 2.11.8 or so.

  • In src/main/resources/props create a <yourloginname>.props (or default.props) for development. For localhost set api_hostname=http://127.0.0.1:8080, defaultAuthProvider=http://127.0.0.1:8080, base_url=http://localhost:8082, dev.port=8082 and oauth keys obtained from the api (at /consumer-registration) i.e. obp_consumer_key and obp_consumer_secret

  • Now Rebuild the project so everything is compiled. At this point you may need to select the SDK, see above.

  • Once you have rebuilt the project without compile errors, you should be able to RunWebApp in test/scala

  • Run RunWebApp by right clicking on it or selecting Run. The built in jetty server should start on localhost:8082

  • Browse to localhost:8082 but don't try anything else there yet.

Ubuntu

If you use Ubuntu (or a derivate) and encrypted home directories (e.g. you have ~/.Private), you might run into the following error when the project is built:

uncaught exception during compilation: java.io.IOException
[ERROR] File name too long
[ERROR] two errors found
[DEBUG] Compilation failed (CompilerInterface)

The current workaround is to move the project directory onto a different partition, e.g. under /opt/ .

PROPS FILE

There is a props file template provided at src/main/resources/props/sample.props.template. It needs to be renamed and modified in order for the application to work.

  1. Renaming:

The sample.props.template file must be renamed for Lift to find it (https://www.assembla.com/wiki/show/liftweb/Properties). Renaming it to default.props should be the easiest way to get started.

base_url

The base_url is used to calculate the callback url to give to the Open Bank Project API server. This should just be the base url used to access the API Explorer. So if you're running a copy of the API Explorer at api-explorer.example.com over https, on the standard port, it would be "https://api-explorer.example.com". An example value for local development could be: http://127.0.0.1:8082 (8082 is the default Lift development port)

api_hostname

The api_hostname should be the base url of the Open Bank Project API. For example, https://api.openbankproject.com/api

obp_consumer_key obp_secret_key

The keys are obtained by registering as a developer on the Open Bank Project API server located at "api_hostname".

All in all, a props file could look something like:

api_hostname=https://api.openbankproject.com/api obp_consumer_key=uodsifnodsfifdsliufdsliufdsfdsfsdfsx obp_secret_key=iuesbfiyvglxzgifg7eisgei7fglesfi base_url=http://localhost:8082

api-explorer's People

Contributors

akendo avatar azd325 avatar chrisjsimpson avatar constantine2nd avatar everett-tesobe avatar florind avatar hongwei1 avatar kernifex avatar kjyv avatar moule3053 avatar oldbig avatar sebtesobe avatar simonredfern avatar somanole avatar tgpfeiffer avatar

Watchers

 avatar  avatar  avatar

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.