As reposts where introduced in the new soundcloud website, is it also possible to extract tracks reposted by a given user through the API ?
Thanks in advance for your help
Replace User Id, limit and offset with what you need:
Updated:
https://api-v2.soundcloud.com/stream/users/<userId>/reposts?limit=50&offset=0
Old answer:
https://api-v2.soundcloud.com/profile/soundcloud:users:<userId>?limit=50&offset=0
The API endpoints which give you reposts are not yet part of the public API. The only reason for this is that we haven't yet fully decided on a format and so on -- basically, once it's part of the documented API, then we have a complete responsibility never to break that backwards compatibility, and we can't quite promise that yet.
Related
I am exploring how to search and filter tweets using the Twitter API version 2 which as of this writing has been newly released. The documentation for this particular endpoint is available here.
I tried successfully searching for the following query:
https://api.twitter.com/2/tweets/search/recent?query=puppy
As I needed to be more specific, I checked out v1.1 docs for rules and filtering and tried to look for tweets containing puppy images (filter:image) and no retweets (-filter:retweets) but I could not get the query in v2 (preferably) or v1.1 working with postman even though I tried percent-encoding for the special characters.
It is also not clear to me from the documentation (though mentioned in the docs) how to specify a certain language like English (lang=english) and a certain distance in the query "37.781157,-122.398720,1mi"
Does somebody know how to pass it into the query?
For language filter you can refer the post
https://community.postman.com/t/define-the-language-of-tweets/20643
But I am not sure about the image filter. But in recent times a developer sean.keegan from Postman is talking more about twitter API's in Postman. Please do check out https://community.postman.com/search?q=twitter and https://www.youtube.com/watch?v=ySbLo13Fk-c
I hope these will be helpful for you!!
I've been using Instagram's undocumented API https://www.instagram.com/<user>/?__a=1 to get a public user feed.
I was also able to get multiple pages via their max_id query parameter like so: https://www.instagram.com/<user>/?__a=1&max_id=<end_cursor>
end_cursor = json_response.graphql.user.edge_owner_to_timeline_media.page_info.end_cursor
(yes, "has_next_page" is true)
They had a recent change to their JSON format and I think they might have broken other functionality.
The "end_cursor" is still there but when I use it I just get back the same Instagram posts as if I wasn't using it.
Just to make sure I'm clear, my issue is that the max_id=<end_cursor> doesn't seem to work anymore for a public user feed. I can still get the first 12 posts, but no more after that.
Anyone else seeing this problem?
here's a JSFiddle example of what I mean:
https://jsfiddle.net/LLsg91ja/33/
04-14-2018 - NO LONGER WORKING - INSTAGRAM DEPRECATED THE '?__a=1' & '?query_id=17888483320059182' - THIS NO LONGER WORKS!
Okay take a look at this for media pagination:
https://instagram.com/graphql/query/?query_id=17888483320059182&id=<user_id>&first=12&after=<end_cursor>
This returns:
['data']['user']['edge_owner_to_timeline_media']['page_info']['end_cursor']
And Media:
['data']['user']['edge_owner_to_timeline_media']['edges']
the 'query_id' is static now so just use: 17888483320059182
'id' is the "instagram user id" so you have to use ?__a=1 to grab ['graphql']['user']['id']
'first' is the number of photos you desire returned. Just use 12 to keep the media return the same.
'after' is the new 'max_id' for use ['data']['user']['edge_owner_to_timeline_media']['page_info']['end_cursor']
I'll test more and respond later.
Responding Later:
It is believed 'pagination' using ?__a=1 has been deprecated. If true then there is no answer which can solve the op's direct question using ?__a=1 for Instagram pagination.
But the code provided in this answer will provide the pagination of Instagram media which does provide the results the op was seeking.
The answer incorporates the 'instagram graphql api' which is the current api (and not the json ?__a=1 hack) so this answer should provide some stability for now.
As used on my live site:
Grab the id=<instagram_user_id> prior the Instagram media request:
profile = https://www.instagram.com/<instagram_username>/?__a=1
media = https://instagram.com/graphql/query/?query_id=17888483320059182&id=<profile['graphql']['user']['id']>&first=12&after=<end_cursor>
You can use this: ?__a=1&page=3
I am using the Bitly API to track clicks of Bitly links posted on my network. At the moment I have to track them one by one. In the bitly docs I have read that the best practice is one of making a batch call to the /clicks endpoint. However in the specific docs about the clicks endpoint, nothing is mentioned about batch processing.
Batch Processing The Bitly API does not support shortening more than
one long URL with a single API call. However, up to 15 URLs can be
handled in one API call using the /v3/lookup, /v3/expand and
/v3/clicks endpoints.
Nowhere in the Bitly documentation I can find any example to use batch processing. I did some tries myself, but none worked.
https://api-ssl.bitly.com/v3/link/clicks?access_token=XXXXXXXXXXXX&format=json&link=http%3A//vrt.nu/kijkuniversiteitvanvlaanderen&link=https%3A%2F%2Fbuff.ly%2F2AooMAX
https://api-ssl.bitly.com/v3/link/clicks?access_token=XXXXXXXXXXXX&format=json&link=http%3A//vrt.nu/kijkuniversiteitvanvlaanderen,link=https%3A%2F%2Fbuff.ly%2F2AooMAX
I hope you can help me find the solution.
Thank you and best regards,
Kevin
The Best practices in bitly.com states /v3/clicks instead of /v3/link/clicks. I guess /v3/link/clicks does not support batch process.
I tried links, link[], duplicate link in /v3/link/clicks. All do not work.
While /v3/clicks supports duplicate shortUrl.
WARNING: /v3/clicks in deprecated list, it will be deprecated but the official website does not state when it will be deprecated.
Hope it help.
reference: https://dev.bitly.com/best_practices.html
reference: https://dev.bitly.com/deprecated.html#v3_clicks
Here is an excerpt from an assignment I am currently doing:
Build a dummy app that:
Contains a REST API that operates over a single resource.
Contains a Backbone client that consumes that API and can list, show, create, update, and remove that resource.
My understanding was that the term "consume" implies total coverage of the API's exposed ressources. However, the assignment says "consumes that API and can [CRUD] that resource".
Is that sentence redundant or is my understanding of the term wrong?
(Bonus question: why searching Google for this question returns countless language-specific tutorials for "consuming an API" but none explain what the term actually means?).
To consume an API means to basically use any part of it from your application.
Consuming an API here means creating a client which can send requests to the API that you build.
It appears that you need to create and API which can handle Create, retrieve, update and delete (CRUD) of a resource. For instance if your REST api is to create a blog, your API should handle CRUD functions for the object/resource blogpost.
POST - Create a blog post
GET - Retrieve a blog post
PUT - Update a blog post
DELETE - Delete a blog post.
It is about the direction of the app's interaction with API - it either provides an API, or consumes it, so there are providers and consumers of API, and this is just a less general and ambiguous term than 'using'.
Simply consuming an API means using it in your application.
For, e.g., GET request to https://someapi/Users will give you all the users.
You need to request this URL https://someapi/Users to get all the users and then you can use it into your application.
I always think about Albert Einstein's quote of "If you can’t explain it to a six year old, you don’t understand it yourself." when someone asks a question that you might take for granted due to technical experience you have on a subject.
I think the following medium.com article does an excellent job explaining it: How do you explain API to a 5-year-old?
simply means : using the API.
You can do it with HTTP method (GET, POST, PUT, DELETE..) using something like Postman (Tool) or maybe you have a client app/library that calls these methods implicitly.
I want to create a google reader application that for an user(google account)I need to get all its subscriptions, for each subscription all the feeds and for each feed all its items.
Please help me with some urls in order to create the post requests for grabbing this information.
Since the google reader api is not yet released I could not find any documentation for this. I have readed this article http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI but there is not specified how to get these.
I kindly appreciate any help.
This is the best PHP class written that I have seen and used. http://code.google.com/p/greader-library/source/browse/trunk/greader.class.php?r=3
Just add your username and password then call the function "listAll" that will list all the posts that are unread. You will need to write a few functions in order to do what you want.