I am new to android and php and working on old project.
Everything worked smoothly till yesterday. I am getting all videos from you tube api:
https://gdata.youtube.com/feeds/api/videos?q=&start-index=1&max-results=10&v=2&alt=json
But from today, i just get only one video from this link and that is:
https://support.google.com/youtube/answer/6098135?p=yt_devicesupport&hl=en&rd=1
I have read that v2 become depreciated so i need to move to v3 version ?
I need help on how to get all videos as before.
There isn't really an easy answer for this. At least, we can't really just give you a new address to plop in the place of the old one. API v3 is structured differently and has different requirements than v2. Some of those changes at least theoretically bring some performance advantages, but when requesting things from this new API, you need to be more specific about what you're looking for. Also, since some of the data has moved around within the JSON results, you may need to change where your code looks for given information.
As it is, I don't really know what information you need, or for that matter, what collection of videos you're looking for. In this version of the API, these details actually matter. In v3, you have to provide a comma-separated list of the information you're looking for, and then at least one more "filter" parameter as well (filters, for your cases are probably either "chart" which is something like the "chart of the most popular", or "id" which is a comma-separated list of video IDs.)
While it's probably not the answer you were looking for, you probably need to stroll through the documentation. I especially suggest the Try It section, where you can plug in your parameters and build the query.
You'll need an API key to use the new API, and you can get that key from the Google Developers console. Create a new project, and add the YouTube API to it.
Related
I am trying to build a web application that would display Twitter feed based on multiple hashtags in real time. Something like TweeterWall. I've been Googling around, but there are so many APIs that I am a bit confused.
My setup is a standard shared hosting with PHP and MySQL.
My question: Which method is best suited for my environment?
Should I use Streaming API, Search API, Sockets, maybe Javascript with setInterval()..
i realy ont know..
Thanks for your answers.
- Cheers
Take a look at this project on GitHub. Don't be confused by the title - it has been updated since Twitter's API update to 1.1.
The jQuery plugin on the page has been re-purposed to be a Rendering engine, i.e. it helps with rendering your feeds.
The important part, however is in the "Server-Side Examples and Setup" directory. Go there, read the SETUP_INSTRUCTIONS document, and use the code in the "Plug_and_Play/Ready_PHP.php" file as your starting point.
If you followed the instructions in the SETUP_INSTRUCTIONS document, you should only have to copy and paste the keys from Twitter into the file, along with a Twitter handle, and it should render the timeline for you.
Note that you will have to update the code to render multiple timelines, and will have to either use AJAX or some other solution for updating the timelines, to simulate real-time.
On that note, be careful not to blow the rate-cap. If you are rendering timelines for just two Twitter handles, you can update them only once every 6 seconds (best case scenario). To do this, you will have to use a separate web service to perform the requests and then query that service from your webpage.
P.S. I am the author of that project, so if you need any help, let me know. Good luck! :)
I'm using the v1.0 PHP API, but an answer for any of the languages/versions will suffice (I'll be able to figure it out in PHP.)
Google's Blogger API shows the ability to perform CRUD operations, but nothing else.
Is it possible to change any blog preferences/settings/options, specifically something like changing the blog title via API?
I haven't seen anything in my searches, but it seems like something that should be available.
It seems that it might be possible (can't try it right now) by using the GData API - for a reference see esp. the updating an entry part at https://code.google.com/apis/gdata/docs/2.0/basics.html
You need to combine that with the description here (which is/does exactly what you are asking for) and the URL you got for an answer (i.e. https://www.blogger.com/feeds/*[blogId]*/settings) although that answer seems to indicate it is not possible right now. Since these are contradicting each other I would definitely give it a try.
The answer is no. After looking through the 2.0 protocol documentation it's clear that you can only interact with blog posts and comments, not with the blog's metadata.
As for the answer you got at the Blogger dev group, the person seems to be saying it's possible to retrieve the current title, but it's not possible to change it.
I want to add the redo search feature of google maps on this SITE. Any idea how to populate result markers and listings the way these people have done it?
There is an example here (check the source), but seems that V3 uses the Places library instead of focus on the GLocalSearch, see an example here (check the source). It is really easy to implement, but the database seems sparse, and I could find few results compared with the "query loc: Place name".
Using GLocalSearch with V3 gave me even less results than using Places library, what is even more frustrating. Anyway, you can give a try.
I have a client who wants me to implement the Grooveshark API into his site to be used as a fully fledged music system. It will be able to play, pause and skip songs from playlists that the user creates and and tracks the user favourites. So the user will have the ability to search for a track, add to playlist, favourite, play and the reverse of all these actions.
My question is. How do I get started. So I have the API (well the public version http://www.apishark.com as I am waiting for the full version to be sent to me). I look at the API and I just see what appears to me to be short snippets of code.
Is there some kind of a default way to implement an API, what do I need to know, how do I go about this task?
Any help will be appreciated.
Here you can find a php class to ease your work. It's not free but it's extremely cheap, and if you are not able to sort our how to use a standard REST api, and you have to do this for a work, maybe it's worth the price.
Or you can try here for a free class, but I never tried it and you have to use git to download the last version. I believe it's still under development, though.
Or, here you find a free python script that maybe it's easy to convert in PHP. Same here for a perl module.
I've come across several tools that search users by keyword, however, none that's open source.
I'm not familiar with the MySpace API and at first glance it doesn't seem like this option is available. I was hoping a PHP class exists for this sort of thing. So my question: how do I identify myspace users that have a keyword? Can it done through the API or another route is needed?
I haven't looked at the API, but I would say if you can't find a search function in the API, your best bet would be to write a scraper.
Use PHP (you may need curl as well) to load the MySpace search page with your query. Then parse the source code of that page to find what you want.
If you can't find a keyword lookup in the API, and you can't do a keyword lookup/search through the website, you're unfortunately likely out of luck.
In case it's useful now, better late than never?
They've opened up their API in the latest version allowing searching for a person by search term. See this as an example:
http://api.myspace.com/opensearch/people?searchTerms=ferrari&format=xml