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

Add ability to add a title to bitly shorten links using create method instead of getUrl #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

phpawcom
Copy link

@phpawcom phpawcom commented Sep 9, 2024

Bitly::create('http://url.com/, 'title', 'domain.com');

{
$requestUrl = 'https://api-ssl.bitly.com/v4/shorten';
## $requestUrl = 'https://api-ssl.bitly.com/v4/shorten';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, but why is the requestUrl now a function param?

Copy link
Author

@phpawcom phpawcom Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use it in the new method create():

 public function create(string $url, ?string $title = null, ?string $domain = null, ?string $group_guid = null){
        return $this->getUrl($url, $domain, $group_guid , $title, 'https://api-ssl.bitly.com/v4/bitlinks');
    }

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

Successfully merging this pull request may close these issues.

2 participants