Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with Api V2? #25

Open
kLOsk opened this issue Dec 3, 2018 · 2 comments
Open

Usage with Api V2? #25

kLOsk opened this issue Dec 3, 2018 · 2 comments
Labels
Status: Needs Review The issue or pull request needs a review by a developer of the team.

Comments

@kLOsk
Copy link

kLOsk commented Dec 3, 2018

I'm trying to use this along with api v2, but unfortunate can't get any meaningful information from the objects. For example this here:

<?php
use ArkEcosystem\Client\Connection;

$connection = new Connection([
'host' => 'http://0.0.0.0:4003', // NO TRAILING SLASH!
'version' => 2
]);

$wallets = $connection->wallets();

echo '

';
print_r($wallets);
echo '
';
?>

The only thing I get from the walets object are guzzle objects. When trying to access the all() method I get an error. Can you provide some help here? Thanks!

@faustbrian faustbrian added the Status: Needs Review The issue or pull request needs a review by a developer of the team. label Jan 4, 2019
@reConNico
Copy link

Hey @kLOsk ,

can you try the following configuration:

$connection = new Connection([
    'host' => 'https://explorer.ark.io:8443/api/',
    'version' => 2, // you can remove this one because it isn't used by the client
]);

That should definitely work. There is also a minimalistic demo documentation: https://docs.ark.io/sdk/examples/sdk-demos.html#php

@repat
Copy link
Contributor

repat commented Sep 16, 2020

@kLOsk Might your error might've been related to #93, should be fixed in the next release. You do need a trailing slash, otherwise you get a PHP return type error. A slash will automatically be added in the new release as well.

@reConNico not everyday you meet a neighbor on the interwebs, hallo aus quickborn ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review The issue or pull request needs a review by a developer of the team.
Projects
None yet
Development

No branches or pull requests

4 participants