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

Some README examples don't work with the current version of the library #237

Open
NoahAndrews opened this issue Jan 17, 2022 · 2 comments
Open

Comments

@NoahAndrews
Copy link

This does not apply to every single example snippet.

This is the old way to access functionality on a particular ADB device:

const client = Adb.createClient();
const serial = '1234';
client.reboot(serial);

This is the new way to do the same thing:

const client = Adb.createClient();
const device = client.getDevice('1234');
device.reboot();

adbClient.getDevice() is also not documented in the README.

@NoahAndrews NoahAndrews changed the title README examples don't work with the current version of the library Some README examples don't work with the current version of the library Jan 17, 2022
@MilkFlavor
Copy link

You could create a pull request for the readme file.

@UrielCh
Copy link

UrielCh commented Mar 7, 2022

I have add this method last year, but I do not update the README file, just the doc in the source that should be used to re-generate the readme doc.

And I have just update adbClient.getDevice() calls.

now you can use this syntax:

devices = await client.listDevices();
if (devices.length)
deviceClient = devices[0].getClient();

The last adbkit version is still here: @u4/adbkit
having 100 more commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants