Soundcloud explore section - api

I am exploring soundcloud's API, and I have seen that thought through the web you can access explore sections, I haven't found any docs that help you to do so through the API.
Anyone has tried this before?

soundcloud explore section uses new API calls that are still not documented. same with stream.
but you can check under the hood (in chrome developer tools -> network tab) to find new api calls.
for example, main explore section points to https://api.soundcloud.com/explore/sounds/category?limit=10&offset=0&linked_partitioning=1
and rock section points to
https://api.soundcloud.com/explore/sounds/category/rock?limit=10&offset=0&linked_partitioning=1
p.s. don't forget to include your client id in the calls

The API has been updated. You can use following URL to access the explore section (based on #cucko's reply):
https://api-v2.soundcloud.com/explore/categories?limit=10&offset=0&linked_partitioning=1
With client id in the call:
https://api-v2.soundcloud.com/explore/categories?limit=10&offset=0&linked_partitioning=1&client_id=YOUR_CLIENT_ID

The API has been updated.You can use following URL
https://api-v2.soundcloud.com/charts?kind=top&genre=soundcloud%3Agenres%3Aall-music&limit=20&offset=0&linked_partitioning=1&client_id=YOUR_CLIENT_ID

Related

Is there a REST API documentation that only publishes the root URL?

I´m trying to design a REST API for my application and I read a lot about best practices and how REST is supposed to work. One of the most important topics about REST is, that the resources should be linked via references and the client should only know the root URL of the API.
But I cannot find any API documentation that really does this. Every REST API documentation I ever read on the web shows an exact description of the URLs of the possible endpoints.
Is there any API documentation out there that only shows the root URL and describes how to navigate through the resources?
One of the most important topics about REST is, that the resources should be linked via references and the client should only know the root URL of the API.
The root URL and the media types, yes. The client needs to know where to start, and also how to interpret the responses it gets.
Your primary example of a REST API would be the world wide web. You point your browser at www.google.com, and then you just follow links and submit forms until you get the result you want.
Another REST API that might be familiar is Atom Syndication / Atom Pub.
More academically, there is RESTBucks. That paper was somewhat popular, and you can find a number of sample implementations around.
Jon Moore (2011) presented a good demonstration of a hypermedia API.
Every REST API documentation I ever read on the web shows an exact description of the URLs of the possible endpoints.
Yes; bad examples are much more common than good examples.

How to call Google NLP Api from a Google Chrome extension

My aim is to select some text from a web page, start a google chrome extension and give the text to a google cloud api (Natural Language API) in my case.
I want to do some sentimental analysis and then get back the result to mark/ highlight positive sentences in green and negative ones in red.
I am new to this and do not know how to start.
The extension consists of manifest, popup etc. How should I call an API from there that does Natural Language Processing?
Should I create a Google Cloud Application with an API_KEY to call? In that case I would have to upload my credentials right?
Sorry sounds a bit confusing I know but I just don't know how I can bring this 2 things together an would be more than happy about any help
The best way to authenticate your app will depend on the specific needs and use cases of your application. You can see an overview of all the different methods here.
If you are not planning on identifying users nor on using a back end server that handles authenticating (as I assume to be your case), the best option would indeed be to use API keys. They do not identify the user, but are enough for the Natural Language APIs.
To do this you will need to create an API key for the services you want and add the necessary restrictions to make the key as secure as possible. Detailed instructions on how to do this and how to use the key in a url can be found here.
The API call could be made from within the Chrome extension with any JavaScript method capable of performing POST requests. For example using XMLHttpRequest or the Fetch API. You can find an example of the parameters that need to be included in the request here.
You may run into CORS issues when making the request directly from the extension. I recommend reading this answer, where a couple of workarounds for these issues are suggested.

Open Contrail API, post request on project resource

I'm working on a cloud project and I have to use Contrail it provides a RESTful API to use, but it is documentation is too small. I would like to know how to perform rest requests, especially post requests on "project" resource.
Each Contrail config node provides supported API details(searchable) at http://:8082/documentation/index.html
You could also check here which is a bit old but should serve your project API needs.
Your question is old, but as there are no other answers I thought I would contribute one. Were you interested in an answer or just wanted to share the documentation you'd written? I agree with you that Contrail documentation is very scarce, and every attempt to contribute to it should be appreciated. I had to integrate with Contrail API a while ago, and found out that in some cases I had to call OpenStack APIs to get the job done (Contrail is built on top of OpenStack). Project and user management were some of them.
I wrote a documentation about Contrail api, For each resource I mention the allowed methods and which parameters to integrate on the request body and I test it until I get it to work finally I put an example. I haven't finished the documentation, I stopped working on Open Contrail. The documentation is my personal try maybe it would be useful and maybe it contains some mistakes, Thus, I would like to share it. You can find it here.

Twitter site-streams

I would like to use the twitter site-streams but I can't find a way to use them. There is no API-docs online and how to access site-streams.
Does someon have an example in php or better c#?
Are there any API-samples or a full API-doc?
Thanks
Matthias
I called oAuth before doing something similar to Shannon Whitley's user streams example. Use the curl commands generated for you at dev.twitter.com to double check your C# generate urls.
The site stream url is buried in the top middle of the doc (/2b/site.json?follow=1,2,3,4,5) # dev.twitter.com
I'd also follow #sitestreams as well to get heads up on site stream restarts.
The API looks to still be in beta, I found this. It's not a lot of detail, but the post was only a few weeks ago so it is something pretty new. It uses the same REST API that all of twitter uses so if you are familiar with that you should be able to use what it gives you.
If you need a tutorial on REST with twitter here is a decent tutorial. It is using basic authentication so I do strongly recommend that you use OAuth instead.

How to interact with the Panoramio API using services?

I'm writing a location base client and would love to integrate Panoramio with my client, now the problem is that I can't find a way to interact with the Panoramio using a ~REST-like service.
I know they do have an API but it's mostly for embedding the content into a website and not as to interact thru me code (at least from documentation)
Have any of you hacked a way thru this?
I am writing the clients natively for android and iphone in case you are wondering.
cheers,
G.
well it seems like the answer came a bit fast... and although this is easily accessible thru their website it is discussed in their forum and even google has posted about it in their geo developer blog
a sample request to get images from a bounding box will go along the lines of the following example:
http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=10&minx=-124.29382324218749&miny=36.089060460282006&maxx=-119.8773193359375&maxy=38.724090458956965&callback=MyCallback
Update: I have found also the official page to their data api.
hope it helps!