GithubHelp home page GithubHelp logo

Implementing api action about bunq HOT 3 CLOSED

dstollie avatar dstollie commented on July 28, 2024
Implementing api action

from bunq.

Comments (3)

dennisdegreef avatar dennisdegreef commented on July 28, 2024

What do you mean exactly when you say 'the different api endpoint'? That not all functionality is imlemented? or are you talking about the production environment?

For the first, I've released this library when it was still a work in progress (kind of still is, I haven't tagged a stable release yet). I intend to add more functionality over time, but feel free to help out by sending in a pull request ;-)

If the latter, you can instantiate Link0\Bunq\Environment\Production instead of Sandbox and that will communicate with the production environment. See #8

Does this answer your question? :)

from bunq.

dstollie avatar dstollie commented on July 28, 2024

After rereading my question I felt the same as you did "What is this guy asking :)".

First of all thanks for the explanation of working with different environments. I already had a feeling that replacing new Sandbox for new Production should hook me into the production environment of bunq.

Though my question was ment to be more focussed on al the endpoints of bunq. bunq has lots of endpoints. Currently this library does only abstract away the endpoints for registering an installation, the device server and the session server. Are you planning to abstract away (all) the other endpoints bunq has.

Super simple code example:

// After this, you can use the client with all other services as followed
$client = new Client(
    $environment,
    $keypair,
    new PublicKey(file_get_contents('server-public-key.txt')),
    file_get_contents('session-token.txt')
);

$users = $client->getUsers();
$user = $client->getUser();
$client->postPayment(arguments)

Thanks for your work in this library. It helped me alot with getting the idea of the workings of the bunq api.

Have a nice day!

Dennis

from bunq.

dennisdegreef avatar dennisdegreef commented on July 28, 2024

I have already implemented some. You can find them here: https://github.com/link0/bunq/tree/master/src/Service

They take the Client as argument in the constructor, since they abstract away the literal calls.
These calls should be documented in the README.md but that is still to be done.

For example:

$monetaryAccountService = new MonetaryAccountService($client);
$monetaryAccounts = $monetaryAccountService->listByUser($user);
$reason = "I don't need this anymore";
$monetaryAccountService->closeAccount($monetaryAccount[1], $reason);

Do you have any calls you'd like to see implemented?

from bunq.

Related Issues (15)

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.