Giter VIP home page Giter VIP logo

Comments (9)

vjkaruna avatar vjkaruna commented on June 11, 2024

Hi Dlo -
The second link works for me (see my account https://delicious.com/vjkaruna ) although remember the "&" symbols in the URL need to be URL-encoded if you intend to preserve them. If you do not URLencode, the HTTP GET call cannot differentiate between API parameters and URL parameters.
For the second link, make sure the URL in the "&url=" param that you are replacing is identical. Delicious will attempt to canonicalize URLs to make them similar, for example removing a port ":80" from a HTTP URL. Querying "posts/all" should tell you the exact URL to replace.
I can also take a look if you list your Delicious account.
-vj

from delicious-api.

dlo avatar dlo commented on June 11, 2024

Thanks! Will follow up in a few.

from delicious-api.

dlo avatar dlo commented on June 11, 2024

Here's the exact request I'm making for the second URL:

https://api.delicious.com/v1/posts/add?description=Evolving%20Responsive%20Web%20Design%20%E2%80%93%20Jeffrey%20Zeldman%20Presents%20The%20Daily&extended=&replace=yes&shared=yes&tags=article%20design%20reference&url=http%3A%2F%2Fwww.zeldman.com%2F2014%2F03%2F09%2Fevolving-responsive-web-design%2F%3Futm_content%3Dbufferfdcaa%26utm_medium%3Dsocial%26utm_source%3Dtwitter.com%26utm_campaign%3Dbuffer

And here's output from my posts/all--if you look at the first two bookmarks you'll see that it's the same URL, duplicated. My account is "lionheartsw". Thanks!

<posts tag="" total="8" user="lionheartsw">
    <post description="6 Ways Students Can Collaborate With iPads - Edu" extended="" hash="5ad5c653e3cd70cd5e0786636bcad5ad" href="http://www.edudemic.com/6-ways-students-can-collaborate-with-ipads/" private="no" shared="yes" tag="collaborate ipad" time="2014-04-25T15:03:09Z"/>
    <post description="6 Ways Students Can Collaborate With iPads - Edudemic" extended="" hash="6f46a71b61cfcce1a75c0bd801fea5ad" href="http://www.edudemic.com/6-ways-students-can-collaborate-with-ipads/" private="yes" shared="no" tag="collaborate ipad" time="2014-03-10T17:32:54Z"/>
    <post description="Evolving Responsive Web Design – Jeffrey Zeldman Presents The Daily Report" extended="" hash="404d0f9e356143f0e503b0e21444a6d3" href="http://www.zeldman.com/2014/03/09/evolving-responsive-web-design/?utm_content=bufferfdcaa&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer" private="no" shared="yes" tag="article design reference" time="2014-03-10T17:32:33Z"/>
    <post description="sweetnbake.com" extended="" hash="48e2bd95f94621f1db0a3cf66e554b2f" href="http://sweetnbake.com/apple-streusel-melts/" private="no" shared="yes" tag="apple sweets" time="2014-03-10T17:32:20Z"/>
    <post description="Securelist - Information about Viruses, Hackers and Spam" extended="" hash="00c8846b9cad76c51de473e567729746" href="http://www.securelist.com/en/" private="no" shared="yes" tag="antivirus malware security" time="2014-03-10T17:32:14Z"/>
    <post description="reddit: what's new online" extended="" hash="b19d8eee8d2c4e4062d9242b94a7da61" href="http://www.reddit.com/" private="yes" shared="no" tag="reddit news popular article" time="2014-02-04T17:36:25Z"/>
    <post description="MacStories" extended="Last week, I was looking at the way I use Safari and save links to other apps and services, and I realized that I wanted a unified action menu to group some of my most used bookmarklets together. While this can be done by creating a bookmark folder in Safari, folders require too many taps on the iPhone and I’d like to have better visual differentiation between actions with unique icons for each one of them. That seemed like a good opportunity to test the capabilities of Launch Center Pro (now on the iPad as well) when it comes to lists and JavaScript, so I got to work." hash="5e4b3201ebc915f8431c7219bef9749c" href="http://www.macstories.net/" private="no" shared="yes" tag="pythonista apple ios" time="2014-02-04T17:36:00Z"/>
    <post description="apple.com" extended="iPad Air and iPad mini with Retina display. Two ways to your valentine’s heart." hash="0f82f8155826020d153245b61160ed4e" href="http://www.apple.com/" private="no" shared="yes" tag="apple ipad iphone" time="2014-02-04T17:35:35Z"/>
</posts>

from delicious-api.

vjkaruna avatar vjkaruna commented on June 11, 2024

In the second URL, it appears to be an issue with the "long hyphen" character (encoded as "%E2%80%93%") in your description field. I'll see why that might cause issues with our redirect, but in the meantime you should be able to save by avoiding or encoding that character differently.

For the first URL, it appears to be some issue where a previously saved version of that link ended up with a different MD5 hash - I'll take a look.

from delicious-api.

dlo avatar dlo commented on June 11, 2024

I'm not sure how else I can encode that character. What would you suggest?

And yep, removing that character did it. Is there a list of invalid characters that cannot be set in description fields? Is it ascii only?

As for the first URL, any update there?

from delicious-api.

dlo avatar dlo commented on June 11, 2024

@vjkaruna are you still lead on this or should I reach out to one of the Science people?

from delicious-api.

tonioriol avatar tonioriol commented on June 11, 2024

As commented in: https://github.com/zmanring/chrome-ext-delicious/issues/55 the only solution is a "hack". For the parameter "url" with non ascii characters, the best choice is double urlencode the value, works perfectly (as far as I've tried). But for the "description" and "extended" parameters, the only way is to remove/replace the non-ascii characters. Because i observed that the double urlencoding works with all characters that i've tried except "í" and "ó". I didn't try all the non-ascii characters one by one, so I think the best workaround is to delete them.

Hope it helps!

And please, the people who maintain this api, fix these errors please!

from delicious-api.

peoplemerge avatar peoplemerge commented on June 11, 2024

I hope to carve out most of next week to fix issues like this. Please keep up the comments!

from delicious-api.

tonioriol avatar tonioriol commented on June 11, 2024

Oh! That is really cool @peoplemerge! I've started to build a Laravel package wrapper for the delicious api, and i spent hours and hours trying to figure out why this is happening.

When this problem is fixed, I will publish the package.

from delicious-api.

Related Issues (20)

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.