News for hackers. Stuff that matters.
Re:Google APIs Repository on GitHub by knd775 on Thursday April 02, 2015 @03:21PM (#9312595)
This is pretty cool. Right now, there is very little there, but hopefully more will get put up. I've been working with maps a lot recently, and this would be extremely useful if maps were there.
Re:Google APIs Repository on GitHub by wora on Thursday April 02, 2015 @05:56PM (#9313462)
As more Google APIs support gRPC, their API definitions will be published.
Re:Google APIs Repository on GitHub by JoshGlazebrook on Thursday April 02, 2015 @04:04PM (#9312836)
I'm still bitter over the shutdown of the "hidden" weather api. I know it wasn't official but come on...
Re:Google APIs Repository on GitHub by markdown on Thursday April 02, 2015 @04:44PM (#9313094)
Not sure if sarcasm, or extreme sense of entitlement.
Re:Google APIs Repository on GitHub by ryannevius on Thursday April 02, 2015 @04:17PM (#9312917)
Google had its own weather API? Well, I missed out.

I wonder where the data was coming from.

Re:Google APIs Repository on GitHub by JoshGlazebrook on Thursday April 02, 2015 @05:11PM (#9313244)
I believe it was something that was used in the weather widget in iGoogle.

There was a small blip of outrage at the time but nothing major.

http://thenextweb.com/google/2012/08/28/did-google-just-quie...

Re:Google APIs Repository on GitHub by ffn on Thursday April 02, 2015 @05:24PM (#9313319)
Well I for one hope they put all of their API code up on github so the community can contribute to it. Just have to say, google's youtube api v3 is absolutely awful compared to the delightfully restful API of Github or Twitter.
Re:Google APIs Repository on GitHub by abraham on Thursday April 02, 2015 @07:57PM (#9313875)
What specifically are the issues with the YouTube API?
Re:Google APIs Repository on GitHub by ffn on Friday April 03, 2015 @01:29PM (#9317177)
In particular, they aren't restful or intuitive. If you've never used youtube's api v3, and someone demanded you give a basic explanation of what youtube data should look like, you'd guess:

1. a user has many (or has one) channels 2. a channel has many playlists 3. a playlist has many videos

So naturally, you'd expect the following:

1. api/v3/channels/teamcoco -> gets you the channel with id "teamcoco" 2. api/v3/channels/teamcoco/playlists -> gets you all the playlists on teamcoco's channel. Say they have ids [coco-001, coco-002, coco-uploads, ...] 3. api/v3/playlists/coco-uploads -> should get you the playlist with id "coco-uploads" 4. api/v3/playlists/coco-uploads/videos -> should get you the videos belonging to playlist id "coco-uploads"

Of course, the real api/v3 has none of that. The full details you'll have to read at the developer console at google, but in rough summary, if you wanted the teamcoco channel, you'd do:

1. api/v3/channels?forUsername=teamcoco&parts=id,snippet,topicDetails,contentDetails&fields=([forgot-what-went-here])

And you'd get a json that looks like: { ... items: [...], ... }

and all 1 channel with id "teamcoco" will be in items, with playlist info strewn somewhere in topicDetails or contentDetails. Then, when you want playlist information, you have to look at either the /playlist?id=whatever or /playlistItem?forChannel=whatever, depending on whether you wanted playlist metadata or playlist video data.

In all, it's an extremely horrible user experience, and yes, I get it, Google has to split up the data model so youtube can scale. Sure, but then they go about and expose all the details of their implementation in their external developer facing API. And if you've ever worked with other such api that has their innards exposed for the outside world to see, you know to be antsy. Such trashy api is bound to be refactored as soon another "Rockstar" engineer gets hired, so say goodbye to whatever customized adapter/serializer you wind up writing for api/v3 4 months down the road.

Re:Google APIs Repository on GitHub by abraham on Friday April 03, 2015 @02:43PM (#9317604)
So far looking at your complaint you just don't like their URL structures.

api/v3/channels/teamcoco vs api/v3/channels?forUsername=teamcoco

api/v3/playlists/coco-uploads vs api/v3/playlist?id=whatever

api/v3/playlists/coco-uploads/videos vs api/v3/playlistItem?forChannel=whatever

The only thing that takes a second to understand is parts=id,snippet,topicDetails,contentDetails but seems really convenient optimize your rate limit usage based on the info you actually need.

Re:Google APIs Repository on GitHub by wora on Friday April 03, 2015 @10:19PM (#9319645)
@ffn, have you looked at the Gmail API? It is pretty close to what you just said.

1. https://developers.google.com/gmail/api/

Re:Google APIs Repository on GitHub by tristanz on Thursday April 02, 2015 @05:17PM (#9313286)
Are there any more details on how Google is designing these new API endpoints? The information here is pretty sparse. It seems like a big strategic initiative to unify API design though.
Re:Google APIs Repository on GitHub by jfroma on Thursday April 02, 2015 @05:27PM (#9313334)
I wonder if they use the protocol buffers definition to validate json over http, or they dupe schemas into json schemas or other format.