-
Notifications
You must be signed in to change notification settings - Fork 52
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
Possible change to API #14
Comments
Hey @NolaMark, thanks for posting this. It looks like you're exactly right. Kickstarter seems to have changed (or removed) the urls for finding recently launched projects and also projects that are ending soon. @markolson, if you have any time to do some detective work like you first did when you scouted out their API, it would be great to know if there are new urls to replace the old ones. (I tried a few things in the brief time I have right now, but couldn't find any new urls) |
WORKAROUND: I was able to get the info I wanted thru the new advanced search. The category_id= will allow searching within a category, page= allows next group of 20 to be fetched On a whim, I appended format=json and got JSON response. The last part seems to open possibilities for non-api api like calls |
@NolaMark, that's great. Would you possibly have time to change the recently_launched and ending_soon methods so they use that advanced search? |
I'll do what I can, but it is more likely a shortage of skill than a shortage of time that will be the limiting factor. Also, recently_launched_projects had a (starting_at_timestamp = nil) parameter list that I've not [yet] discovered an equivalence in the advanced search, and the more_projects_available mechanism might require a kludge. I'll share my discoveries, issues, and working notes if I feel like I get to a point where I can't generate the required code. Edit: In case anyone else is looking into this. |
Wowzers, I really like the idea of calling a standard url (without requiring authentication) and just stating Maybe it's worth investigating if we can replace all or most of the api calls with these? |
But where's the fun in that? :) |
Yep, the top level response from |
Nice find @NolaMark! Using |
In process of attempting to write new launched-recently and ending-soon, spec/project_spec failed because of differences project object as returned by find_project(id) and the same projects as returned by recently-launched. Further investigation reveals others
|
Dang, that's a lot of differences. Are you thinking that it's not worth coding around the web url, then? |
I should be able push a feature branch later this week. But the implementation of load_more_projects and friends is likely to have a funky smell to it, since the urls.api returns results ascending from a parameterized starting point (cursor), where the urls.web returns results descending from the latest (back to the beginning of time, from what I can tell). Even if it allows people to continue to run their existing code unchanged, it is likely to conflict with any logic that worked with the baked in order from the original api. That said, in a perfect world, as a consumer of the service, I'd prefer a versioned interface to match the reality of KS changing their calls and results. Perhaps more painful in the short run, but the gymnastics to maintain the look and feel of the original api seem like they will be a maintenance nightmare in the long run. (Maybe it's just the brain rot cause by punched cards and mag tape speaking, not so quick on the uptake with all these new fangled methodologies.) |
Yeah, I would definitely agree with that. A versioned interface would be great. If you want to spend the time on that, I think that would be the best way to move kickscraper forward! I know that's a lot of work... I hope working on that sounds fun to you! |
Is 'popular' broke now too? Or did I somehow muck it up? Is this error message new? WORKAROUND: http://www.kickstarter.com/discover/popular?format=json |
This must be a very recent change. Calling the base API URL (https://api.kickstarter.com/v1/) used to give a bunch of links under I'm curious what ideas the maintainers have about this. |
Holy crap, yeah, they've just made that change within the last 24 hours. And the disclaimer is new as well. Man, I knew that they could change their API whenever they wanted to, but I didn't actually expect Kickstarter to suddenly turn off access! I would think that all the websites and services using Kickstarter's data would be a value to them. There is starting to be a whole ecosystem around Kickstarter, and by restricting that access, they're really thwarting that community! I hope we can figure out a workaround that is within Kickstarter's terms. |
To your point @ajkerrigan, I haven't looked at the different API results enough to know if it would be best to use both the public urls and the authorized user ones for different things. If it's possible to use only the public urls, that would definitely be easier - even if that means that the data returned is different from the current version that we've been using. If we do end up using both the public and signed in urls, I would still suggest that we keep it all within the one kickscraper project. My perspective is mostly just pragmatic. I think it's easiest to have Kickstarter data-gathering in one project so it can "black box" from the viewpoint of any other code using it. Does that make sense? |
That disclaimer wording is pretty clear, and I'd rather not risk people getting their account banned for trying to get around it in some weasely way or another. There was a My opinion would be that we pull out the existing API work (git will always have it for later) and refocus on just publicly accessible (or accessible with a user/pass/cookie) pages. Short term, I'm likely going to yank the rubygem, since it's not really functional anymore. |
Yeah, I think that's the way to go. If we can get it all functioning through the public URL's, let's just switch completely to that (or to whatever works). By the way, now that the "popular" search in the API is broken, my project (www.jumpkick.me) is suddenly defunct. And since I spent the last 5 months making it, I'm pretty disappointed in Kickstarter's sudden change! I'd like to get the new code working as quickly as possible. @markolson, what can I do to help? |
Oh yeah, one more quick thought. I'd say to leave the rubygem up while we change the code. It still functions for some of the methods, like searching for specific projects and users. And for anyone who has code deployed through something like heroku, it might break their entire ability to launch code if the gem isn't there. Is that ok with you guys? |
Given the disclaimer, I've already yanked the gems. It's not something I'm comfortable distributing anymore, even if it breaks projects. That said, I've made a new Short term, I'm going to make a few Issues were we can work on gathering information about replacement data - either via existing public JSON/Ajax requests or screen scraping, so that we can get a handle on what's where and what tools/frameworks we can use to gather it. |
Ok, yeah, that all sounds good. I've been looking at all the different url's and their responses, so I'll start adding some data to whatever issues you create. |
I going forward with the work I was doing with the following changes in client.rb
and changing I believe that will avoid all uses of api.kickstarter.com |
Sounds great. I will start adding some data to the other issue in a moment. |
So with the latest changes pushed to the branch we've been working on (https://github.com/markolson/kickscraper/tree/partially-using-public-search), it seems like that branch is essentially stable and working for all features that worked before Kickstarter's API change. I would suggest that we could merge that branch into master and republish the gem. What do you guys think about that? |
Hey guys - anyone have an opinion on merging the new branch into master? @markolson, it might be especially up to you, since you're the owner of the gem. As far as I can tell, this version should be a drop in replacement for the last stable version, and I would love to have it be publicly available again. |
I don't have a strong opinion. NolaMark
|
Man oh man, I just realized that Kickstarter started enforcing ssl on their public search about 5 days ago. I've updated the branch to use ssl and also to follow redirects (because they were responding with a 301 redirect that the faraday connection was just ignoring). |
I'm going to create a pull request for the updated branch. We can continue our conversation there about whether to push all this code to master or not... |
We've solved enough of this to close this issue, I think. I just pushed the branch to master, and we can republish the gem now. Yay. |
Kickstarter recently added a feature to drill down on the search. At about the same time a script that I had working stopped. Here is the core of what has stopped working. I accept possibility of operator error. Holidays prevent much more attention at the moment.
require 'kickscraper'
Kickscraper.configure do |config|
config.email = 'xxx'
config.password = 'xxx'
end
c = Kickscraper.client
rl = c.recently_launched_projects
rl.each {|p|
puts p.name
puts p.category.id
puts p.category.name
puts
}
The text was updated successfully, but these errors were encountered: