Code Monkey home page Code Monkey logo

url-shortener's People

Contributors

maurob45 avatar sildraug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

url-shortener's Issues

can't run composer update when add package

when add this package to composer.json
i got this error

D:\xampp\htdocs\manishen>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)


  [Composer\Downloader\TransportException]
  The "http://packagist.org/p/waavi/url-shortener%2479452bc0b899f1be95f82568ba4fc4a4d518b29d68b899914c3619b833139ce2.json" file could not be downloaded: failed to ope
  n stream: HTTP request failed!

Can't install on Laravel 5.2

Problem 1
- waavi/url-shortener 1.0.1 requires mremi/url-shortener dev-master -> satisfiable by mremi/url-shortener[dev-master] but these conflict with your requirements or minimum-stability.
- waavi/url-shortener 1.0 requires mremi/url-shortener dev-master -> satisfiable by mremi/url-shortener[dev-master] but these conflict with your requirements or minimum-stability.
- Installation request for waavi/url-shortener 1.0.x -> satisfiable by waavi/url-shortener[1.0, 1.0.1].

Installation failed, reverting ./composer.json to its original content.

dailyLimitExceededUnreg from the getgo

I'm getting a 403 forbidden response on all requests.

[2018-02-10 00:30:17] local.ERROR: Client error: `POST https://www.googleapis.com/urlshortener/v1/url` resulted in a `403 Forbidden` response:
{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "dailyLimitExceededUnreg",
    "message": "D (truncated...)
 {"userId":2,"email":"[email protected]","exception":"[object] (Waavi\\UrlShortener\\Exceptions\\InvalidResponseException(code: 0): Client error: `POST https://www.googleapis.com/urlshortener/v1/url` resulted in a `403 Forbidden` response:
{
 \"error\": {
  \"errors\": [
   {
    \"domain\": \"usageLimits\",
    \"reason\": \"dailyLimitExceededUnreg\",
    \"message\": \"D (truncated...)
 at /Sites/MyApp/vendor/waavi/url-shortener/src/UrlShortener.php:59)

Is there an additional authentication step I need to make for a valid API key? I made it through their API console.

Doesn't work in Laravel 5.2

Hi, I have Laravel 5.2, I used the command:

composer require waavi/url-shortener 1.0.x

Also cheked in composer.json file and I have the require: "waavi/url-shortener": "1.0.x", that is ok.

After that I set the config in the file config\urlshortener.php with the API of Google URL Shortener and the username and password of Bit.ly but any work. In a view I tried with:

<?php echo \UrlShortener::shorten('www.google.com'); ?>
<?php echo \UrlShortener::driver('bitly')->shorten('www.google.com'); ?>

Boths return just: www.google.com

Any ideas? Thanks!

should not be called statically

Hello Dear,
Thank you for great job I just have a little issue.
I've got this issue:
PHP error: Non-static method Waavi\UrlShortener\UrlShortener::shorten() should not be called statically on line 1

when I write code:
\UrlShortener::shorten('http://google.com');

Doesn't work in Lumen 5.2

I have followed the instruction and configured the keys as well but it shows.

InvalidResponseException in UrlShortener.php line 61: Bit.ly returned status code "500" with message "MISSING_ARG_ACCESS_TOKEN"

I think there may be issue with getting config values. Because if we hot code keys into vendor\waavi\url-shortner\src/Drivers/factory.php it works fine.. FYI
public function __construct(Config $config)
{
$googleApiKey = $config->get('urlshortener.google.apikey');
$bitlyUsername = $config->get('urlshortener.bitly.username');
$bitlyPassword = $config->get('urlshortener.bitly.password');
$connectTimeout = $config->get('urlshortener.connect_timeout');
$timeout = $config->get('urlshortener.timeout');

    $this->google = new Google($googleApiKey, $connectTimeout, $timeout);
    $this->bitly  = new Bitly($bitlyUsername, $bitlyPassword, $connectTimeout, $timeout);
}  dd($config) shows empty item

use bitly

i set my username and password in .env
Bit.ly returned status code "500" with message "INVALID_ARG_ACCESS_TOKEN"

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.