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

Installed #19

Closed
JBird608 opened this issue Feb 18, 2018 · 5 comments
Closed

Installed #19

JBird608 opened this issue Feb 18, 2018 · 5 comments

Comments

@JBird608
Copy link

Hey,

I was hope you could give me some pointers on how to get this working? So far I have go this installed and added a token. How do I say list the droplets on my account or see if its even corrected to my the API successfully?

Cheers.

@danieluyo
Copy link

Real Examples
Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is main. After you enter your authentication details in the config file, it will just work:

<?php
use GrahamCampbell\DigitalOcean\Facades\DigitalOcean;

$data = DigitalOcean::region()->getAll();

dd($data);

@tarecord
Copy link

Could this be used to access Digital Ocean on behalf of other users after OAuth authentication? I'm having a hard time finding a way to insert the access key when accessing the class.

@krisnaw
Copy link

krisnaw commented Jul 7, 2018

Yes, you can @tarecord.
$do = $this->doFactory->make(['driver' => 'guzzlehttp', 'token' => 'asdf']);

@LukaSikic
Copy link

@krisnaw could you explain your answer? $do is GuzzleHttpAdapter. How do we call region() with $do?

@krisnaw
Copy link

krisnaw commented Jul 22, 2018

@LukaSikic
$do is the instance, you can call the function as usual.
$do->region();

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

6 participants